/* ==========================================================================
   2026 Incheon Creative Design Week (ICDW 2026) Operations Portal
   Design System: Neo-Glassmorphism, High-Tech Event Operations Palette
   ========================================================================== */

:root {
  /* Dark Mode Palette (Default) */
  --bg-primary: #050813;
  --bg-secondary: #0b1126;
  --bg-card: rgba(13, 22, 45, 0.72);
  --bg-card-hover: rgba(20, 32, 64, 0.85);
  --bg-card-active: rgba(22, 38, 76, 0.92);
  --bg-surface: rgba(255, 255, 255, 0.035);
  
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 229, 255, 0.4);
  --border-active: #00e5ff;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #00e5ff;
  --accent-cyan-glow: rgba(0, 229, 255, 0.25);
  --accent-purple: #8b5cf6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.65);
  --shadow-cyan-glow: 0 0 30px rgba(0, 229, 255, 0.22);
  --shadow-purple-glow: 0 0 30px rgba(139, 92, 246, 0.25);

  --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  --font-brand: 'Outfit', 'Pretendard', sans-serif;
}

[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --bg-card-active: #ffffff;
  --bg-surface: rgba(0, 0, 0, 0.03);

  --border: rgba(0, 0, 0, 0.09);
  --border-hover: rgba(2, 132, 199, 0.45);
  --border-active: #0284c7;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-cyan: #0284c7;
  --accent-cyan-glow: rgba(2, 132, 199, 0.15);
  --accent-purple: #7c3aed;
  --accent-indigo: #4f46e5;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.12);
  --shadow-cyan-glow: 0 0 25px rgba(2, 132, 199, 0.15);
  --shadow-purple-glow: 0 0 25px rgba(124, 58, 237, 0.15);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Background Ambient Orbs */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  transition: opacity 0.3s;
}
[data-theme="light"] .bg-glow { opacity: 0.14; }

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.45), transparent 70%);
  top: -120px;
  left: -80px;
  animation: floatOrb 18s ease-in-out infinite alternate;
}
.orb-2 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45), transparent 70%);
  bottom: 0px;
  right: -100px;
  animation: floatOrb 22s ease-in-out infinite alternate-reverse;
}
.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulseGlow 12s ease-in-out infinite alternate;
}

@keyframes floatOrb {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(35px) scale(1.05); }
  100% { transform: translateY(-30px) scale(0.95); }
}

@keyframes pulseGlow {
  0% { opacity: 0.25; transform: translate(-50%, -50%) scale(0.9); }
  100% { opacity: 0.45; transform: translate(-50%, -50%) scale(1.1); }
}

/* Header */
.portal-header {
  position: relative;
  z-index: 50;
  width: 100%;
  background: rgba(5, 8, 19, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
[data-theme="light"] .portal-header {
  background: rgba(255, 255, 255, 0.85);
}

.portal-header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00e5ff 0%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #050813;
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.35);
  flex-shrink: 0;
}
[data-theme="light"] .brand-icon {
  color: #ffffff;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-brand);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-primary);
}

.brand-title .highlight {
  color: var(--accent-cyan);
}

.brand-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Status Pill */
.auth-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
[data-theme="light"] .auth-status-pill {
  background: rgba(0, 0, 0, 0.04);
}

.auth-status-pill.authed {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
}

.auth-status-pill.locked {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
  animation: pulseDot 2s infinite ease-in-out;
}
.auth-status-pill.authed .pulse-dot {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}
.auth-status-pill.locked .pulse-dot {
  background-color: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Nav Link Pill */
.header-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.header-nav-link:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Theme Toggle Button */
.theme-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.theme-btn:hover {
  color: var(--accent-cyan);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}
.sun-icon { display: none; }
.moon-icon { display: block; }
[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }

/* Session Timer Pill */
.session-timer-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-primary);
}
.session-timer-pill strong {
  font-variant-numeric: tabular-nums;
  color: var(--accent-cyan);
}
.btn-extend-session {
  background: rgba(0, 229, 255, 0.2);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-extend-session:hover {
  background: rgba(0, 229, 255, 0.35);
}

.btn-portal-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #fda4af;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
[data-theme="light"] .btn-portal-logout {
  color: #e11d48;
}
.btn-portal-logout:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.4);
}

/* Main Container */
.portal-main {
  position: relative;
  z-index: 10;
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: flex;
  flex-direction: column;
}

.portal-card {
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 48px 44px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}

/* Hero Header */
.card-hero-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 44px;
}

.hero-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 6px 18px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #00e5ff 0%, #a78bfa 60%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
  word-break: keep-all;
}

/* System Grid (Main Systems) */
.system-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

@media (max-width: 1080px) {
  .system-grid {
    grid-template-columns: 1fr;
  }
}

.system-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 26px 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.system-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.system-card.active {
  background: var(--bg-card-active);
  border-color: var(--border-active);
  box-shadow: var(--shadow-cyan-glow), var(--shadow-md);
}

.system-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.system-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: transform 0.25s ease;
}
.system-card:hover .system-icon {
  transform: scale(1.08);
}

.system-icon.subtitles {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.system-icon.wall {
  background: linear-gradient(135deg, #00e5ff 0%, #3b82f6 100%);
  color: #050813;
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.35);
}
[data-theme="light"] .system-icon.wall {
  color: #ffffff;
}

.system-icon.talk {
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 100%);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

.system-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.system-path-tag {
  font-family: monospace;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.system-radio {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.system-card.active .system-radio {
  border-color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.15);
}
.radio-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  transform: scale(0);
  transition: transform 0.2s ease;
}
.system-card.active .radio-circle {
  transform: scale(1);
}

.system-name-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.system-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.system-desc {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.system-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.badge-feature {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.system-card.active .badge-feature {
  background: rgba(0, 229, 255, 0.07);
  border-color: rgba(0, 229, 255, 0.25);
  color: var(--accent-cyan);
}

/* Sub Routes Button Bar inside System Card */
.sub-routes-bar {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sub-route-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}
.sub-route-chip:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.sub-route-chip.primary-chip {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.35);
  color: var(--accent-cyan);
}
.sub-route-chip.primary-chip:hover {
  background: rgba(0, 229, 255, 0.25);
}

.system-locked-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(244, 63, 94, 0.08);
  border: 1px dashed rgba(244, 63, 94, 0.3);
  font-size: 0.82rem;
  font-weight: 600;
  color: #fb7185;
  margin-top: 14px;
}

/* Modular Expansion Section (Upcoming Programs) */
.operations-expansion-section {
  margin-top: 8px;
  margin-bottom: 36px;
  padding: 28px 30px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
  transition: border-color 0.3s ease;
}
.operations-expansion-section:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.expansion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.expansion-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.expansion-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
}

.expansion-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.expansion-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--accent-purple);
}

.expansion-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.expansion-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.expansion-slot {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}
.expansion-slot:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateY(-2px);
}

.slot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slot-icon {
  font-size: 1.25rem;
}

.slot-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.slot-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.slot-detail {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Authenticated Mode (SSO Active) */
.auth-active-box {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.05), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
}

.active-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.active-notice i {
  color: var(--accent-emerald);
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.active-notice strong {
  display: block;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.active-notice span {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.active-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-enter-primary {
  width: 100%;
  background: linear-gradient(135deg, #00e5ff 0%, #3b82f6 100%);
  color: #050813;
  border: none;
  border-radius: 14px;
  padding: 18px 24px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="light"] .btn-enter-primary {
  color: #ffffff;
}
.btn-enter-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 229, 255, 0.45);
}

.active-secondary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.btn-quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-quick-link:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  transform: translateY(-2px);
}
.btn-quick-link i {
  color: var(--accent-cyan);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Password Login Form Mode */
.portal-login-form {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-title-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.password-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 18px;
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.portal-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 54px 16px 50px;
  font-size: 1.05rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s;
}
[data-theme="light"] .portal-input {
  background: #ffffff;
}
.portal-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.2);
}
.portal-input.highlight-glow {
  border-color: #00e5ff !important;
  box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.4), 0 0 20px rgba(0, 229, 255, 0.3) !important;
  animation: inputFlash 1.2s ease;
}
@keyframes inputFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.btn-toggle-pw {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.btn-toggle-pw:hover {
  color: var(--text-primary);
}

.portal-error-text {
  display: none;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.btn-portal-submit {
  background: linear-gradient(135deg, #00e5ff 0%, #3b82f6 100%);
  color: #050813;
  border: none;
  border-radius: 14px;
  padding: 18px 24px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.35);
  transition: all 0.25s;
}
[data-theme="light"] .btn-portal-submit {
  color: #ffffff;
}
.btn-portal-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(0, 229, 255, 0.45);
}

/* Footer */
.portal-footer {
  margin-top: 36px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .system-grid {
    grid-template-columns: 1fr;
  }
  .expansion-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .active-secondary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .portal-card {
    padding: 30px 20px;
    border-radius: 20px;
  }
  .hero-title {
    font-size: 1.75rem;
  }
  .hero-desc {
    font-size: 0.95rem;
  }
  .expansion-slots-grid {
    grid-template-columns: 1fr;
  }
  .active-secondary-grid {
    grid-template-columns: 1fr;
  }
  .sub-routes-bar {
    flex-direction: column;
  }
  .brand-sub {
    display: none;
  }
}
