@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Colors */
  --primary-brand: #4B0081;
  --primary-brand-rgb: 75, 0, 129;
  --primary-tint: #f4e5ff;
  --accent-purple: #7C3AED;
  
  /* Theme Surfaces (Light Dashboard) */
  --bg-main: #F7F6FB;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --border-color: #ede9f8;
  --text-main: #0D1B3E;
  --text-muted: #6b7280;
  
  /* Status Colors */
  --color-ready: #22c55e;
  --color-near: #f59e0b;
  --color-needs: #f43f5e;
  
  /* Gradients */
  --gradient-purple: linear-gradient(135deg, var(--primary-brand) 0%, var(--accent-purple) 100%);
  --gradient-navy: linear-gradient(160deg, #0A122A 0%, #152244 55%, #1C2D5A 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.4) 100%);
  --shadow-premium: 0 10px 30px -10px rgba(75, 0, 129, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 20px 40px -15px rgba(75, 0, 129, 0.16), 0 0 0 1px rgba(75, 0, 129, 0.06);
}

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

body {
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ── VIEW SWITCHING CONTROLLER ── */
.view-container {
  display: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform: translateY(10px);
  width: 100%;
  min-height: 100vh;
}

.view-container.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* ── LOGIN VIEW ── */
.login-screen {
  background: #0d1429;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-bg-viz {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}

.login-globe-svg {
  width: 90vmin;
  height: 90vmin;
  max-width: 700px;
  max-height: 700px;
  opacity: 0.7;
}

.login-arc-anim {
  stroke-dashoffset: 0;
  animation: arcFlow 4s linear infinite;
}

.login-node-pulse {
  animation: nodePulse 2.5s ease-in-out infinite;
}

.anim-delay-1 { animation-delay: 0.8s; }
.anim-delay-2 { animation-delay: 1.6s; }
.anim-delay-3 { animation-delay: 2.4s; }

@keyframes arcFlow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -20; }
}

@keyframes nodePulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}

.login-card {
  width: 100%;
  max-width: 1080px;
  height: 640px;
  background: var(--bg-card);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  box-shadow:
    0 50px 100px -20px rgba(0, 0, 0, 0.7),
    0 30px 60px -10px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(124, 58, 237, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 1;
  transform: perspective(1200px) rotateX(1deg) translateY(-4px);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.login-card:hover {
  transform: perspective(1200px) rotateX(0.5deg) translateY(-8px);
  box-shadow:
    0 60px 120px -20px rgba(0, 0, 0, 0.75),
    0 40px 70px -10px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(124, 58, 237, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.login-left {
  width: 50%;
  background: var(--gradient-navy);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-radius: 24px 0 0 24px;
}

.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(167, 139, 250, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.login-left-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.25) 0%, transparent 70%);
  bottom: -50px;
  right: -50px;
  pointer-events: none;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.login-logo-img {
  height: 64px;
  width: auto;
  filter: brightness(0) invert(1);
}

.logo-glyph {
  width: 40px;
  height: 40px;
  background: var(--gradient-purple);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(75, 0, 129, 0.25);
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.logo-text em {
  font-style: normal;
  color: #a78bfa;
}

.badge-portal {
  background: rgba(167, 139, 250, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: #c4b5fd;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 20px;
  width: fit-content;
  margin-top: 24px;
  z-index: 2;
}

.login-left-body {
  z-index: 2;
  margin-top: auto;
  margin-bottom: auto;
}

.login-headline {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.login-headline span {
  background: linear-gradient(120deg, #a78bfa, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subhead {
  font-size: 14px;
  color: #8ba3d4;
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 340px;
}

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

.login-metric-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(10px);
}

.login-metric-val {
  font-size: 22px;
  font-weight: 800;
  color: #a78bfa;
  margin-bottom: 2px;
}

.login-metric-lbl {
  font-size: 10px;
  color: #8ba3d4;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.login-left-footer {
  z-index: 2;
  font-size: 12px;
  color: #8ba3d4;
}

.login-left-footer strong {
  color: #fff;
}

.login-right {
  flex: 1;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}


.login-right-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
}

.login-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.login-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.input-box {
  height: 48px;
  background: #f8f7fa;
  border: 1.5px solid #e8e5f0;
  border-radius: 12px;
  padding: 0 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.input-box:focus {
  border-color: var(--primary-brand);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(75, 0, 129, 0.08);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-wrap input {
  accent-color: var(--primary-brand);
  width: 15px;
  height: 15px;
}

.forgot-password {
  color: var(--primary-brand);
  font-weight: 600;
  text-decoration: none;
}

.forgot-password:hover {
  text-decoration: underline;
}

.btn-login {
  height: 50px;
  background: var(--gradient-purple);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(75, 0, 129, 0.2);
  transition: all 0.2s ease;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(75, 0, 129, 0.28);
  opacity: 0.95;
}

.btn-login:active {
  transform: translateY(1px);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 0;
}

.login-divider-line {
  flex: 1;
  height: 1px;
  background: #e8e5f0;
}

.login-divider-text {
  font-size: 11px;
  color: #b0b8c8;
  font-weight: 600;
}

.btn-sso {
  height: 48px;
  background: #ffffff;
  border: 1.5px solid #e0ddf0;
  border-radius: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary-brand);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.btn-sso:hover {
  background: var(--primary-tint);
  border-color: var(--primary-brand);
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.login-footer a {
  color: var(--primary-brand);
  font-weight: 600;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* ── INTERNAL PORTAL LAYOUT (DASHBOARD) ── */
.portal-layout {
  min-height: 100vh;
  width: 100%;
  background: var(--bg-main);
  display: flex;
}

/* Sidebar styling */
.portal-sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-logo {
  padding: 0 28px;
  margin-bottom: 40px;
}

.sidebar-logo-img {
  height: 52px;
  width: auto;
}

.sidebar-logo .logo-container {
  gap: 8px;
}

.sidebar-logo .logo-glyph {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.sidebar-logo .logo-text {
  font-size: 20px;
  color: var(--text-main);
}

.sidebar-logo .badge-portal {
  font-size: 8px;
  margin-top: 8px;
  padding: 2px 8px;
}

.sidebar-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 16px;
}

.sidebar-group-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  padding-left: 12px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  background: #f7f6fb;
  color: var(--text-main);
}

.sidebar-link.active {
  background: var(--primary-tint);
  color: var(--primary-brand);
}

.sidebar-link svg {
  stroke: currentColor;
  transition: stroke 0.2s ease;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0 16px;
}

.sidebar-user {
  background: #f8f7fa;
  border: 1px solid #ede9f8;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-purple);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.user-info {
  min-width: 0;
}

.user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Container Frame */
.portal-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
}

.portal-header {
  height: 80px;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
}

.portal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-header-action {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-header-secondary {
  background: #fff;
  border: 1px solid #ede9f8;
  color: var(--text-main);
}

.btn-header-secondary:hover {
  background: #f8f7fa;
  border-color: #ddd5f5;
}

.btn-header-logout {
  background: #fff5f5;
  border: 1px solid #fecdd3;
  color: #e11d48;
}

.btn-header-logout:hover {
  background: #ffe4e6;
}

/* ── VIEW PAGES ── */
.portal-page {
  display: none;
  padding: 40px;
  flex-direction: column;
  gap: 32px;
  flex: 1;
}

.portal-page.active {
  display: flex;
}

/* ── DASHBOARD (SEARCH & DIRECTORY) PAGE ── */
.search-bar-wrap {
  display: flex;
  gap: 12px;
  width: 100%;
}

.search-box-container {
  position: relative;
  flex: 1;
}

.search-input-field {
  width: 100%;
  height: 52px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 0 20px 0 52px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  color: var(--text-main);
  outline: none;
  box-shadow: var(--shadow-premium);
  transition: all 0.2s ease;
}

.search-input-field:focus {
  border-color: var(--primary-brand);
  box-shadow: 0 12px 28px -8px rgba(75, 0, 129, 0.1);
}

.search-icon-svg {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-label-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.filter-chip {
  height: 32px;
  padding: 0 16px;
  border-radius: 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: 1px solid #e8e5f0;
  background: #ffffff;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background: #fcfbfe;
  border-color: #c4b5fd;
}

.filter-chip.active {
  background: var(--primary-tint);
  border-color: var(--primary-brand);
  color: var(--primary-brand);
}

.filter-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

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

.results-count {
  font-size: 14px;
  color: var(--text-muted);
}

.results-count strong {
  color: var(--text-main);
}

/* Candidate Grid Cards */
.candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.candidate-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-premium);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.candidate-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-brand);
  box-shadow: var(--shadow-hover);
}

.candidate-card-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.candidate-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.candidate-avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}

.candidate-header-text {
  min-width: 0;
  flex: 1;
}

.candidate-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.candidate-title {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.candidate-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 4px;
  width: fit-content;
}

.candidate-status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.candidate-status-badge.status-ready {
  background: #f0fdf4;
  color: var(--color-ready);
  border: 1px solid #bbf7d0;
}

.candidate-status-badge.status-ready::before {
  background: var(--color-ready);
}

.candidate-status-badge.status-near {
  background: #fffbeb;
  color: var(--color-near);
  border: 1px solid #fde68a;
}

.candidate-status-badge.status-near::before {
  background: var(--color-near);
}

.candidate-status-badge.status-needs {
  background: #fff1f2;
  color: var(--color-needs);
  border: 1px solid #fecdd3;
}

.candidate-status-badge.status-needs::before {
  background: var(--color-needs);
}

.candidate-score-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  background: #faf9fd;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  padding: 12px;
}

.score-meta-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.score-meta-desc {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}

.circular-score {
  position: relative;
  width: 56px;
  height: 56px;
}

.circular-score svg {
  transform: rotate(-90deg);
}

.circular-score-bg {
  fill: none;
  stroke: #ede9f8;
  stroke-width: 4;
}

.circular-score-bar {
  fill: none;
  stroke: var(--primary-brand);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s;
}

.circular-score-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.candidate-card-dims {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

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

.dim-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.dim-prog-bar {
  width: 140px;
  height: 6px;
  background: #f0eef8;
  border-radius: 4px;
  overflow: hidden;
}

.dim-prog-fill {
  height: 100%;
  border-radius: 4px;
}

/* ── CANDIDATE PROFILE DETAILS PAGE ── */
.btn-back {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  box-shadow: var(--shadow-premium);
  transition: all 0.2s ease;
}

.btn-back:hover {
  border-color: var(--primary-brand);
  background: #faf9ff;
}

.profile-hero {
  background: linear-gradient(135deg, #fcfbfe 0%, #f3eeff 100%);
  border: 1.5px solid var(--border-color);
  border-radius: 24px;
  padding: 36px 40px;
  box-shadow: 0 8px 32px rgba(75, 0, 129, 0.06), 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  gap: 28px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-brand), #7c3aed, #a78bfa);
  border-radius: 24px 24px 0 0;
}

.profile-hero-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  font-size: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(75, 0, 129, 0.18);
  border: 3px solid white;
  flex-shrink: 0;
}

.profile-hero-avatar-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(75, 0, 129, 0.18);
  border: 3px solid white;
  flex-shrink: 0;
}

.profile-hero-info {
  flex: 1;
}

.profile-name {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.profile-metadata-row {
  display: flex;
  gap: 14px;
  color: var(--text-muted);
  font-size: 13px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-meta-dot {
  width: 4px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 50%;
}

.profile-meta-id {
  color: var(--primary-brand);
  font-weight: 700;
  background: rgba(75, 0, 129, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.profile-hero-score {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: white;
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.profile-score-number {
  font-size: 44px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-brand), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-score-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

/* Page Navigation Tabs */
.profile-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  gap: 32px;
}

.profile-tab {
  padding: 12px 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.profile-tab:hover {
  color: var(--text-main);
}

.profile-tab.active {
  color: var(--primary-brand);
  font-weight: 700;
}

.profile-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-brand);
  border-radius: 2px;
}

/* Tab Views */
.tab-content-page {
  display: none;
}

.tab-content-page.active {
  display: block;
}

/* Overview Tab Grid Layout */
.profile-overview-grid {
  display: grid;
  grid-template-columns: 2fr 1.3fr;
  gap: 24px;
}

.overview-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
}

.overview-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Rec / Insight details */
.recommendation-box {
  background: #fbf9ff;
  border-left: 4px solid var(--primary-brand);
  border-radius: 0 12px 12px 0;
  padding: 16px;
  margin-bottom: 20px;
}

.recommendation-heading {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary-brand);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.recommendation-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main);
}

.detailed-analysis-text {
  font-size: 14px;
  line-height: 1.6;
  color: #4a5568;
}

.detailed-analysis-text p {
  margin-bottom: 12px;
}

.detailed-analysis-text strong {
  color: var(--text-main);
}

/* Dimension Meter in details */
.dim-bars-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dim-bar-widget {
  background: #fbfbfb;
  border: 1px solid #f0eef8;
  border-radius: 12px;
  padding: 16px;
}

.dim-bar-widget-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.dim-bar-widget-progress {
  height: 8px;
  background: #f0eef8;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.dim-bar-widget-fill {
  height: 100%;
  border-radius: 4px;
}

.dim-bar-widget-description {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ── TAB: SCENARIOS PRACTICED ── */
.scenario-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scenario-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scenario-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.scenario-heading-left {
  display: flex;
  gap: 12px;
}

.scenario-icon-status {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scenario-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.scenario-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.scenario-score-ring {
  background: #f8f7fa;
  border: 1px solid #ede9f8;
  border-radius: 12px;
  padding: 6px 14px;
  text-align: center;
}

.scenario-score-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-brand);
}

.scenario-score-lbl {
  font-size: 8px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.scenario-description {
  font-size: 13.5px;
  color: #4a5568;
  line-height: 1.5;
  background: #fbfbfd;
  padding: 12px 16px;
  border-radius: 10px;
  border-left: 2px solid #ddd;
}

.scenario-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.scenario-metric-box {
  background: #fcfbfe;
  border: 1px solid #f0eef8;
  border-radius: 12px;
  padding: 10px 12px;
}

.scenario-metric-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.scenario-metric-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.scenario-feedback {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 12px;
  padding: 14px 16px;
}

.scenario-feedback-heading {
  font-size: 12px;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.scenario-feedback-text {
  font-size: 13px;
  color: #14532d;
  line-height: 1.4;
}

/* ── TAB: DYNAMIC SIMULATION PLAYGROUND (WHAT-IF LAYER) ── */
.simulation-layout {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 24px;
}

.simulation-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-group {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-premium);
}

.control-group-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
}

.control-pill-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-pill {
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid #e8e5f0;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.control-pill:hover {
  background: #fbfbfd;
  border-color: var(--primary-brand);
}

.control-pill.active {
  background: var(--primary-tint);
  border-color: var(--primary-brand);
}

.control-pill-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.control-pill.active .control-pill-radio {
  border-color: var(--primary-brand);
  background: #ffffff;
}

.control-pill.active .control-pill-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-brand);
}

.control-pill-text {
  min-width: 0;
}

.control-pill-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.control-pill-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.simulation-results-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sim-output-card {
  background: var(--gradient-navy);
  color: #ffffff;
  border-radius: 24px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(13, 27, 62, 0.25);
}

.sim-output-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(167, 139, 250, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.sim-output-card-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  position: relative;
  z-index: 2;
}

.sim-outcome-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 32px;
}

.sim-outcome-score-ring {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 12px;
}

.sim-outcome-score-ring svg {
  transform: rotate(-90deg);
}

.sim-outcome-score-num {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sim-score-big {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.sim-score-delta {
  font-size: 11px;
  font-weight: 700;
  color: #22c55e;
  margin-top: 2px;
}

.sim-outcome-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 12px;
  border-radius: 20px;
}

.sim-outcome-badge.status-ready {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.sim-outcome-badge.status-near {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.sim-outcome-badge.status-needs {
  background: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.sim-details-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sim-details-title {
  font-size: 13px;
  font-weight: 700;
  color: #a78bfa;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.sim-details-impact-desc {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 12px;
}

.sim-details-cost-line {
  font-size: 13.5px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-details-cost-line strong {
  color: #ffffff;
  font-weight: 700;
}

/* Simulated trajectory graph */
.sim-chart-card {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-premium);
}

.sim-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.sim-chart-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.sim-chart-legend {
  display: flex;
  gap: 16px;
  font-size: 11px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.legend-color {
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

.sim-svg-canvas {
  width: 100%;
  height: 180px;
}

.sim-svg-canvas path {
  transition: d 0.5s ease-out;
}

.sim-svg-canvas circle {
  transition: cy 0.5s ease-out;
}

/* ── LANGUAGE REPORT (AGGREGATE POLICY) PAGE ── */
.report-grid-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bento-card {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-premium);
  position: relative;
  overflow: hidden;
}

.bento-card.dark-card {
  background: var(--gradient-navy);
  color: #ffffff;
}

.bento-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.dark-card .bento-card-title {
  color: #a78bfa;
}

.bento-stat-val {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 8px;
}

.dark-card .bento-stat-val {
  color: #ffffff;
}

.bento-stat-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.dark-card .bento-stat-desc {
  color: #cbd5e1;
}

.bento-card-fullrow {
  grid-column: span 3;
}

.report-table-card {
  padding: 0;
}

.report-table-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-table-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.portal-table th {
  padding: 16px 24px;
  background: #fbfbfd;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1.5px solid var(--border-color);
}

.portal-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13.5px;
  color: var(--text-main);
}

.portal-table tr:last-child td {
  border-bottom: none;
}

.portal-table tr:hover td {
  background: #fcfcfe;
}

.table-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
}

.table-status-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.table-status-pill.status-high::before {
  background: var(--color-needs);
}

.table-status-pill.status-med::before {
  background: var(--color-near);
}

.table-status-pill.status-low::before {
  background: var(--color-ready);
}

.table-prog-bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-prog-value {
  font-weight: 700;
  width: 32px;
}

.table-prog-bar {
  flex: 1;
  height: 6px;
  background: #f0eef8;
  border-radius: 4px;
  overflow: hidden;
  max-width: 180px;
}

.table-prog-fill {
  height: 100%;
  border-radius: 4px;
}

/* ── DASHBOARD OVERVIEW ── */
.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.dash-kpi-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-premium);
}

.dash-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-kpi-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.dash-kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  grid-template-rows: auto auto;
  gap: 20px;
}

.dash-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-premium);
}

.dash-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dash-gauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dash-gauge-wrap {
  position: relative;
  width: 200px;
  height: 120px;
  margin-bottom: 12px;
}

.dash-gauge-svg {
  width: 100%;
  height: 100%;
}

.dash-gauge-svg path:last-of-type {
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-gauge-center {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.dash-gauge-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.dash-gauge-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.dash-gauge-footer {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 12px;
  color: var(--text-muted);
}

.dash-gauge-footer strong {
  color: var(--color-ready);
}

.dash-gauge-gap {
  color: var(--color-near);
  font-weight: 600;
}

/* Heatmap */
.dash-heatmap-card {
  grid-column: 2;
  grid-row: 1;
}

.dash-heatmap-grid {
  display: grid;
  grid-template-columns: 120px repeat(4, 1fr);
  gap: 4px;
}

.dash-heatmap-grid .heat-header {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 6px 8px;
  text-align: center;
}

.dash-heatmap-grid .heat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  padding: 8px;
  display: flex;
  align-items: center;
}

.dash-heatmap-grid .heat-cell {
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-heatmap-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.heat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

/* Activity */
.dash-activity-card {
  grid-column: 1 / -1;
}

.dash-activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fbfbfd;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.dash-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-activity-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-main);
}

.dash-activity-text strong {
  font-weight: 700;
}

.dash-activity-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

/* ── COMPARE PAGE ── */
.compare-header {
  margin-bottom: 8px;
}

.compare-instruction {
  font-size: 14px;
  color: var(--text-muted);
}

.compare-selectors {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
}

.compare-select-wrap {
  flex: 1;
}

.compare-select {
  width: 100%;
  height: 48px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 0 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  appearance: none;
  cursor: pointer;
  outline: none;
  margin-top: 6px;
}

.compare-select:focus {
  border-color: var(--primary-brand);
}

.compare-vs {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-muted);
  padding-bottom: 12px;
}

.compare-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.compare-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border: 1.5px dashed var(--border-color);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.compare-col {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-premium);
}

.compare-col-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.compare-col-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.compare-col-avatar-fallback {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}

.compare-col-name {
  font-size: 16px;
  font-weight: 700;
}

.compare-col-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.compare-score-big {
  text-align: center;
  margin-bottom: 20px;
}

.compare-score-num {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.compare-score-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.compare-dims {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compare-dim-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compare-dim-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  width: 100px;
  flex-shrink: 0;
}

.compare-dim-bar-wrap {
  flex: 1;
  height: 8px;
  background: #f0eef8;
  border-radius: 4px;
  overflow: hidden;
}

.compare-dim-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.compare-dim-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  width: 32px;
  text-align: right;
}

/* ── ANIMATED NUMBERS ── */
.animate-count {
  transition: none;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.visible {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  position: relative;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #f3f4f6;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close-btn:hover {
  background: #e5e7eb;
}

/* ── TOAST NOTIFICATION ── */
.toast-notification {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--gradient-navy);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  max-width: 400px;
}

.toast-notification.visible {
  transform: translateY(0);
  opacity: 1;
}

/* ── ADVISORY DISCLAIMER ── */
.advisory-disclaimer {
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.22);
  border-radius: 9px;
  padding: 9px 13px;
  font-size: 11.5px;
  color: #92400e;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  line-height: 1.45;
}

.advisory-disclaimer svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.advisory-disclaimer-sim {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: #cbd5e1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  position: relative;
  z-index: 2;
  margin-top: 16px;
  line-height: 1.45;
}

.advisory-disclaimer-sim svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── SCORE RANGE ── */
.sim-score-range {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  margin-top: 1px;
  letter-spacing: 0.02em;
}

/* ── MATCHMAKING CARD ── */
.matchmaking-full-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-premium);
}

.matchmaking-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.matchmaking-card-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.matchmaking-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.matchmaking-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: #fbfbfd;
  transition: border-color 0.2s ease;
}

.matchmaking-row.top-match {
  background: var(--primary-tint);
  border-color: var(--primary-brand);
}

.matchmaking-rank {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  width: 22px;
  flex-shrink: 0;
  text-align: center;
}

.matchmaking-country {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  min-width: 130px;
}

.matchmaking-note {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.35;
}

.matchmaking-score {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-brand);
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* ── DOWNLOAD BUTTON ── */
.btn-download {
  height: 40px;
  padding: 0 20px;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-purple);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(75,0,129,0.22);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-download:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(75,0,129,0.3);
}

/* ── REPORT PAGE HEADER ROW ── */
.report-page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.report-page-header-desc {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Responsive fixes */
/* ── RESPONSIVE: TABLET (≤900px) ── */
@media (max-width: 900px) {
  .login-card {
    flex-direction: column;
    height: auto;
    max-width: 480px;
    transform: none;
  }
  .login-card:hover {
    transform: none;
  }
  .login-left {
    width: 100%;
    height: auto;
    min-height: 180px;
    padding: 28px 28px 20px;
    border-radius: 24px 24px 0 0;
  }
  .login-left-body {
    margin-bottom: 0;
  }
  .login-headline {
    font-size: 20px;
  }
  .login-subhead {
    font-size: 12px;
    display: none;
  }
  .login-metrics {
    display: none;
  }
  .login-left-footer {
    display: none;
  }
  .login-right {
    width: 100%;
    padding: 28px;
  }
  .login-bg-viz {
    display: none;
  }
  .portal-layout {
    flex-direction: column;
  }
  .portal-sidebar {
    width: 100%;
    height: auto;
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    position: relative;
  }
  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
    padding: 8px 0;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar-group {
    flex-direction: row;
    gap: 4px;
  }
  .sidebar-group-label {
    display: none;
  }
  .sidebar-link {
    padding: 8px 12px;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 8px;
  }
  .sidebar-link svg {
    display: none;
  }
  .sidebar-logo {
    margin-bottom: 8px;
  }
  .sidebar-logo-img {
    height: 32px;
  }
  .sidebar-footer {
    display: none;
  }
  .portal-main {
    width: 100%;
  }
  .portal-header {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .portal-title {
    font-size: 16px;
    width: 100%;
  }
  .header-right {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .btn-header-action {
    font-size: 11px;
    padding: 6px 12px;
  }
  .portal-page {
    padding: 16px;
  }
  .report-page-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .dash-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-bottom-row {
    grid-template-columns: 1fr;
  }
  .profile-hero {
    flex-direction: column;
    text-align: center;
    padding: 24px;
    gap: 16px;
  }
  .profile-hero-actions {
    align-items: center;
    margin-left: 0;
  }
  .profile-hero-score {
    justify-content: center;
  }
  .profile-tabs {
    overflow-x: auto;
    gap: 0;
    padding-bottom: 2px;
  }
  .profile-tab {
    white-space: nowrap;
    font-size: 12px;
    padding: 10px 14px;
  }
  .profile-overview-grid, .simulation-layout {
    grid-template-columns: 1fr;
  }
  .prediction-body {
    flex-direction: column;
    gap: 20px;
  }
  .prediction-details {
    flex-direction: row;
    min-width: unset;
  }
  .report-grid-bento {
    grid-template-columns: 1fr;
  }
  .bento-card-fullrow {
    grid-column: span 1;
  }
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .search-bar-container {
    flex-wrap: wrap;
  }
  .candidates-grid {
    grid-template-columns: 1fr;
  }
  .matchmaking-list {
    grid-template-columns: 1fr;
  }
}

/* ── RESPONSIVE: MOBILE (≤600px) ── */
@media (max-width: 600px) {
  .login-screen {
    padding: 0;
    align-items: stretch;
    background: #fff;
  }
  .login-card {
    max-width: 100%;
    border-radius: 0;
    min-height: 100vh;
    min-height: 100dvh;
    transform: none;
    box-shadow: none;
    flex-direction: column;
  }
  .login-card:hover {
    transform: none;
    box-shadow: none;
  }
  .login-left {
    width: 100%;
    height: auto;
    padding: 24px 24px 16px;
    border-radius: 0;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
  }
  .login-left-glow {
    display: none;
  }
  .login-left-body {
    display: none;
  }
  .login-left-footer {
    display: none;
  }
  .badge-portal {
    font-size: 9px;
    padding: 3px 8px;
    margin: 0;
  }
  .logo-container {
    margin-bottom: 0;
  }
  .login-logo-img {
    height: 32px;
  }
  .login-right {
    width: 100%;
    padding: 28px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .login-right-content {
    max-width: 100%;
  }
  .login-title {
    font-size: 24px;
  }
  .login-desc {
    font-size: 13px;
    margin-bottom: 20px;
  }
  .input-group {
    margin-bottom: 14px;
  }
  .input-box {
    padding: 14px 16px;
    font-size: 15px;
  }
  .form-actions {
    margin-bottom: 16px;
  }
  .btn-login {
    padding: 16px;
    font-size: 15px;
    border-radius: 12px;
  }
  .login-divider {
    margin: 16px 0;
  }
  .btn-sso {
    padding: 14px;
    border-radius: 12px;
  }
  .login-footer-text {
    margin-top: 16px;
    font-size: 13px;
  }
  .portal-header {
    padding: 12px 16px;
  }
  .portal-title {
    font-size: 16px;
  }
  .btn-header-action {
    font-size: 11px;
    padding: 6px 10px;
  }
  .portal-page {
    padding: 14px;
  }
  .portal-header {
    padding: 10px 14px;
    gap: 6px;
  }
  .portal-title {
    font-size: 15px;
    width: auto;
    flex: 1;
  }
  .header-right {
    gap: 6px;
  }
  .btn-header-secondary {
    display: none;
  }
  .profile-hero {
    padding: 20px 16px;
    border-radius: 14px;
  }
  .profile-name {
    font-size: 20px;
  }
  .profile-metadata-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  .profile-meta-dot {
    display: none;
  }
  .profile-tabs {
    margin: 16px 0;
  }
  .overview-card {
    padding: 18px;
  }
  .prediction-card {
    padding: 16px;
  }
  .prediction-details {
    flex-direction: column;
    gap: 12px;
  }
  .prediction-detail-val {
    font-size: 15px;
  }
  .btn-reserve {
    width: 100%;
    justify-content: center;
  }
  .scenario-card {
    padding: 16px;
  }
  .sim-controls-grid {
    grid-template-columns: 1fr;
  }
  .search-bar-container {
    gap: 8px;
  }
  .filter-chip {
    font-size: 11px;
    padding: 5px 10px;
  }
  .candidate-card {
    padding: 16px;
  }
  .compare-selectors {
    flex-direction: column;
    gap: 12px;
  }
  .compare-vs {
    text-align: center;
    padding: 0;
  }
  .compare-select {
    height: 44px;
    font-size: 13px;
  }
  .compare-result {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .compare-col {
    padding: 18px;
  }
  .compare-col-name {
    font-size: 14px;
  }
  .compare-score-num {
    font-size: 32px;
  }
  .compare-dim-label {
    width: 80px;
    font-size: 11px;
  }
  .compare-dim-val {
    font-size: 12px;
  }
  .portal-sidebar {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
  }
  .sidebar-logo {
    order: -1;
    position: absolute;
    right: 12px;
    top: 10px;
    margin: 0;
  }
  .sidebar-logo .badge-portal {
    display: none;
  }
  .sidebar-logo-img {
    height: 26px;
  }
  .sidebar-link {
    padding: 6px 10px;
    font-size: 10px;
  }
  .report-page-header-row {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-download {
    width: 100%;
    justify-content: center;
  }
  .report-table-card {
    padding: 14px;
    overflow: hidden;
  }
  .report-table-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  .report-table-title {
    font-size: 14px;
  }
  .portal-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 11px;
  }
  .portal-table th {
    padding: 8px 10px;
    font-size: 9px;
    white-space: nowrap;
  }
  .portal-table td {
    padding: 10px;
    font-size: 11px;
    min-width: 80px;
  }
  .portal-table td:first-child {
    min-width: 110px;
  }
  .bento-card {
    padding: 16px;
  }
  .bento-stat-val {
    font-size: 32px;
  }
  .dash-kpi-row {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .dash-kpi-card {
    min-width: 130px;
    padding: 12px 14px;
    gap: 10px;
    flex-shrink: 0;
  }
  .dash-kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .dash-kpi-icon svg {
    width: 16px;
    height: 16px;
  }
  .dash-kpi-val {
    font-size: 20px;
  }
  .dash-kpi-label {
    font-size: 9px;
  }
  .dash-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .dash-card {
    padding: 16px;
  }
  .dash-card-title {
    font-size: 12px;
  }
  .dash-heatmap-card {
    grid-column: 1;
    grid-row: auto;
    overflow-x: auto;
  }
  .dash-heatmap-grid {
    grid-template-columns: 80px repeat(4, 60px);
    min-width: 320px;
  }
  .dash-heatmap-grid .heat-header {
    font-size: 8px;
  }
  .dash-heatmap-grid .heat-label {
    font-size: 10px;
  }
  .dash-heatmap-grid .heat-cell {
    font-size: 11px;
    padding: 6px;
    min-height: 32px;
  }
  .dash-heatmap-legend {
    gap: 8px;
    font-size: 9px;
    flex-wrap: wrap;
  }
  .dash-activity-item {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }
  .dash-activity-text {
    font-size: 12px;
    flex-basis: calc(100% - 28px);
  }
  .dash-activity-time {
    font-size: 10px;
    margin-left: 20px;
  }
  .dash-gauge-card {
    padding: 16px;
  }
  .reserved-section {
    padding: 16px;
  }
  .reserved-row {
    grid-template-columns: 36px 1fr auto auto;
    gap: 10px;
    padding: 10px 12px;
  }
  .reserved-avatar, .reserved-avatar-fallback {
    width: 36px;
    height: 36px;
  }
  .reserved-empty {
    padding: 14px;
    font-size: 12px;
  }
}

/* ── READINESS PREDICTION CARD ── */
.prediction-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 24px;
  margin-top: 20px;
  box-shadow: var(--shadow-premium);
}

.prediction-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.prediction-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.prediction-status {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prediction-body {
  display: flex;
  gap: 32px;
  align-items: center;
}

.prediction-chart {
  flex: 1;
}

.prediction-chart svg {
  width: 100%;
  height: auto;
}

.prediction-chart-labels {
  display: flex;
  justify-content: space-between;
  padding: 4px 20px 0;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
}

.prediction-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 160px;
}

.prediction-detail-item {
  text-align: center;
}

.prediction-detail-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.prediction-detail-lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

.prediction-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-style: italic;
}

/* ── PLACE ON RESERVE BUTTON ── */
.profile-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  margin-left: auto;
}

.btn-reserve {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: rgba(124,58,237,0.12);
  border: 1.5px solid rgba(124,58,237,0.4);
  border-radius: 10px;
  color: #a78bfa;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-reserve:hover {
  background: rgba(124,58,237,0.2);
  border-color: #7c3aed;
  transform: translateY(-1px);
}

.btn-reserve.reserved {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.4);
  color: #22c55e;
}

.btn-reserve.reserved:hover {
  background: rgba(34,197,94,0.2);
  border-color: #22c55e;
}

/* ── RESERVED CANDIDATES SECTION ── */
.reserved-section {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: var(--shadow-premium);
}

.reserved-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.reserved-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.reserved-count {
  background: rgba(124,58,237,0.15);
  color: #a78bfa;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.reserved-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reserved-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
}

.reserved-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: background 0.15s ease;
}

.reserved-row:hover {
  background: rgba(124,58,237,0.05);
}

.reserved-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.reserved-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
}

.reserved-info {
  flex: 1;
}

.reserved-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.reserved-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.reserved-eta {
  text-align: center;
  min-width: 48px;
}

.reserved-eta-val {
  font-size: 16px;
  font-weight: 700;
  color: #f59e0b;
}

.reserved-eta-lbl {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reserved-remove-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244,63,94,0.1);
  border: none;
  border-radius: 6px;
  color: #f43f5e;
  cursor: pointer;
  transition: background 0.15s ease;
}

.reserved-remove-btn:hover {
  background: rgba(244,63,94,0.2);
}
