/* =====================================================
   Aviation License™ — Dashboard Styles
   ===================================================== */

/* ── Dashboard Layout ────────────────────────────── */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────── */
.dashboard-sidebar {
  width: 260px;
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.98), rgba(5, 13, 26, 0.99));
  border-right: 1px solid rgba(0, 212, 255, 0.08);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: var(--z-sticky);
  transition: transform var(--transition-base);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--color-accent-500);
  letter-spacing: -0.02em;
}

.sidebar-menu {
  flex: 1;
  list-style: none;
  padding: var(--space-4) var(--space-3);
  overflow-y: auto;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--color-gray-400);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: var(--space-1);
}

.sidebar-item:hover {
  background: rgba(0, 212, 255, 0.06);
  color: var(--color-gray-200);
}

.sidebar-item.active {
  background: var(--color-accent-glow);
  color: var(--color-accent-500);
  font-weight: var(--font-semibold);
}

.sidebar-item span {
  font-size: 0.7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-width: 3.25rem;
  flex-shrink: 0;
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
}

.sidebar-footer {
  padding: var(--space-4) var(--space-4) var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-500), var(--color-gold-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-bold);
  color: var(--color-primary-900);
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.sidebar-user-info {
  overflow: hidden;
}

.sidebar-user-name {
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  color: var(--color-gray-500);
  font-size: var(--text-xs);
}

/* ── Main Content ────────────────────────────────── */
.dashboard-main {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Bar ─────────────────────────────────────── */
.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-8);
  background: rgba(5, 13, 26, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: var(--z-base);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.topbar-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--color-white);
}

.sidebar-toggle {
  display: none;
  font-size: 1.3rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-gray-300);
  font-size: var(--text-sm);
}

.notification-btn {
  position: relative;
  font-size: 1.2rem;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-danger);
  color: white;
  font-size: 10px;
  font-weight: var(--font-bold);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Dashboard Content ───────────────────────────── */
.dashboard-content {
  flex: 1;
  padding: var(--space-8);
}

/* ── Stats Grid ──────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
}

.stat-card {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(20, 42, 66, 0.4), rgba(10, 22, 40, 0.6));
  border: 1px solid rgba(0, 212, 255, 0.08);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-info {
  flex: 1;
}

.stat-number {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--color-white);
  line-height: 1;
}

.stat-label {
  color: var(--color-gray-400);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
}

.stat-trend {
  position: absolute;
  bottom: var(--space-4);
  right: var(--space-6);
  font-size: var(--text-xs);
  color: var(--color-gray-500);
}

.stat-trend.positive { color: var(--color-success); }
.stat-trend.warning { color: var(--color-warning); }

/* ── Data Tables ─────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  color: var(--color-gray-400);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table td {
  padding: var(--space-4);
  color: var(--color-gray-300);
  font-size: var(--text-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(0, 212, 255, 0.03);
}

.table-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  flex-shrink: 0;
}

/* ── Info Grid ───────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.info-label {
  font-size: var(--text-xs);
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value {
  font-size: var(--text-sm);
  color: var(--color-gray-200);
  font-weight: var(--font-medium);
}

/* ── Org Grid ────────────────────────────────────── */
.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-6);
}

.org-card {
  transition: all var(--transition-base);
}

.org-card:hover {
  border-color: rgba(0, 212, 255, 0.2);
  transform: translateY(-4px);
}

/* ── Dashboard Grid ──────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

/* ── Notification List ───────────────────────────── */
.notification-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.notification-item {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  transition: background var(--transition-fast);
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.notification-item.read {
  opacity: 0.6;
}

.notification-title {
  color: var(--color-white);
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
}

.notification-message {
  color: var(--color-gray-400);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.notification-time {
  color: var(--color-gray-600);
  font-size: var(--text-xs);
  margin-top: var(--space-2);
}

/* ── Responsive Dashboard ────────────────────────── */
@media (max-width: 1024px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
  }

  .dashboard-sidebar.open {
    transform: translateX(0);
  }

  .dashboard-main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: block !important;
  }
}

@media (max-width: 768px) {
  .dashboard-content {
    padding: var(--space-4);
  }

  .dashboard-topbar {
    padding: var(--space-3) var(--space-4);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .org-grid {
    grid-template-columns: 1fr;
  }

  .topbar-user span:first-child {
    display: none;
  }
}

/* ── JCAA portal home ────────────────────────────── */
body.portal-mode {
  background: #f4f7fb;
}

body.portal-mode .stars-container {
  display: none;
}

body.portal-mode #dashboardPage {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  background: #f4f7fb;
}

.jcaa-shell .dashboard-sidebar {
  width: 240px;
  background: linear-gradient(180deg, #12325c 0%, #0c2344 100%);
  border-right: none;
}

.jcaa-shell .dashboard-main {
  margin-left: 240px;
  background: #f4f7fb;
}

.jcaa-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
}

.jcaa-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.jcaa-mark-lg {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e8eef6;
}

.page-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.page-stat-card {
  background: #fff;
  border: 1px solid #d5deea;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  box-shadow: 0 4px 14px rgba(15, 39, 68, 0.06);
}

.page-stat-card strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1.1;
  color: #0f2744;
  margin-bottom: 0.2rem;
}

.page-stat-card span {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}

.dashboard-content.is-inner .page-stat-card {
  background: rgba(255, 255, 255, 0.92);
}

.sidebar-brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 18px 12px;
}

.sidebar-brand-sub {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
}

.jcaa-shell .sidebar-brand {
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.1;
}

.jcaa-shell .sidebar-item {
  color: rgba(232, 240, 250, 0.88);
  border-radius: 10px;
  margin: 2px 8px;
  padding: 11px 12px;
}

.jcaa-shell .sidebar-item span.nav-label {
  font-family: inherit;
  font-size: 0.92rem;
  min-width: 0;
  text-align: left;
  color: inherit;
}

.jcaa-shell .sidebar-item.active,
.jcaa-shell .sidebar-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-ico {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nav-svg {
  width: 22px;
  height: 22px;
}

.nav-ico--home { color: #7dd3fc; background: rgba(56, 189, 248, 0.16); }
.nav-ico--apps { color: #93c5fd; background: rgba(59, 130, 246, 0.18); }
.nav-ico--exam { color: #fcd34d; background: rgba(245, 158, 11, 0.18); }
.nav-ico--lic { color: #6ee7b7; background: rgba(16, 185, 129, 0.16); }
.nav-ico--doc { color: #fdba74; background: rgba(249, 115, 22, 0.16); }
.nav-ico--org { color: #67e8f9; background: rgba(6, 182, 212, 0.16); }
.nav-ico--users { color: #86efac; background: rgba(34, 197, 94, 0.16); }
.nav-ico--user { color: #c4b5fd; background: rgba(99, 102, 241, 0.16); }
.nav-ico--set { color: #fde68a; background: rgba(234, 179, 8, 0.16); }
.nav-ico--audit { color: #fca5a5; background: rgba(239, 68, 68, 0.14); }

.jcaa-shell .sidebar-item:hover .nav-ico,
.jcaa-shell .sidebar-item.active .nav-ico {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.nav-dot {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

.sidebar-slogan {
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
}

.sidebar-slogan strong {
  color: #fff;
  font-size: 0.95rem;
}

.jcaa-shell .dashboard-topbar {
  background: #fff;
  border-bottom: 1px solid #e6edf5;
  padding: 14px 28px;
}

.brand-title {
  color: #0f2744;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
}

.brand-sub {
  color: #64748b;
  font-size: 0.78rem;
}

.topbar-brand,
.jcaa-shell .topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.jcaa-shell .topbar-user {
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}

.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1d4e89;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  overflow: hidden;
  object-fit: cover;
}

.topbar-avatar-img {
  padding: 0;
  display: block;
}

.profile-avatar-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.profile-avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  background: #1d4e89;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
}

.profile-avatar-empty {
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.report-metric {
  background: rgba(15, 39, 68, 0.04);
  border: 1px solid #e6edf5;
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.report-metric-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f2744;
}

.report-metric-time {
  font-size: 1rem;
}

.report-summary-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.report-summary-sections h4 {
  margin: 0 0 0.5rem;
  color: #0f2744;
  font-size: 0.95rem;
}

.report-mini-table {
  margin: 0;
}

.verify-link-box .verify-link-url {
  display: block;
  word-break: break-all;
  font-size: 0.82rem;
  color: #0f2744;
  background: rgba(15, 39, 68, 0.04);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
}

.exam-schedule-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem;
}

.exam-schedule-card h3 {
  margin: 0.25rem 0 0.5rem;
  color: #0f2744;
}

.notif-unread td {
  font-weight: 600;
}

.topbar-user-meta {
  display: flex;
  flex-direction: column;
}

.topbar-user-name {
  color: #0f2744;
  font-weight: 600;
  font-size: 0.88rem;
}

.topbar-user-role {
  color: #64748b;
  font-size: 0.75rem;
}

.jcaa-shell .notification-btn {
  color: #1d4e89;
  background: #f4f7fb;
  border-radius: 10px;
  width: 40px;
  height: 40px;
}

.portal-logout {
  border-color: #d7e2ee;
}

.inner-heading {
  padding: 18px 28px 0;
}

.inner-heading-title {
  color: #0f2744;
  font-size: 1.35rem;
}

.dashboard-content.is-inner {
  background: transparent;
  color: #0f2744;
  --color-white: #0f2744;
  --color-gray-100: #334155;
  --color-gray-200: #1e293b;
  --color-gray-300: #334155;
  --color-gray-400: #475569;
  --color-gray-500: #64748b;
  --glass-bg: #ffffff;
  --glass-border: #e6edf5;
  --glass-shadow: 0 8px 24px rgba(15, 39, 68, 0.05);
}

.dashboard-content.is-inner .glass-card,
.dashboard-content.is-inner .card {
  background: #fff;
  color: #0f2744;
  border: 1px solid #e6edf5;
  box-shadow: var(--glass-shadow);
}

.dashboard-content.is-inner .btn-primary,
.dashboard-content.is-inner .btn-gold,
.dashboard-content.is-inner .btn-danger {
  --color-white: #ffffff;
  --color-primary-900: #071525;
}

.dashboard-content.is-inner .data-table th,
.dashboard-content.is-inner .data-table td {
  color: #1e293b;
  border-bottom-color: #e6edf5;
}

.dashboard-content.is-inner .data-table th {
  color: #64748b;
}

.dashboard-content.is-inner .req-field,
.dashboard-content.is-inner .form-label,
.dashboard-content.is-inner .card-header,
.dashboard-content.is-inner .card-header h3 {
  color: #0f2744;
}

.dashboard-content.is-inner select.form-control,
.dashboard-content.is-inner select.form-input,
.dashboard-content.is-inner textarea.form-control,
.dashboard-content.is-inner input.form-control,
.dashboard-content.is-inner input.form-input,
.dashboard-content.is-inner textarea.form-input {
  color: #f8fafc;
  background-color: #12263f;
}

.step-guide {
  background: #eef5ff;
  border: 1px solid #c9daf3;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  color: #0f2744;
}

.step-guide ol {
  margin: 8px 0 0 1.2rem;
}

.topbar-right {
  position: relative;
}

.help-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #d5deea;
  background: #fff;
  font-weight: 700;
  color: #0f2744;
  font-size: 0.85rem;
  line-height: 1.2;
}

.help-btn-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #e8eef6;
  font-size: 0.8rem;
}

.help-btn-text {
  font-weight: 650;
}

.help-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  background: #fff;
  color: #0f2744;
  border: 1px solid #d5deea;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 39, 68, 0.16);
  padding: 14px 16px;
  z-index: 40;
  text-align: left;
}

.help-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.help-close {
  border: 0;
  background: transparent;
  color: #0f2744;
  font-size: 1.2rem;
  cursor: pointer;
}

.help-next-label {
  margin: 10px 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.approval-code-sheet {
  text-align: center;
}

.approval-code-value {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #0f2744;
  margin: 8px 0;
  font-variant-numeric: tabular-nums;
}

.approval-code-sheet .req-actions {
  justify-content: center;
  margin: 12px 0;
}

.settings-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.settings-tab {
  border: 1px solid #d5deea;
  background: #fff;
  color: #0f2744;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
}

.settings-tab.is-active {
  background: #12263f;
  color: #f8fafc;
  border-color: #12263f;
}

.portal-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}

.portal-hero {
  min-height: 220px;
  border-radius: 18px;
  padding: 36px 32px;
  color: #fff;
  background:
    linear-gradient(105deg, rgba(8, 28, 58, 0.78) 0%, rgba(8, 28, 58, 0.45) 48%, rgba(8, 28, 58, 0.28) 100%),
    url("/img/jcaa-hero.jpg") center / cover no-repeat;
  box-shadow: 0 10px 30px rgba(15, 39, 68, 0.12);
  position: relative;
  overflow: hidden;
}

.req-timeline {
  list-style: none;
  margin: 1.1rem 0 1.35rem;
  padding: 0.35rem 0 0.15rem;
  display: flex;
  gap: 0;
  overflow-x: auto;
}

.req-timeline-item {
  position: relative;
  flex: 1 1 0;
  min-width: 5.5rem;
  text-align: center;
  padding: 0 0.25rem 0.15rem;
}

.req-timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0.85rem;
  left: calc(50% + 0.85rem);
  right: calc(-50% + 0.85rem);
  height: 2px;
  background: #d5deea;
  z-index: 0;
}

.req-timeline-item.done:not(:last-child)::after,
.req-timeline-item.current:not(:last-child)::after {
  background: #1d4e89;
}

.req-timeline-node {
  position: relative;
  z-index: 1;
  width: 1.7rem;
  height: 1.7rem;
  margin: 0 auto 0.45rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: #e8eef6;
  color: #64748b;
  border: 2px solid #c5d4e8;
}

.req-timeline-item.done .req-timeline-node {
  background: #1d4e89;
  border-color: #1d4e89;
  color: #fff;
}

.req-timeline-item.current .req-timeline-node {
  background: #d4af37;
  border-color: #d4af37;
  color: #0f2744;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.28);
}

.req-timeline-label {
  font-size: 0.72rem;
  line-height: 1.25;
  color: #64748b;
}

.req-timeline-item.done .req-timeline-label {
  color: #0f2744;
}

.req-timeline-item.current .req-timeline-label {
  color: #0f2744;
  font-weight: 650;
}

.req-timeline-item.upcoming .req-timeline-label {
  color: #94a3b8;
}

.portal-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 460px;
}

.portal-hero h2 {
  color: #fff;
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 10px;
}

.portal-hero p {
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 18px;
}

.portal-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-learn {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.portal-stats,
.portal-actions,
.portal-roles {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.portal-stats,
.portal-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-roles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-stat,
.portal-action,
.portal-role,
.portal-panel,
.portal-verify {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 39, 68, 0.04);
}

.portal-stat {
  padding: 16px 16px 14px;
}

.portal-stat-label,
.portal-stat-hint,
.portal-section-sub,
.rail-item span,
.rail-item time,
.portal-verify p,
.portal-role span,
.portal-action span {
  color: #64748b;
  font-size: 0.8rem;
}

.portal-stat-value {
  color: #0f2744;
  font-size: 1.7rem;
  font-weight: 700;
  margin: 6px 0 2px;
}

.portal-section-title {
  margin: 22px 0 4px;
  color: #0f2744;
  font-size: 1.05rem;
}

.portal-action,
.portal-role {
  text-align: left;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  color: #0f2744;
}

.portal-role {
  cursor: default;
}

.portal-action strong,
.portal-role strong,
.rail-item strong {
  color: #0f2744;
  font-size: 0.92rem;
}

.portal-action.qa-blue { background: #f3f8ff; }
.portal-action.qa-green { background: #f3fbf6; }
.portal-action.qa-purple { background: #f7f4ff; }
.portal-action.qa-rose { background: #fff5f6; }
.portal-role.qa-blue { background: #f7fbff; }
.portal-role.qa-green { background: #f5fbf7; }
.portal-role.qa-purple { background: #f8f6ff; }
.portal-role.qa-rose { background: #fff7f8; }

.portal-role.is-current {
  outline: 2px solid #1d4e89;
}

.portal-role em {
  color: #1d4e89;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
}

.portal-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-panel,
.portal-verify {
  padding: 16px;
}

.portal-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.portal-panel h3,
.portal-verify h3 {
  color: #0f2744;
  font-size: 0.98rem;
}

.portal-panel header button,
.portal-verify a {
  background: none;
  border: none;
  color: #1d4e89;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.8rem;
}

.rail-item {
  padding: 10px 0;
  border-top: 1px solid #eef2f7;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-empty,
.portal-footer {
  color: #64748b;
  font-size: 0.82rem;
}

.portal-verify {
  background: linear-gradient(160deg, #12325c, #1d4e89);
}

.portal-verify h3,
.portal-verify p {
  color: #fff;
}

.portal-verify p { color: rgba(255,255,255,0.84); margin: 8px 0 14px; }

.portal-verify .btn {
  background: #fff;
  color: #12325c;
}

.portal-footer {
  margin-top: 22px;
}

@media (max-width: 1100px) {
  .portal-home,
  .portal-stats,
  .portal-actions,
  .portal-roles {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .jcaa-shell .dashboard-main {
    margin-left: 0;
  }
}

.req-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.req-field,
.req-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #0f2744;
  font-size: 0.86rem;
  font-weight: 600;
}

.req-field-wide,
.req-actions {
  grid-column: 1 / -1;
}

.req-actions {
  flex-direction: row;
  align-items: center;
  margin-top: 4px;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.record-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.record-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 16, 32, 0.62);
}

.record-modal-dialog {
  position: relative;
  width: min(860px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: #f7fafc;
  color: #0f2744;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.record-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid #e6edf5;
  position: sticky;
  top: 0;
  background: #fff;
}

.record-modal-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #0f2744;
}

.record-modal-x {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f4f7fb;
  color: #0f2744;
  font-size: 1.4rem;
  line-height: 1;
}

.record-modal-body {
  padding: 18px;
}

.record-muted { color: #64748b; }

.licence-card,
.record-sheet {
  display: grid;
  gap: 16px;
}

.licence-card {
  grid-template-columns: minmax(0, 1fr) 200px;
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 16px;
  overflow: hidden;
}

.licence-card-main { padding: 22px; }

.licence-card-side {
  background: #12325c;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
}

.licence-card-side img {
  background: #fff;
  border-radius: 12px;
  padding: 8px;
}

.licence-card-side a { color: #fff; font-size: 0.82rem; }

.licence-kicker {
  color: #1d4e89;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.licence-number {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin: 6px 0;
  color: #0f2744;
}

.licence-type span {
  color: #64748b;
  font-size: 0.85rem;
}

.licence-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin: 16px 0 0;
}

.licence-facts dt {
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.licence-facts dd {
  margin: 2px 0 0;
  font-weight: 600;
  color: #0f2744;
}

.licence-note {
  margin-top: 14px;
  color: #475569;
  font-size: 0.82rem;
}

.record-sheet-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.step-track {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
}

.step-track li {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  color: #475569;
}

.step-track li.is-current {
  background: #12325c;
  color: #fff;
  border-color: #12325c;
}

.doc-preview {
  width: 100%;
  height: 68vh;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

.doc-preview-img {
  max-width: 100%;
  border-radius: 12px;
}

@media (max-width: 800px) {
  .req-form,
  .licence-card,
  .licence-facts,
  .id-card {
    grid-template-columns: 1fr;
  }
}

.col-filters th {
  padding: 4px 6px 8px;
}

.col-filter-input {
  width: 100%;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid #d7e2ee;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f2744;
  font-size: 0.75rem;
  color-scheme: light;
}

.id-switch { display: flex; gap: 8px; margin-bottom: 12px; }

.id-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 16px;
  min-height: 280px;
  border-radius: 16px;
  padding: 18px;
  color: #1a2744;
}

.id-front { background: linear-gradient(160deg, #f3e2b8, #d7b56a); }
.id-back { background: linear-gradient(160deg, #e7f1fb, #b9d0ea); }

.id-type { margin: 4px 0 10px; color: #12325c; font-size: 1.25rem; }

.id-lines { display: grid; gap: 8px; margin: 0; }
.id-lines dt { font-size: 0.72rem; color: #3d4d66; text-transform: uppercase; }
.id-lines dd { margin: 0; font-weight: 700; color: #0f2744; }

.id-side { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.id-photo, .id-photo-empty {
  width: 110px; height: 130px; object-fit: cover; background: #fff; border-radius: 8px;
}
.id-photo-empty, .id-sign-empty {
  display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 0.75rem; border: 1px dashed #8aa;
}
.id-sign, .id-sign-empty { height: 42px; max-width: 140px; background: rgba(255,255,255,.7); border-radius: 6px; }
.id-sign-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 0.75rem; }
.id-qr { width: 72px; height: 72px; background: #fff; border-radius: 8px; padding: 4px; }

.lic-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.lic-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #d5deea;
  background: #fff;
  color: #0f2744;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.lic-filter-chip.active {
  background: #1d4e89;
  border-color: #1d4e89;
  color: #fff;
}

.lic-filter-count {
  display: inline-flex;
  min-width: 1.4rem;
  justify-content: center;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(15, 39, 68, 0.08);
  font-size: 0.75rem;
}

.lic-filter-chip.active .lic-filter-count {
  background: rgba(255, 255, 255, 0.2);
}

.lic-row-expired td:first-child,
.lic-card.lic-row-expired {
  box-shadow: inset 4px 0 0 #c0392b;
}

.lic-row-expiring td:first-child,
.lic-card.lic-row-expiring {
  box-shadow: inset 4px 0 0 #d4af37;
}

.lic-expiry-expired {
  color: #c0392b !important;
  font-weight: 700;
}

.lic-expiry-expiring {
  color: #9a6700 !important;
  font-weight: 700;
}

.renew-notice-summary {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.renew-notice-summary .id-photo {
  width: 96px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #c5d4e8;
  flex-shrink: 0;
}

.renew-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.renew-notice-form .form-label {
  display: block;
  margin-bottom: 0.75rem;
}

.renew-channel {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin: 0 0 0.85rem;
}

.renew-channel legend {
  padding: 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 650;
}

.renew-channel label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 1rem;
  font-size: 0.9rem;
}

.lic-card-head {
  background: #0d2c54;
  color: #fff;
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lic-card-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 700;
}
.lic-card-code { color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: 0.04em; }
.lic-card-name { color: rgba(255,255,255,0.78); font-size: 0.78rem; }
.lic-card-actions {
  background: #f4f7fb;
  padding: 12px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.dashboard-content.is-inner .lic-card-actions .btn-primary { background: #2f6fed; color: #fff; }
.dashboard-content.is-inner .lic-card-actions .btn-secondary {
  background: #fff;
  color: #0f2744;
  border: 1px solid #c5d4e8;
}
.exam-diploma {
  background: #fff;
  border: 8px solid #d7e4f5;
  text-align: center;
  padding: 28px 18px;
  color: #0f2744;
}
.exam-diploma-brand { letter-spacing: 0.18em; color: #1d4e89; font-weight: 700; }
.exam-diploma h3 { font-size: 2rem; margin: 8px 0; letter-spacing: 0.12em; }
.exam-diploma-name { font-size: 1.45rem; font-weight: 700; margin: 6px 0; }
.exam-diploma-subject { font-size: 1.15rem; font-weight: 700; }
.exam-diploma-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; font-size: 0.82rem; }
