/* ============================================================================
   EasyVisit Portal — Extensions to easyvisit-redesign.css
   Drop into EasyVisit.Portal/wwwroot/css/portal-extensions.css and include it
   in your Razor layouts AFTER easyvisit-redesign.css.

   This file adds portal-specific patterns that don't exist in the dashboard:
     • Kiosk-scale visitor screens
     • Visitor/host/public top nav (the portal has no sidebar)
     • Dark-mode guard station
     • Emergency contact strip
     • Live-feed pulse indicator
     • Public landing audience cards (visitor/host/guard)
   ============================================================================ */

/* ── Body scope: portal pages get .ev-redesign on body (same as dashboard) ── */

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ PORTAL TOP NAV (replaces the dashboard's sidebar)                    ║
   ║ The portal has no sidebar — just a horizontal top nav per audience.  ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
body.ev-redesign .ev-portal-topbar {
  height: var(--ev-topbar-h);
  background: var(--ev-card);
  border-bottom: 1px solid var(--ev-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0;
  z-index: 1037;
}
.ev-portal-topbar .ev-portal-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--ev-text); text-decoration: none;
}
.ev-portal-topbar .ev-portal-logo:hover { text-decoration: none; }
.ev-portal-logo-img {
  display: block;
  width: 180px;
  max-width: 42vw;
  height: auto;
}
.ev-portal-logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--ev-brand), var(--ev-brand-700));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 16px; letter-spacing: -0.02em;
  box-shadow: var(--ev-shadow-brand);
  flex-shrink: 0;
}
.ev-portal-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.ev-portal-logo-name { font-weight: 700; font-size: 15.5px; color: var(--ev-text); letter-spacing: -0.01em; }
.ev-portal-logo-sub  { font-size: 10.5px; color: var(--ev-text-muted); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

.ev-portal-topbar-divider {
  width: 1px; height: 24px;
  background: var(--ev-border-md);
  margin: 0 6px;
}

.ev-portal-nav {
  display: flex; align-items: center; gap: 2px;
}
.ev-portal-nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 12px;
  border-radius: var(--ev-radius-sm);
  color: var(--ev-text-muted);
  font-size: 13.5px; font-weight: 500;
  text-decoration: none;
  transition: background 140ms, color 140ms;
  min-height: 44px; /* WCAG touch target */
}
.ev-portal-nav-link:hover {
  background: var(--ev-overlay-hover);
  color: var(--ev-text);
  text-decoration: none;
}
.ev-portal-nav-link.active {
  background: var(--ev-brand-soft);
  color: var(--ev-brand);
  font-weight: 600;
}
.ev-portal-nav-link i { font-size: 14px; }

.ev-portal-nav-spacer { flex: 1; }

.ev-portal-public-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ev-portal-signout-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-radius: var(--ev-radius-sm);
  background: transparent;
  color: var(--ev-danger);
  font-size: 13.5px; font-weight: 600;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background 140ms;
  min-height: 44px;
}
.ev-portal-signout-btn:hover { background: rgba(239, 68, 68, 0.06); }

/* User pill (portal — slightly slimmer than dashboard) */
.ev-portal-userpill {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 4px 4px 4px;
}
.ev-portal-userpill-text { display: flex; flex-direction: column; line-height: 1.15; }
.ev-portal-userpill-name { font-size: 12.8px; font-weight: 600; color: var(--ev-text); white-space: nowrap; }
.ev-portal-userpill-role { font-size: 10.5px; color: var(--ev-text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ EMERGENCY CONTACT STRIP                                              ║
   ║ Persistent strip showing the property's emergency number.            ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
.ev-emergency-strip {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--ev-bg-subtle);
  border-bottom: 1px solid var(--ev-border);
  padding: 7px 24px;
  font-size: 12.5px;
  color: var(--ev-text-muted);
}
.ev-emergency-strip i { color: var(--ev-danger); font-size: 13px; }
.ev-emergency-strip strong { color: var(--ev-text); font-weight: 600; }
.ev-emergency-strip a { color: var(--ev-brand); font-weight: 700; text-decoration: none; }
.ev-emergency-strip a:hover { text-decoration: underline; }

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ KIOSK VARIANT (visitor pages)                                        ║
   ║ Visitor screens are often used on a tablet at a gate. Buttons,       ║
   ║ headings, and cards get a kiosk treatment.                           ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
.ev-kiosk-page {
  min-height: calc(100vh - var(--ev-topbar-h));
  display: flex; flex-direction: column;
  background: var(--ev-bg);
}
.ev-kiosk-inner {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 40px 40px;
}
.ev-kiosk-hero {
  text-align: center;
  margin-bottom: 40px;
}
.ev-kiosk-hero .ev-badge {
  padding: 6px 14px;
  font-size: 12px;
  margin-bottom: 18px;
}
.ev-kiosk-hero h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  color: var(--ev-text);
}
.ev-kiosk-hero p {
  font-size: 17px;
  color: var(--ev-text-muted);
  margin: 0;
}

/* Two big primary action cards */
.ev-kiosk-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.ev-kiosk-action {
  background: var(--ev-card);
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-lg);
  padding: 32px 28px;
  text-align: left;
  display: flex; flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 140ms, box-shadow 200ms, border-color 140ms;
}
.ev-kiosk-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--ev-shadow-md);
  text-decoration: none;
  color: inherit;
}
.ev-kiosk-action.primary {
  border: 1.5px solid var(--ev-brand-line);
  box-shadow: 0 4px 16px rgba(0, 53, 151, 0.10);
}
.ev-kiosk-action .ev-kiosk-action-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--ev-brand-soft);
  color: var(--ev-brand);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  font-size: 24px;
}
.ev-kiosk-action.primary .ev-kiosk-action-icon {
  background: var(--ev-brand);
  color: #fff;
}
.ev-kiosk-action-label {
  font-size: 11.5px; font-weight: 700;
  color: var(--ev-text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.ev-kiosk-action-title {
  font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.ev-kiosk-action-desc {
  font-size: 15px; color: var(--ev-text-muted);
  line-height: 1.55;
  margin: 0 0 22px;
}

/* Smaller secondary action (e.g. "Take selfie") */
.ev-kiosk-secondary {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 24px;
  border: 1px dashed var(--ev-border-strong);
  background: var(--ev-bg-subtle);
  border-radius: var(--ev-radius-lg);
  text-decoration: none;
  color: inherit;
  transition: background 140ms, border-color 140ms;
}
.ev-kiosk-secondary:hover {
  background: var(--ev-card);
  border-color: var(--ev-brand-line);
  text-decoration: none; color: inherit;
}
.ev-kiosk-secondary .ev-kiosk-secondary-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--ev-warning-soft); color: var(--ev-warning-fg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ev-kiosk-secondary-body { flex: 1; }
.ev-kiosk-secondary-label { font-size: 11px; font-weight: 700; color: var(--ev-text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 3px; }
.ev-kiosk-secondary-title { font-size: 17px; font-weight: 700; }
.ev-kiosk-secondary-desc  { font-size: 13px; color: var(--ev-text-muted); margin-top: 2px; }

/* Trust bar at bottom of kiosk pages */
.ev-trust-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 22px; margin-top: 36px;
  color: var(--ev-text-soft);
  font-size: 12.5px; font-weight: 500;
  flex-wrap: wrap;
}
.ev-trust-bar i { font-size: 11px; }
.ev-trust-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }

/* Kiosk-sized button (visitor signin/signout CTA) */
.ev-btn.xl {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  gap: 10px;
  min-height: 52px;
  border-radius: var(--ev-radius);
}

/* Kiosk-sized access code input (visitor sign-in modal) */
.ev-kiosk-code-input {
  display: block;
  width: 100%;
  padding: 18px 20px;
  background: var(--ev-card);
  border: 1.5px solid var(--ev-border-strong);
  border-radius: var(--ev-radius);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ev-text);
  font-family: ui-monospace, SFMono-Regular, monospace;
  outline: 0;
  transition: border-color 140ms, box-shadow 140ms;
}
.ev-kiosk-code-input:focus {
  border-color: var(--ev-brand);
  box-shadow: 0 0 0 3px var(--ev-brand-soft);
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ PUBLIC LANDING (3 audience cards)                                    ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
.ev-landing-hero {
  text-align: center;
  padding: 64px 24px 40px;
}
.ev-landing-hero h1 {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  color: var(--ev-text);
}
.ev-landing-hero p {
  font-size: 16px;
  color: var(--ev-text-muted);
  margin: 0;
}

.ev-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
.ev-audience-card {
  background: var(--ev-card);
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-lg);
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 140ms, box-shadow 200ms, border-color 140ms;
}
.ev-audience-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ev-shadow-md);
  border-color: var(--ev-brand-line);
  text-decoration: none;
  color: inherit;
}
.ev-audience-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--ev-brand-soft);
  color: var(--ev-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.ev-audience-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ev-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.ev-audience-card-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.ev-audience-card-desc {
  font-size: 13.5px;
  color: var(--ev-text-muted);
  line-height: 1.55;
  margin: 0 0 18px;
}
.ev-audience-card-features {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  flex: 1;
}
.ev-audience-card-features li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 5px 0;
  font-size: 13px;
  color: var(--ev-text);
}
.ev-audience-card-features li i {
  color: var(--ev-success);
  margin-top: 4px;
  font-size: 11px;
  flex-shrink: 0;
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ AUTH (Host/Guard login)                                              ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
.ev-auth-page {
  min-height: calc(100vh - var(--ev-topbar-h));
  display: flex; flex-direction: column;
  align-items: center;
  padding: 64px 24px 40px;
  background: var(--ev-bg);
}
.ev-auth-card {
  background: var(--ev-card);
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--ev-shadow);
}
.ev-auth-header {
  text-align: center;
  margin-bottom: 24px;
}
.ev-auth-header h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 14px 0 6px;
}
.ev-auth-header p {
  font-size: 13.5px;
  color: var(--ev-text-muted);
  margin: 0;
}
.ev-auth-info {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: var(--ev-brand-soft);
  border: 1px solid var(--ev-brand-line);
  border-radius: var(--ev-radius);
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--ev-text);
  line-height: 1.55;
}
.ev-auth-info i { color: var(--ev-brand); margin-top: 2px; flex-shrink: 0; }
.ev-auth-info.success { background: var(--ev-success-soft); border-color: rgba(16,185,129,0.25); }
.ev-auth-info.success i { color: var(--ev-success-fg); }

/* OTP digit input — large monospaced field */
.ev-otp-input {
  display: block;
  width: 100%;
  padding: 18px 20px;
  border: 1.5px solid var(--ev-border-strong);
  border-radius: var(--ev-radius);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.6em;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: var(--ev-text);
  background: var(--ev-card);
  outline: 0;
  transition: border-color 140ms, box-shadow 140ms;
}
.ev-otp-input:focus {
  border-color: var(--ev-brand);
  box-shadow: 0 0 0 3px var(--ev-brand-soft);
}
.ev-phone-input-group {
  display: flex; gap: 8px;
}
.ev-phone-input-group .ev-phone-cc {
  flex: 0 0 80px;
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ GUARD STATION — DARK MODE                                            ║
   ║ Applied via <body class="ev-redesign ev-guard ev-guard-dark">        ║
   ║ Reuses the same .ev-card, .ev-table, .ev-btn primitives.             ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* Default light tokens — guard inherits these unless .ev-guard-dark is set */
body.ev-redesign.ev-guard {
  background: var(--ev-bg);
}

/* DARK MODE — override tokens at the body scope */
body.ev-redesign.ev-guard-dark {
  --ev-bg:           #0b1020;
  --ev-bg-soft:      #11182d;
  --ev-bg-subtle:    #161d36;
  --ev-card:         #141b2e;
  --ev-overlay-hover:rgba(255, 255, 255, 0.04);
  --ev-text:         #e2e8f0;
  --ev-text-muted:   #94a3b8;
  --ev-text-soft:    #64748b;
  --ev-text-faint:   #475569;
  --ev-border:       rgba(255, 255, 255, 0.06);
  --ev-border-md:    rgba(255, 255, 255, 0.08);
  --ev-border-strong:rgba(255, 255, 255, 0.12);
  --ev-brand-soft:   rgba(99, 165, 255, 0.10);
  --ev-brand-tint:   rgba(99, 165, 255, 0.18);
  --ev-brand-line:   rgba(99, 165, 255, 0.40);
  /* Brighten the primary itself slightly so it pops against dark surfaces */
  --ev-brand:        #4f7df3;
  --ev-brand-700:    #3d6adf;

  background: var(--ev-bg);
  color: var(--ev-text);
}

body.ev-redesign.ev-guard-dark .ev-card,
body.ev-redesign.ev-guard-dark .ev-portal-topbar,
body.ev-redesign.ev-guard-dark .ev-emergency-strip {
  background: var(--ev-card);
  border-color: var(--ev-border);
}
body.ev-redesign.ev-guard-dark .ev-table thead tr { background: var(--ev-bg-subtle); }
body.ev-redesign.ev-guard-dark .ev-table tr:hover td { background: var(--ev-overlay-hover); }
body.ev-redesign.ev-guard-dark .ev-portal-nav-link { color: var(--ev-text-muted); }
body.ev-redesign.ev-guard-dark .ev-portal-nav-link.active { background: var(--ev-brand-tint); color: var(--ev-brand); }
body.ev-redesign.ev-guard-dark .ev-portal-nav-link:hover { background: rgba(255,255,255,0.04); color: var(--ev-text); }

/* Guard: bigger search input (used at the gate, sometimes one-handed) */
.ev-guard-search {
  display: flex; gap: 10px;
}
.ev-guard-search .ev-input-shell {
  flex: 1;
  padding: 13px 16px;
  font-size: 15px;
}
.ev-guard-search input { font-size: 15px; }

/* Live pulse indicator */
.ev-live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--ev-radius-pill);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--ev-success-soft);
  color: var(--ev-success-fg);
}
.ev-live-pill .ev-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ev-success);
  animation: evLivePulse 2s infinite;
}
@keyframes evLivePulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
body.ev-redesign.ev-guard-dark .ev-live-pill { background: rgba(34,197,94,0.15); color: #4ade80; }

/* Lockdown banner */
.ev-lockdown-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--ev-danger);
  color: #fff;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  animation: evLockdownPulse 2s infinite;
}
@keyframes evLockdownPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.85; }
}

/* Theme toggle button (guard + host) */
.ev-theme-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--ev-border-strong);
  border-radius: var(--ev-radius-sm);
  color: var(--ev-text-muted);
  font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 140ms, color 140ms;
  min-height: 36px;
}
.ev-theme-toggle i { color: var(--ev-brand); }
.ev-theme-toggle-label { white-space: nowrap; }
.ev-theme-toggle:hover { background: var(--ev-overlay-hover); color: var(--ev-text); }

/* HOST PORTAL — DARK MODE
   Applied via html[data-ev-host-theme="dark"] + body[data-ev-host-theme-enabled="true"] */
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] {
  --ev-bg:           #0b1220;
  --ev-bg-soft:      #111a2b;
  --ev-bg-subtle:    #162033;
  --ev-card:         #111827;
  --ev-overlay-hover:rgba(148, 163, 184, 0.08);
  --ev-text:         #e5edf7;
  --ev-text-muted:   #a8b6ca;
  --ev-text-soft:    #7f90a8;
  --ev-text-faint:   #546277;
  --ev-border:       rgba(148, 163, 184, 0.14);
  --ev-border-md:    rgba(148, 163, 184, 0.18);
  --ev-border-strong:rgba(148, 163, 184, 0.28);
  --ev-brand:        #60a5fa;
  --ev-brand-700:    #3b82f6;
  --ev-brand-soft:   rgba(96, 165, 250, 0.16);
  --ev-brand-tint:   rgba(96, 165, 250, 0.22);
  --ev-brand-line:   rgba(96, 165, 250, 0.38);
  --ev-shadow-sm:    0 1px 2px rgba(2, 6, 23, 0.32);
  --ev-shadow:       0 10px 30px rgba(2, 6, 23, 0.22);
  --ev-shadow-md:    0 18px 44px rgba(2, 6, 23, 0.34);
  --ev-shadow-brand: 0 10px 24px rgba(59, 130, 246, 0.22);
  background: var(--ev-bg);
  color: var(--ev-text);
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-card,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-topbar,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-emergency-strip,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-footer,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .modal-content {
  background: var(--ev-card);
  border-color: var(--ev-border);
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-table thead tr {
  background: var(--ev-bg-subtle);
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-table tr:hover td,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .table-hover tbody tr:hover {
  background: var(--ev-overlay-hover);
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-nav-link,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-signout-btn,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .text-muted,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .modal-header .close {
  color: var(--ev-text-muted);
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-nav-link.active {
  background: var(--ev-brand-tint);
  color: var(--ev-brand);
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-nav-link:hover,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-signout-btn:hover {
  background: var(--ev-overlay-hover);
  color: var(--ev-text);
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-emergency-strip strong,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-logo-name,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-userpill-name,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-page-title,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-card-title,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-kpi-value,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-welcome-hero h1,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-field-label,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-field > label,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .modal-title {
  color: var(--ev-text);
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-page-subtitle,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-logo-sub,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-userpill-role,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-welcome-hero p,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-kpi-label,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-kpi-foot,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-emergency-strip,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-footer,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-table th,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-cell-sub {
  color: var(--ev-text-muted);
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-table td,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-cell-name,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-welcome-hero p strong,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-logo,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-portal-footer a,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .modal-body,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .modal-footer {
  color: var(--ev-text);
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-input-text,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .form-control,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .table,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .modal-header,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .modal-footer {
  background: var(--ev-card);
  color: var(--ev-text);
  border-color: var(--ev-border);
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-input-text::placeholder {
  color: var(--ev-text-soft);
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-validation-msg {
  color: #fecaca;
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .mono,
html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] .ev-table .mono {
  color: #cbd5e1;
}

html[data-ev-host-theme="dark"] body.ev-redesign[data-ev-host-theme-enabled="true"] #overlay {
  background: rgba(2, 6, 23, 0.76);
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ HOST DASHBOARD — Welcome hero card                                   ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
.ev-welcome-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--ev-card) 0%, var(--ev-brand-soft) 100%);
  border: 1px solid var(--ev-brand-line);
  border-radius: var(--ev-radius-lg);
  margin-bottom: 18px;
}
.ev-welcome-hero .ev-welcome-meta {
  display: flex; align-items: center; gap: 18px;
}
.ev-welcome-hero h1 {
  font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0;
}
.ev-welcome-hero p {
  font-size: 14px; color: var(--ev-text-muted);
  margin: 4px 0 0;
}
.ev-welcome-hero p strong { color: var(--ev-text); }

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ KIOSK MODAL (visitor sign-in/out)                                    ║
   ║ For accessibility, override Bootstrap 3 modal styles with .ev-* tokens.
   ╚══════════════════════════════════════════════════════════════════════╝ */
.ev-kiosk-modal .modal-dialog { max-width: 460px; margin: 60px auto; }
.ev-kiosk-modal .modal-content {
  background: var(--ev-card);
  border: 1px solid var(--ev-border);
  border-radius: var(--ev-radius-lg);
  box-shadow: 0 20px 60px rgba(15,23,42,0.2);
}
.ev-kiosk-modal .modal-header {
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--ev-border);
  display: flex; align-items: center; gap: 12px;
}
.ev-kiosk-modal .modal-header .ev-kiosk-modal-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--ev-brand-soft); color: var(--ev-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.ev-kiosk-modal .modal-header h4 {
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  margin: 0; color: var(--ev-text);
}
.ev-kiosk-modal .modal-header p {
  font-size: 12.5px; color: var(--ev-text-muted);
  margin: 2px 0 0;
}
.ev-kiosk-modal .modal-body {
  padding: 20px 24px;
}
.ev-kiosk-modal .modal-footer {
  padding: 14px 24px 20px;
  border-top: 1px solid var(--ev-border);
  display: flex; flex-direction: column; gap: 8px;
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ FORM INPUTS — direct utility class                                   ║
   ║ The dashboard auto-styles inputs inside .ev-field, but portal pages  ║
   ║ also need .ev-input-text as a direct class (e.g. for inputs that     ║
   ║ aren't wrapped in .ev-field). This mirrors the .ev-field input rules.║
   ╚══════════════════════════════════════════════════════════════════════╝ */
.ev-input-text {
  display: block;
  width: 100%;
  padding: 9px 12px;
  background: var(--ev-card);
  border: 1px solid var(--ev-border-strong);
  border-radius: var(--ev-radius);
  font-family: var(--ev-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ev-text);
  transition: border-color 140ms, box-shadow 140ms, background 140ms;
}
.ev-input-text:focus {
  outline: 0;
  border-color: var(--ev-brand);
  box-shadow: 0 0 0 3px var(--ev-brand-soft);
}
.ev-input-text::placeholder { color: var(--ev-text-soft); }
.ev-input-text:disabled,
.ev-input-text[readonly] { background: var(--ev-bg-subtle); color: var(--ev-text-muted); cursor: not-allowed; }
textarea.ev-input-text { min-height: 86px; resize: vertical; line-height: 1.55; }
select.ev-input-text {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

/* Validation message under a field */
.ev-validation-msg {
  display: block;
  font-size: 12px;
  color: var(--ev-danger-fg);
  margin-top: 4px;
  min-height: 16px;
}

/* Field label (when we don't use the dashboard's .ev-field wrapper) */
.ev-field > label,
.ev-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ev-text);
  margin-bottom: 6px;
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ STEPPER (multi-step forms — already in dashboard CSS; portal uses it) ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
/* (No portal-specific overrides — see easyvisit-redesign.css .ev-stepper.) */

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ LOADING OVERLAY                                                      ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
#overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center; justify-content: center;
  flex-direction: column;
  z-index: 9999;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
#overlay[style*="display: block"],
#overlay[style*="display:block"],
#overlay[style*="display: flex"],
#overlay[style*="display:flex"] {
  display: flex !important;
}
#overlay .ev-loading-spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: evSpin 0.8s linear infinite;
  margin-bottom: 14px;
}
@keyframes evSpin { to { transform: rotate(360deg); } }

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ DATATABLES                                                          ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
body.ev-redesign div.dataTables_wrapper {
  margin-top: 16px;
  color: var(--ev-text-muted);
}
body.ev-redesign div.dataTables_wrapper .dataTables_length,
body.ev-redesign div.dataTables_wrapper .dataTables_filter,
body.ev-redesign div.dataTables_wrapper .dataTables_info,
body.ev-redesign div.dataTables_wrapper .dataTables_paginate {
  font-size: 12.5px;
  color: var(--ev-text-muted);
}
body.ev-redesign div.dataTables_wrapper .dataTables_length,
body.ev-redesign div.dataTables_wrapper .dataTables_filter {
  margin-bottom: 12px;
}
body.ev-redesign div.dataTables_wrapper .dataTables_length select,
body.ev-redesign div.dataTables_wrapper .dataTables_filter input {
  min-height: 38px;
  border: 1px solid var(--ev-border-strong);
  border-radius: var(--ev-radius-sm);
  background: var(--ev-card);
  color: var(--ev-text);
  padding: 8px 12px;
  box-shadow: none;
}
body.ev-redesign div.dataTables_wrapper .dataTables_length select {
  min-width: 82px;
}
body.ev-redesign div.dataTables_wrapper .dataTables_filter input {
  margin-left: 8px;
}
body.ev-redesign div.dataTables_wrapper .dataTables_info {
  padding-top: 12px;
}
body.ev-redesign div.dataTables_wrapper .dataTables_paginate {
  padding-top: 8px;
}
body.ev-redesign div.dataTables_wrapper .dataTables_paginate .paginate_button {
  min-width: 36px;
  margin-left: 6px;
  border: 1px solid var(--ev-border) !important;
  border-radius: var(--ev-radius-sm);
  background: var(--ev-card) !important;
  color: var(--ev-text-muted) !important;
}
body.ev-redesign div.dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.ev-redesign div.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--ev-brand-soft) !important;
  border-color: var(--ev-brand-line) !important;
  color: var(--ev-brand) !important;
}
body.ev-redesign div.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: rgba(15, 23, 42, 0.03) !important;
  border-color: var(--ev-border-strong) !important;
  color: var(--ev-text) !important;
}
body.ev-redesign div.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body.ev-redesign div.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  opacity: 0.5;
  cursor: default !important;
}
body.ev-redesign table.dataTable.no-footer {
  border-bottom: 1px solid var(--ev-border);
}
body.ev-redesign table.dataTable thead th,
body.ev-redesign table.dataTable thead td {
  border-bottom-color: var(--ev-border-strong) !important;
}

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ FOOTER                                                               ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
.ev-portal-footer {
  text-align: center;
  padding: 18px 24px;
  font-size: 12px;
  color: var(--ev-text-soft);
  border-top: 1px solid var(--ev-border);
  background: var(--ev-card);
}
.ev-portal-footer a {
  color: var(--ev-brand);
  text-decoration: none;
  margin: 0 4px;
}
.ev-portal-footer a:hover { text-decoration: underline; }

/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ RESPONSIVE                                                           ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
@media (max-width: 768px) {
  body.ev-redesign .ev-portal-topbar {
    padding: 0 14px;
    gap: 10px;
  }
  .ev-portal-topbar-divider { display: none; }
  .ev-portal-logo-text { min-width: 0; }
  .ev-portal-logo-sub {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ev-portal-nav-spacer { flex: 0 1 auto; }
  .ev-portal-public-actions {
    margin-left: auto;
    gap: 6px;
  }
  .ev-portal-public-actions .ev-btn {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
    flex: 0 0 40px;
  }
  .ev-portal-public-actions .ev-btn span { display: none; }
  .ev-audience-grid { grid-template-columns: 1fr; }
  .ev-kiosk-actions { grid-template-columns: 1fr; }
  .ev-kiosk-hero h1 { font-size: 32px; }
  .ev-kiosk-inner { padding: 28px 20px; }
  .ev-portal-nav-link span { display: none; } /* icon-only nav on mobile */
  .ev-theme-toggle-label { display: none; }
  .ev-theme-toggle { padding: 7px 10px; }
}
