/* ==========================================================================
   ReadTsk Next-Gen Portal - Luxury Light & Pastel Tech Theme
   ========================================================================== */

/* --- Bright Luminous Canvas & Ambient Pastel Glow --- */
.login-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  position: relative;
  background-color: #f8fafc;
  background-image:
    radial-gradient(circle at 12% 15%, rgba(56, 189, 248, 0.12), transparent 45%),
    radial-gradient(circle at 88% 22%, rgba(168, 85, 247, 0.12), transparent 48%),
    radial-gradient(circle at 50% 85%, rgba(251, 191, 36, 0.09), transparent 52%),
    radial-gradient(circle at 75% 75%, rgba(52, 211, 153, 0.1), transparent 45%),
    linear-gradient(rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-position: 0 0, 0 0, 0 0, 0 0, -1px -1px, -1px -1px;
  color: #1e293b;
  overflow-x: hidden;
  font-family: "Noto Sans Thai", "Outfit", system-ui, -apple-system, sans-serif;
}

/* Ambient Floating Glow Orbs (Soft Pastels) */
.portal-bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.portal-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.55;
  animation: portalFloat 18s ease-in-out infinite alternate;
}

.portal-orb-1 {
  width: 520px;
  height: 520px;
  top: -120px;
  left: 3%;
  background: radial-gradient(circle, rgba(186, 230, 253, 0.6), rgba(125, 211, 252, 0.15));
}

.portal-orb-2 {
  width: 580px;
  height: 580px;
  bottom: -160px;
  right: 3%;
  background: radial-gradient(circle, rgba(233, 213, 255, 0.6), rgba(192, 132, 252, 0.12));
  animation-duration: 22s;
  animation-delay: -5s;
}

.portal-orb-3 {
  width: 360px;
  height: 360px;
  top: 45%;
  left: 48%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(254, 215, 170, 0.45), transparent 70%);
  animation-duration: 16s;
}

@keyframes portalFloat {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-25px) scale(1.06); }
  100% { transform: translateY(18px) scale(0.97); }
}

/* --- Top Status Bar (Bright & Crisp) --- */
.portal-topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 36px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-logo-glow {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7, #2563eb, #d97706);
  display: grid;
  place-items: center;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.25);
}

.portal-logo-glow svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.portal-brand-text strong {
  display: block;
  font-family: "Outfit", "Noto Sans Thai", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.portal-brand-text span {
  display: block;
  font-size: 0.76rem;
  color: #64748b;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.portal-meta-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Pastel Mint Badge */
.portal-badge-live {
  border: 1px solid #86efac;
  background: #dcfce7;
  color: #15803d;
}

.portal-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #16a34a;
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.6);
  animation: portalPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes portalPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.portal-clock {
  color: #334155;
  font-family: "JetBrains Mono", "Noto Sans Thai", monospace;
  font-size: 0.8rem;
  padding: 6px 14px;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-weight: 500;
}

.portal-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.portal-btn-ghost:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

/* --- Main Two-Column Stage --- */
.portal-stage {
  position: relative;
  z-index: 5;
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 24px 36px;
  align-items: center;
}

/* --- Left Column: Tech Hero Showcase --- */
.portal-hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.portal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 9999px;
  width: fit-content;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0369a1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.portal-hero-title {
  margin: 0;
  font-size: clamp(1.6rem, 2.2vw, 2.1rem);
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.portal-gradient-text {
  color: #0284c7;
  display: inline-block;
  font-weight: 800;
}

.portal-hero-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #334155;
  max-width: 520px;
}

/* --- Pastel Live Metrics HUD --- */
.portal-metrics-hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.portal-metric-box {
  border-radius: 14px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: all 0.28s ease;
}

.portal-metric-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

/* Card 1: Pastel Sky */
.portal-metric-box:nth-child(1) {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd;
}
.portal-metric-box:nth-child(1) .portal-metric-val {
  color: #0369a1;
}
.portal-metric-box:nth-child(1) .portal-metric-label {
  color: #075985;
}

/* Card 2: Pastel Lavender */
.portal-metric-box:nth-child(2) {
  background: linear-gradient(135deg, #faf5ff, #f3e8ff);
  border: 1px solid #e9d5ff;
}
.portal-metric-box:nth-child(2) .portal-metric-val {
  color: #7e22ce;
}
.portal-metric-box:nth-child(2) .portal-metric-label {
  color: #6b21a8;
}

/* Card 3: Pastel Mint */
.portal-metric-box:nth-child(3) {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
}
.portal-metric-box:nth-child(3) .portal-metric-val {
  color: #15803d;
}
.portal-metric-box:nth-child(3) .portal-metric-label {
  color: #166534;
}

.portal-metric-val {
  font-family: "Outfit", "Noto Sans Thai", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.portal-metric-val span {
  font-size: 0.82rem;
  font-weight: 700;
}

.portal-metric-label {
  font-size: 0.76rem;
  margin-top: 4px;
  line-height: 1.35;
  font-weight: 500;
}

/* Feature Spotlight Grid */
.portal-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.portal-feat-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.03);
  transition: all 0.25s ease;
  cursor: pointer;
}

.portal-feat-card:hover {
  border-color: #7dd3fc;
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.1);
}

.portal-feat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.15rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0284c7;
}

.portal-feat-card:nth-child(2) .portal-feat-icon {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #9333ea;
}

.portal-feat-card:nth-child(3) .portal-feat-icon {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}

.portal-feat-card:nth-child(4) .portal-feat-icon {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #ea580c;
}

.portal-feat-body strong {
  display: block;
  font-size: 0.88rem;
  color: #0f172a;
  font-weight: 700;
  margin-bottom: 2px;
}

.portal-feat-body p {
  margin: 0;
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.4;
}

/* Tour Action Bar */
.portal-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-btn-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0369a1;
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  border: 1px solid #7dd3fc;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.15);
  transition: all 0.22s ease;
}

.portal-btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.25);
  background: linear-gradient(135deg, #bae6fd, #7dd3fc);
}

.portal-tag-specs {
  font-size: 0.76rem;
  color: #64748b;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
}

/* --- Right Column: Luxury Light Console --- */
.portal-console {
  position: relative;
  width: 100%;
}

.portal-console-card {
  position: relative;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.07);
  padding: 24px 22px;
  overflow: hidden;
}

.portal-console-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #0ea5e9, #8b5cf6, #10b981);
}

/* Console Header */
.portal-console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.portal-terminal-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: #0369a1;
  background: #f0f9ff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #bae6fd;
  font-weight: 700;
}

.portal-secure-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #15803d;
  font-weight: 600;
}

.portal-secure-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.5);
}

.portal-console-card h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.portal-console-card p.portal-console-sub {
  margin: 0 0 16px;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
}

/* Role Filter Tabs */
.portal-role-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.portal-role-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portal-role-tab:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

.portal-role-tab.active {
  background: #ffffff;
  color: #0284c7;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Interactive User Cards Grid */
.portal-user-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.portal-user-cards::-webkit-scrollbar {
  width: 4px;
}

.portal-user-cards::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.portal-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
  width: 100%;
}

.portal-user-card:hover {
  background: #f8fafc;
  border-color: #7dd3fc;
  transform: translateX(2px);
}

.portal-user-card.active {
  background: linear-gradient(90deg, #f0f9ff, #eff6ff);
  border-color: #0284c7;
  box-shadow: 0 3px 12px rgba(2, 132, 199, 0.12);
}

.portal-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25);
}

.portal-user-avatar.admin {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  box-shadow: 0 3px 8px rgba(217, 119, 6, 0.25);
}

.portal-user-details strong {
  display: block;
  font-size: 0.88rem;
  color: #0f172a;
  font-weight: 700;
}

.portal-user-details span {
  display: block;
  font-size: 0.74rem;
  color: #334155;
  font-weight: 500;
  margin-top: 1px;
}

.portal-role-tag {
  font-size: 0.7rem;
  padding: 3px 9px;
  border-radius: 9999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.portal-role-tag.admin {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.portal-role-tag.teacher {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* Portal Login Form */
.portal-login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.portal-alert-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 500;
  animation: portalShake 0.3s ease-in-out;
}

@keyframes portalShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.portal-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.portal-form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

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

.portal-label-badge {
  font-size: 0.68rem;
  color: #0284c7;
  background: #e0f2fe;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.portal-form-hint {
  font-size: 0.7rem;
  color: #64748b;
}

.portal-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.portal-input-icon {
  position: absolute;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  pointer-events: none;
}

.portal-input-icon svg {
  width: 18px;
  height: 18px;
}

.portal-input {
  width: 100%;
  padding: 10px 38px 10px 38px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.92rem;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.portal-input:hover {
  background: #ffffff;
  border-color: #94a3b8;
}

.portal-input:focus {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.portal-input-mono {
  font-family: "JetBrains Mono", monospace, var(--font-thai);
  letter-spacing: 0.05em;
  font-size: 0.92rem;
}

.portal-input-clear {
  position: absolute;
  right: 12px;
  background: #e2e8f0;
  color: #475569;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.portal-input-clear:hover {
  background: #cbd5e1;
  color: #0f172a;
}

.portal-toggle-pwd {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.portal-toggle-pwd:hover {
  color: #0284c7;
  background: #f1f5f9;
}

.portal-toggle-pwd svg {
  width: 18px;
  height: 18px;
}

/* Demo Section */
.portal-demo-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}

.portal-demo-heading {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 8px;
}

.portal-demo-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.portal-demo-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 6px 9px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}

.portal-demo-chip:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.portal-demo-chip.active {
  background: #e0f2fe;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.15);
}

.portal-demo-chip-name {
  font-size: 0.74rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.portal-demo-chip-meta {
  font-size: 0.68rem;
  color: #64748b;
  font-family: "JetBrains Mono", monospace;
}

/* Hidden Native Select */
.portal-hidden-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  height: 0;
  width: 0;
}

/* Active Profile Security Clearance HUD */
.portal-clearance-hud {
  background: #f8fafc;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
}

.portal-clearance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.portal-clearance-title {
  font-size: 0.74rem;
  color: #0284c7;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.portal-token-badge {
  font-size: 0.7rem;
  color: #15803d;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #86efac;
  font-weight: 700;
}

.portal-scope-text {
  font-size: 0.78rem;
  color: #1e293b;
  line-height: 1.45;
  margin: 0;
}

/* Mock Security / Passcode Simulation */
.portal-passcode-box {
  margin-bottom: 18px;
}

.portal-passcode-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: #64748b;
  margin-bottom: 5px;
  font-weight: 500;
}

.portal-passcode-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.portal-passcode-mock {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 9px 12px;
  color: #0f172a;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  outline: none;
}

.portal-passcode-badge {
  position: absolute;
  right: 10px;
  font-size: 0.7rem;
  color: #15803d;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #dcfce7;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #86efac;
  font-weight: 600;
}

/* Luxury Launch Button */
.portal-launch-btn {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 11px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 40%, #2563eb 100%);
  border: none;
  cursor: pointer;
  box-shadow:
    0 6px 18px rgba(2, 132, 199, 0.28),
    0 0 20px rgba(56, 189, 248, 0.15);
  overflow: hidden;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-launch-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 24px rgba(2, 132, 199, 0.35),
    0 0 28px rgba(56, 189, 248, 0.25);
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 40%, #1d4ed8 100%);
}

.portal-launch-btn:active {
  transform: translateY(0);
}

.portal-launch-sub {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Console Footer Security Badges */
.portal-console-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

.portal-footer-pill {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* --- High-Tech Modal / Dialogs (Light Theme) --- */
.portal-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.portal-modal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.portal-modal-card {
  width: min(640px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.15);
  padding: 26px;
  color: #1e293b;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.portal-modal-overlay.is-active .portal-modal-card {
  transform: scale(1);
}

.portal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.portal-modal-close {
  background: #f1f5f9;
  border: none;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portal-modal-close:hover {
  background: #fee2e2;
  color: #dc2626;
}

.portal-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.portal-spec-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 11px 13px;
  border-radius: 9px;
}

.portal-spec-item label {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
  margin-bottom: 3px;
  font-weight: 600;
}

.portal-spec-item strong {
  display: block;
  font-size: 0.86rem;
  color: #0284c7;
}

/* Responsive */
@media (max-width: 1080px) {
  .portal-stage {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 24px 20px 36px;
  }
}

@media (max-width: 768px) {
  .portal-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
  }

  .portal-meta-bar {
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
  }

  .portal-metrics-hud {
    grid-template-columns: 1fr;
  }

  .portal-features-grid {
    grid-template-columns: 1fr;
  }

  .portal-console-card {
    padding: 22px 18px;
  }

  .portal-specs-grid {
    grid-template-columns: 1fr;
  }
}
