/* Base Styles */
:root {
  --primary-blue: #0A3D91;
  --dark-blue: #072E6F;
  --navbar-height: 62px;
  --accent-orange: #F59E0B;
  --light-orange: #FCD34D;
  --bg-color: #F5F7FA;
  --white: #FFFFFF;
  --text-dark: #1F2937;
  --text-muted: #6B7280;
  --border-color: #E5E7EB;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --success-green: #10B981;
}

/* Team row: keep cards in one horizontal row and fit five cards without causing page scroll */
.team-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: nowrap;
  width: 100%;
  padding: 12px 5px;
}

/* Force team cards to fit five across on desktop; keep them compact */
.team-row { --team-card-size: clamp(220px, 16vw, 250px); }
.team-row .card {
  width: var(--team-card-size) !important;
  flex: 0 0 var(--team-card-size);
  height: var(--team-card-size);
  min-width: 0;
  box-sizing: border-box;
  margin-bottom: 0;
}

.team-row .team-card {
  text-align: center;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
}

.team-row .team-photo {
  width: 122px;
  height: 122px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.team-row .team-photo.zala-photo {
  object-position: center 6%;
  transform: scale(1.06);
}

.team-row .team-photo.het-photo {
  object-position: center 14%;
  transform: scale(1.14);
}

.team-row .team-card h3 {
  color: var(--primary-blue);
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.team-row .team-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.team-row .team-social {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
}

.team-row .team-social a {
  text-decoration: none !important;
  border-bottom: none !important;
  line-height: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.team-row .team-social i {
  color: var(--accent-orange);
  font-size: 1.1rem;
  line-height: 1;
}

.team-row .team-social .social-x-icon {
  width: 18px;
  height: 18px;
  display: block;
  color: var(--accent-orange);
  overflow: visible;
}

.team-row .team-social .social-x-icon path {
  fill: currentColor;
}

.team-row .team-social .x-link {
  transform: translateY(-1px);
}

/* Responsive fallbacks: fewer cards per row on smaller screens */
@media (max-width: 1100px) {
  .team-row { flex-wrap: wrap; }
  .team-row { --team-card-size: clamp(230px, 38vw, 290px); }
  .team-row .card { width: var(--team-card-size) !important; flex: 0 0 var(--team-card-size); height: var(--team-card-size); }
}
@media (max-width: 700px) {
  .team-row { flex-wrap: wrap; justify-content: center; }
  .team-row { --team-card-size: min(100%, 320px); }
  .team-row .card { width: var(--team-card-size) !important; flex: 0 0 var(--team-card-size); height: var(--team-card-size); }
  .team-row .team-card { aspect-ratio: 1 / 1; }
}

/* Prevent horizontal page overflow */
html, body { overflow-x: hidden; }

/* remove underlines / stray decoration for social links inside cards */
.team-row .card a { text-decoration: none; border-bottom: none; outline: none; line-height: 0; display: inline-flex; align-items: center; justify-content: center; padding-bottom: 0; }
.team-row .card a:focus { outline: none; }

/* Ensure icon elements don't produce descender gaps or underlines */
.team-row .card a i,
.team-row .card a svg {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

/* Strong reset for icon links to avoid any underline/underline-gap artefacts */
.team-row .card a {
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  text-decoration-skip-ink: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  display: inline-block !important;
  line-height: 1 !important;
  padding: 0 6px !important;
}

/* Nudge icons up to eliminate 1px rendering artifacts on some browsers */
.team-row .card a i,
.team-row .card a svg {
  transform: translateY(-1px);
}

/* Target LinkedIn/fontawesome icons specifically to remove any residual underline or baseline gap */
.team-row .card a .fab,
.team-row .card a .fa-linkedin,
.team-row .card a i.fab {
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  text-decoration-thickness: 0 !important;
  text-decoration-skip-ink: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  display: inline-flex !important;
  vertical-align: middle !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* If any thin line persists on some browsers, nudge the icon slightly up */
.team-row .card a .fa-linkedin { transform: translateY(-1.25px) !important; }

/* Features Section Styles (added per user) */
.features-section { padding: 60px 20px; text-align: center; }
.features-title { color: var(--primary-blue); font-size: 32px; font-weight: bold; }
.features-subtitle { color: var(--text-muted); margin-top: 8px; }
.features-container { position: relative; max-width: 1200px; margin: 60px auto 0; }
.wave { position: absolute; top: 90px; left: 0; width: 100%; z-index: 0; }
.features-row { display: flex; justify-content: space-between; position: relative; z-index: 1; gap: 36px; flex-wrap: nowrap; align-items: center; }
.feature-card { flex: 0 0 180px; width: 180px; background: var(--white); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; transition: all 0.3s ease; box-shadow: 0 2px 6px rgba(0,0,0,0.04); display: flex; flex-direction: column; align-items: center; text-align: center; }
.feature-card h3 { color: var(--text-dark); font-size: 16px; margin: 10px 0 5px; }
.feature-card p { color: var(--text-muted); font-size: 13px; }
.feature-icon { width: 56px; height: 56px; margin-bottom: 12px; flex-shrink: 0; display: block; }
.feature-card.up { transform: translateY(-24px); }
.feature-card.down { transform: translateY(24px); }
.feature-card:hover { border-color: var(--accent-hover); box-shadow: 0 8px 20px rgba(0,0,0,0.08); transform: translateY(-5px); }

@media (max-width: 1000px) {
  .features-row { justify-content: center; }
  .feature-card { width: 220px; }
}

@media (max-width: 640px) {
  .features-row { gap: 12px; }
  .feature-card { width: 100%; transform: none !important; }
  .wave { top: 60px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Poppins', Arial, sans-serif; }
body { background-color: var(--bg-color); color: var(--text-dark); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }

/* History (Home tab) */
.history-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.history-panel {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  width: 100%;
}

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

.history-panel-title {
  font-weight: 700;
  color: var(--primary-blue);
}

.history-panel-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.history-table,
.history-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.history-table th,
.history-table td,
.history-detail-table th,
.history-detail-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
  vertical-align: top;
}

.history-table thead th,
.history-detail-table thead th {
  background: #f8fbff;
  color: #0a3d91;
  font-weight: 600;
}

.history-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 18px 10px;
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.history-summary-item {
  background: #f9fafb;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.history-summary-item strong {
  color: var(--text-dark);
  font-size: 1.05rem;
}

.history-panel-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.history-search-input {
  width: min(360px, 100%);
}

.history-panel-toolbar .btn {
  white-space: nowrap;
}

.history-session-picker {
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.history-session-select-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.history-session-chevron {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
  right: 18px;
  color: #64748b;
  font-size: 0.78rem;
}

.history-session-select {
  appearance: none;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(10, 61, 145, 0.06);
  color: #0f172a;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 52px;
  min-width: 0;
  padding: 12px 48px 12px 16px;
  text-overflow: ellipsis;
  width: 100%;
}

.history-session-select:hover {
  border-color: #bfd0e4;
  box-shadow: 0 5px 14px rgba(10, 61, 145, 0.08);
}

.history-session-select:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.14);
}

.history-session-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 0 0 auto;
}

.history-session-actions .btn {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  gap: 7px;
  justify-content: center;
  min-height: 52px;
  padding: 0 16px;
}

.history-download-btn {
  min-width: 52px;
  padding: 0 !important;
}

.history-session-actions .disabled,
.history-session-actions .btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

.history-detail-table th[onclick] {
  transition: background-color 0.2s ease;
}

.history-detail-table th[onclick]:hover {
  background: #eef5ff;
}

@media (max-width: 980px) {
  .history-layout {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .history-panel-toolbar {
    align-items: stretch;
  }

  .history-search-input {
    width: 100%;
  }

  .history-panel-toolbar .btn {
    flex: 1 1 100%;
  }

  .history-session-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .history-session-select {
    min-height: 48px;
  }

  .history-session-actions {
    width: 100%;
  }

  .history-session-actions .btn {
    flex: 1 1 0;
    justify-content: center;
    min-height: 48px;
  }
}

/* Header with Logo and Title */
.page-header { background-color: var(--white); padding: 28px 100px; border-bottom: 3px solid var(--accent-orange); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 101; }
.header-top { display: flex; justify-content: space-between; align-items: center; width: 100%; margin: 0; padding: 0; gap: 36px; box-sizing: border-box; }
.header-logos { display: flex; gap: 30px; align-items: center; }
.header-logo-link { display: inline-flex; align-items: center; justify-content: center; }
.logo { height: 68px; width: auto; display: block; }
.header-title { flex: 1; text-align: center; }
.header-title h1 { font-size: 1.25rem; line-height: 1.35; font-weight: 700; color: var(--primary-blue); margin: 0; }
.header-title p { font-size: 1.5rem; line-height: 1.25; font-weight: 700; color: var(--primary-blue); margin: 3px 0 0 0; }
.header-right { display: flex; gap: 15px; align-items: center; }

/* Navigation Bar */
.navbar { background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%); padding: 12px 20px; min-height: var(--navbar-height); box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 102; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.navbar-right { display: flex; gap: 15px; align-items: center; }
.landing-navbar { overflow: hidden; }
.landing-ticker {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.landing-ticker-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  animation: landingTicker 17s linear infinite;
  will-change: transform;
}
.landing-ticker-text i { color: var(--accent-orange); }
.landing-navbar:hover .landing-ticker-text,
.landing-navbar:focus-within .landing-ticker-text {
  animation-play-state: paused;
}
@keyframes landingTicker {
  from { transform: translateX(-100%); }
  to { transform: translateX(100vw); }
}
.landing-navbar .landing-auth-button {
  opacity: 0;
  visibility: hidden;
  transform: translateX(14px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.landing-navbar:hover .landing-auth-button,
.landing-navbar:focus-within .landing-auth-button {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

@media (hover: none), (pointer: coarse) {
  .landing-navbar .landing-auth-button {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-ticker-text {
    animation: none;
    transform: none;
  }
}
.user-profile-btn {
  position: relative;
  z-index: 103;
  display: grid;
  grid-template-columns: 36px minmax(0, auto) 18px;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 5px 10px 5px 6px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 14px;
  background: rgba(255,255,255,0.98);
  color: var(--primary-blue);
  box-shadow: 0 6px 18px rgba(1,20,54,0.16);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.user-profile-btn:hover,
.user-profile-btn[aria-expanded="true"] {
  transform: translateY(-1px);
  border-color: rgba(245,158,11,0.75);
  box-shadow: 0 9px 22px rgba(1,20,54,0.22);
}
.user-profile-trigger-avatar {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--primary-blue), var(--dark-blue));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}
.user-profile-trigger-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}
.user-profile-trigger-copy > span {
  max-width: 150px;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-profile-trigger-copy small {
  margin-top: 2px;
  color: #718096;
  font-size: 0.65rem;
  font-weight: 500;
}
.user-profile-chevron {
  color: #7d8aa0;
  font-size: 0.68rem;
  transition: transform 0.2s ease;
}
.user-profile-btn[aria-expanded="true"] .user-profile-chevron {
  transform: rotate(180deg);
}

/* Profile Card Dropdown */
.profile-card { 
  position: fixed; 
  top: 70px; 
  right: 20px; 
  background: var(--white); 
  border-radius: 20px; 
  box-shadow: 0 24px 60px rgba(5, 25, 60, 0.22); 
  padding: 0; 
  width: 360px; 
  display: none; 
  z-index: 1001; 
  border: 1px solid rgba(10, 61, 145, 0.12);
  overflow: hidden;
  animation: slideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.profile-card.active { display: block; }
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-card-header { 
  display: flex; 
  align-items: center; 
  gap: 14px; 
  padding: 24px;
  background: linear-gradient(135deg, #f5f8fd 0%, #fff9ec 100%);
}

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

.profile-card-avatar { 
  width: 58px; 
  height: 58px; 
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%); 
  border-radius: 16px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  color: var(--white); 
  font-weight: 700;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(10, 61, 145, 0.3);
}

.profile-card-name { 
  font-weight: 700; 
  color: var(--primary-blue); 
  max-width: 220px;
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}

.profile-card-role { 
  font-size: 0.8rem; 
  color: var(--text-muted); 
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(10,61,145,0.07);
}

.profile-card-role i {
  color: var(--accent-orange);
  font-size: 0.75rem;
}

.profile-card-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(10, 61, 145, 0.1), transparent);
  margin: 0;
}

.profile-card-details {
  padding: 12px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-card-detail { 
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(10, 61, 145, 0.08);
}

.profile-card-detail:last-of-type {
  border-bottom: none;
}

.profile-detail-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: rgba(245,158,11,0.10);
  color: #d97706;
}
.profile-detail-icon.is-success {
  background: rgba(16,185,129,0.10);
  color: #059669;
}
.profile-detail-icon i {
  font-size: 0.9rem;
}
.profile-detail-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.detail-label {
  color: #7b8798;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-value {
  color: #26364d;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}
.profile-status-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #059669;
}
.profile-status-active i {
  font-size: 0.42rem;
}

.profile-card-logout { 
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%); 
  color: var(--white); 
  border: none; 
  width: 100%; 
  padding: 15px 20px;
  border-radius: 0; 
  cursor: pointer; 
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.profile-card-logout::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.profile-card-logout:hover::before {
  width: 300px;
  height: 300px;
}

.profile-card-logout:hover { 
  background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(10, 61, 145, 0.3);
}

.profile-card-logout i {
  font-size: 1rem;
}

@media (max-width: 640px) {
  .user-profile-btn {
    grid-template-columns: 34px 16px;
    padding: 5px 8px 5px 5px;
  }

  .user-profile-trigger-avatar {
    width: 34px;
    height: 34px;
  }

  .user-profile-trigger-copy {
    display: none;
  }

  .profile-card {
    right: 10px;
    width: min(360px, calc(100vw - 20px));
  }
}

/* Dashboard Analytics */
.analytics-card {
  padding: 14px;
}

.analytics-hero-note {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.analytics-header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.analytics-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  color: var(--success-green);
  font-size: 0.78rem;
  font-weight: 700;
}

.analytics-status.reconnecting {
  background: rgba(245, 158, 11, 0.12);
  color: #B45309;
}

.analytics-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #B91C1C;
}

.analytics-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.analytics-range-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.analytics-range-filter select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--primary-blue);
  font: inherit;
  font-weight: 700;
}

.analytics-range-filter select:focus {
  outline: none;
}

.analytics-detail-grid {
  margin-top: 12px;
}

.analytics-table-wrap {
  overflow-x: auto;
}

.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.analytics-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 2px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.analytics-metric {
  background: linear-gradient(180deg, rgba(10, 61, 145, 0.03) 0%, rgba(245, 158, 11, 0.03) 100%);
  border: 1px solid rgba(10, 61, 145, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  min-height: 92px;
}

.analytics-metric-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.analytics-metric-value {
  margin-top: 6px;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1.1;
}

.analytics-metric-note {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.analytics-visual-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 12px;
  margin: 12px 0;
}

.analytics-visual-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analytics-chart-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid rgba(10, 61, 145, 0.08);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  min-width: 0;
}

.analytics-chart-card h4 {
  color: var(--primary-blue);
  font-size: 0.98rem;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.analytics-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 260px;
}

.analytics-chart-wrap.tall {
  min-height: 320px;
}

.analytics-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.analytics-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.analytics-mini-card {
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(10, 61, 145, 0.08);
  background: linear-gradient(180deg, rgba(10, 61, 145, 0.02) 0%, rgba(245, 158, 11, 0.02) 100%);
}

.analytics-mini-card .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.analytics-mini-card .value {
  margin-top: 6px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-blue);
}

.heatmap-table td,
.heatmap-table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.heatmap-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
}

.heatmap-pill.good { background: #E8F7EE; color: #047857; }
.heatmap-pill.warn { background: #FFF7DB; color: #B45309; }
.heatmap-pill.bad { background: #FEE2E2; color: #B91C1C; }

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

.activity-dot.success { background: var(--success-green); }
.activity-dot.review { background: #F59E0B; }

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 14px;
}

.dashboard-hero h2 {
  margin: 0 0 6px 0;
  font-size: 1.45rem;
}

.dashboard-hero p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.analytics-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* Dashboard two-column layout: left column for detailed breakdowns, right for runs and trends */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 12px;
}
.dashboard-left {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.dashboard-right {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .analytics-visual-grid,
  .analytics-visual-grid.three-up { grid-template-columns: 1fr; }
}

.analytics-panel {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--white);
  padding: 10px 12px;
  min-width: 0;
}

.analytics-panel h4 {
  color: var(--primary-blue);
  font-size: 1rem;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-color);
}

/* Compact tiles for certificate type breakdown */
.analytics-panel.type-breakdown .analytics-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.analytics-panel.type-breakdown .analytics-list-item {
  padding: 8px;
  border: 1px solid rgba(229,231,235,0.9);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(10,61,145,0.02) 0%, rgba(245,158,11,0.01) 100%);
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  font-size: 0.9rem;
}

.analytics-table th {
  color: var(--text-muted);
  font-weight: 700;
}

.analytics-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 61, 145, 0.08);
  color: var(--primary-blue);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.analytics-list-item {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.analytics-list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.analytics-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.analytics-list-row strong {
  min-width: 0;
  flex: 1;
  word-break: break-word;
}

.analytics-progress {
  margin-top: 8px;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(229, 231, 235, 0.9);
  overflow: hidden;
}

.analytics-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-blue) 0%, var(--accent-orange) 100%);
}

.analytics-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.analytics-row-meta {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.analytics-row-meta span {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(10, 61, 145, 0.04);
  border: 1px solid rgba(10, 61, 145, 0.08);
}

@media (max-width: 900px) {
  .analytics-header {
    flex-direction: column;
  }

  .analytics-panels {
    grid-template-columns: 1fr;
  }
}

.brand { flex: 1; }
.brand-title { color: var(--primary-blue); font-size: 1rem; font-weight: 600; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.btn { display: inline-block; padding: 10px 20px; border-radius: var(--radius); border: none; cursor: pointer; font-weight: 500; text-decoration: none; transition: 0.3s; text-align: center; font-size: 0.95rem; }
.btn-primary { background-color: var(--primary-blue); color: var(--white); }
.btn-primary:hover { background-color: var(--dark-blue); transform: translateY(-2px); box-shadow: 0 6px 12px rgba(10, 61, 145, 0.3); }
.btn-accent { background-color: var(--accent-orange); color: var(--white); }
.btn-accent:hover { background-color: #E59200; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(245, 158, 11, 0.3); }
.btn-outline { background-color: transparent; border: 2px solid var(--accent-orange); color: var(--accent-orange); }
.btn-outline:hover { background-color: var(--accent-orange); color: var(--white); }
.btn-sm { padding: 5px 10px; font-size: 0.85rem; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }
.btn-large { min-width: 200px; }

.card { background-color: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 25px; margin-bottom: 20px; }
.card-title { color: var(--primary-blue); font-size: 1.2rem; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); font-weight: 600; }

/* Auth pages */
.auth-page { background: linear-gradient(180deg, #f7f9fc 0%, #eef4fb 100%); }
.auth-page .login-section { flex: 1; display: flex; flex-direction: column; }
.auth-hero { max-width: 760px; margin: 34px auto 0; text-align: center; padding: 0 20px; }
.auth-hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(10, 61, 145, 0.08); color: var(--primary-blue); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.4px; }
.auth-hero h1 { margin: 16px 0 10px; color: var(--primary-blue); font-size: 2.2rem; line-height: 1.08; }
.auth-hero p { color: var(--text-muted); font-size: 1rem; max-width: 620px; margin: 0 auto; }
.auth-shell { display: flex; justify-content: center; align-items: center; flex: 1; margin: 28px 0 56px; }
.auth-card { width: 100%; max-width: 460px; padding: 34px 32px 26px; border-radius: 22px; box-shadow: 0 24px 60px rgba(10, 61, 145, 0.12); border: 1px solid rgba(10, 61, 145, 0.08); }
.auth-card .card-title { margin-bottom: 18px; font-size: 1.35rem; }
.auth-card .form-control { border-radius: 12px; }
.auth-card .btn { border-radius: 12px; }
.auth-card form { margin-top: 6px; }
.auth-card .form-group { margin-bottom: 18px; }
.auth-card .form-label { font-weight: 600; }
.auth-card .form-control::placeholder { color: #9aa5b1; }
.auth-card .auth-hint { margin-top: 10px; font-size: 0.82rem; color: var(--text-muted); text-align: center; }
.password-field { position: relative; }
.password-field .form-control { padding-right: 48px; }
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--primary-blue);
  cursor: pointer;
  padding: 6px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.password-toggle:hover { color: var(--accent-orange); }

.hero { text-align: center; padding: 140px 20px; min-height: 560px; background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%); color: var(--white); background-size: cover; background-position: center -40px; background-repeat: no-repeat; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.45); z-index: 1; pointer-events: none; }
.hero .container { position: relative; z-index: 2; top: -30px; }
.hero h1 { font-size: 2.8rem; margin-bottom: 15px; font-weight: 700; text-shadow: 0 6px 18px rgba(0,0,0,0.6); max-width: 1100px; margin-left: auto; margin-right: auto; transform: translateY(-60px); }
.hero p { font-size: 1.1rem; margin-bottom: 30px; opacity: 0.95; text-shadow: 0 4px 12px rgba(0,0,0,0.55); }

.hero.hero-landing::before { background: rgba(0,0,0,0.25); }
.hero.hero-landing .hero-content { background: transparent; padding: 0; }
.hero.hero-landing h1,
.hero.hero-landing p { text-shadow: 0 2px 14px rgba(0,0,0,0.45); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

.dashboard-layout { display: flex; flex: 1; }

/* Dashboard Sidebar */
.navbar-left {
  display: flex;
  gap: 10px;
  align-items: center;
}

.navbar-left .nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: transparent;
  color: rgba(255,255,255,0.95);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.18s ease;
}

.navbar-left .nav-btn:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
  color: #ffffff;
}

.navbar-left .nav-btn.active {
  background: var(--white);
  color: var(--primary-blue);
  box-shadow: 0 8px 20px rgba(10,61,145,0.12);
}

.navbar-left .nav-btn i { font-size: 1.05rem; }

.main-content { flex: 1; padding: 30px; overflow-y: auto; width: 100%; }

.section { display: none; }
.section.active { display: block; }

.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-dark); font-size: 0.95rem; }
.form-control { width: 100%; padding: 12px 15px; border: 1.5px solid var(--border-color); border-radius: var(--radius); font-size: 0.95rem; transition: all 0.3s; }
.form-control:focus { outline: none; border-color: var(--accent-orange); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230A3D91' d='M6 9L1 4h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* Settings Form Styles */
.settings-form { display: flex; flex-direction: column; gap: 20px; }
.settings-card { display: flex; gap: 20px; align-items: flex-start; padding: 20px; background: linear-gradient(135deg, rgba(10, 61, 145, 0.02) 0%, rgba(245, 158, 11, 0.02) 100%); border-radius: 12px; border: 1px solid rgba(10, 61, 145, 0.1); }
.settings-icon { width: 60px; height: 60px; background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 1.5rem; flex-shrink: 0; }
.settings-content { flex: 1; }
.settings-content h3 { color: var(--primary-blue); font-size: 1.1rem; margin-bottom: 5px; }
.settings-content p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 15px; }
.settings-actions { display: flex; gap: 10px; }

/* Upload Form Styles */
.upload-form { display: flex; flex-direction: column; gap: 25px; }
.upload-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.upload-col { display: flex; flex-direction: column; }
.upload-col-1 { max-width: 400px; }
.upload-section { padding: 20px; background: linear-gradient(135deg, rgba(16, 185, 129, 0.02) 0%, rgba(245, 158, 11, 0.02) 100%); border-radius: 12px; border: 1px solid rgba(16, 185, 129, 0.1); }
.upload-section-title { color: var(--primary-blue); font-size: 1rem; margin-bottom: 15px; font-weight: 600; }
.upload-actions { display: flex; flex-direction: column; align-items: center; gap: 15px; padding-top: 15px; }
.upload-hint { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* File Upload Styles */
.file-upload-wrapper { position: relative; }
.file-upload-wrapper.drag-over .file-label { 
  border-color: var(--accent-orange); 
  background-color: rgba(245, 158, 11, 0.1); 
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}
.file-input {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}
.file-label { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; background-color: #FAFBFC; border: 2px dashed var(--border-color); border-radius: 12px; cursor: pointer; transition: all 0.3s; position: relative; z-index: 1; }
.file-upload-wrapper:hover .file-label { border-color: var(--accent-orange); background-color: rgba(245, 158, 11, 0.02); }
.file-icon { font-size: 2.5rem; color: var(--accent-orange); margin-bottom: 10px; }
.file-icon-large { font-size: 3rem; }
.file-text { text-align: center; }
.file-primary { display: block; color: var(--text-dark); font-weight: 600; margin-bottom: 5px; }
.file-secondary { display: block; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 5px; }
.file-info { display: block; color: #999; font-size: 0.8rem; margin-top: 5px; }
.file-name { margin-top: 10px; color: var(--success-green); font-weight: 500; text-align: center; display: none; }
.file-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background-color: #F0F4FF; border-radius: 6px; font-size: 0.9rem; color: var(--text-dark); }
.file-item i { color: var(--primary-blue); }
.file-upload-multiple .file-label { padding: 50px 20px; }

/* New File List Container */
.file-list-container { 
  margin-top: 8px; 
  position: relative; 
  z-index: 4;
}

.file-list-container::-webkit-scrollbar {
  width: 6px;
}

.file-list-container::-webkit-scrollbar-track {
  background: transparent;
}

.file-list-container::-webkit-scrollbar-thumb {
  background: rgba(10, 61, 145, 0.2);
  border-radius: 3px;
}

.file-list-container::-webkit-scrollbar-thumb:hover {
  background: rgba(10, 61, 145, 0.4);
}

.file-item-new {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #F0F4FF 0%, #FEF9E7 100%);
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.file-item-new:hover {
  background: linear-gradient(135deg, rgba(10, 61, 145, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
  border-color: var(--accent-orange);
  box-shadow: 0 2px 4px rgba(10, 61, 145, 0.1);
}

.file-item-icon {
  font-size: 1.3rem;
  color: var(--primary-blue);
  min-width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-item-details {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-item-name {
  font-weight: 500;
  color: var(--text-dark);
  word-break: break-word;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.file-item-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.file-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #ef4444;
  font-size: 0.95rem;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.file-item-remove:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  transform: scale(1.1);
}


/* Success Message */
.success-message { padding: 15px 20px; background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%); border-radius: 6px; color: var(--success-green); font-weight: 500; display: flex; align-items: center; gap: 10px; }
.success-message i { font-size: 1.2rem; }

/* Error Message */
.error-message { padding: 15px 20px; background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%); border-radius: 6px; color: #DC2626; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.error-message i { font-size: 1.2rem; }

.table-responsive { overflow-x: auto; margin-top: 15px; border-radius: var(--radius); border: 1px solid var(--border-color); }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 0.9rem; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border-color); }
th { background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%); color: var(--white); font-weight: 600; position: sticky; top: 0; cursor: pointer; user-select: none; }
tbody tr:hover { background-color: #F0F4FF; }

.progress-list { list-style: none; margin: 20px 0; padding: 0; }
.progress-list li { padding: 12px 0; display: flex; align-items: center; gap: 12px; font-size: 0.95rem; font-weight: 500; }
.progress-list li::before { content: '●'; font-size: 0.8rem; min-width: 10px; }
.progress-list li.completed { color: var(--success-green); }
.progress-list li.completed::before { color: var(--success-green); content: '✓'; }
.progress-list li.active { color: var(--accent-orange); }
.progress-list li.active::before { color: var(--accent-orange); content: '⟳'; animation: spin 2s linear infinite; }
.progress-list li.pending { color: #999; }
.progress-list li.pending::before { color: #999; content: '○'; }
.progress-list li.error { color: #d32f2f; }
.progress-list li.error::before { color: #d32f2f; content: '✗'; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Processing Info Styles */
.processing-info { background: linear-gradient(135deg, rgba(10, 61, 145, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%); padding: 20px; border-radius: 12px; margin-bottom: 25px; border: 1px solid rgba(10, 61, 145, 0.1); }
.current-file-info h3 { color: var(--primary-blue); font-size: 1.1rem; margin-bottom: 15px; word-break: break-word; }
.file-progress { display: flex; align-items: center; gap: 15px; }
.file-progress span { min-width: 60px; font-weight: 500; color: var(--accent-orange); }
.progress-bar { flex: 1; height: 8px; background-color: #e0e0e0; border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary-blue) 0%, var(--accent-orange) 100%); transition: width 0.35s linear; width: 0%; transform-origin: left center; }

.processing-steps { padding: 20px; background-color: #fafbfc; border-radius: 12px; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); z-index: 1000; justify-content: center; align-items: center; padding: 20px; }
.modal.active { display: flex; }
.modal-content { background-color: var(--white); padding: 20px; border-radius: var(--radius); width: 95vw; height: 95vh; overflow-y: auto; position: relative; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.modal-close { position: absolute; top: 15px; right: 15px; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); background: none; border: none; font-weight: bold; z-index: 10; }
.modal-body { margin-top: 15px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; overflow-y: auto; max-height: calc(95vh - 150px); padding: 20px; }
.modal-body img { max-width: 90%; height: auto; max-height: 500px; display: block; margin: 10px auto; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.modal-body p { margin: 15px 0; color: var(--text-muted); font-size: 0.9rem; }
.modal-body a { display: block; word-break: break-all; color: #007bff; text-decoration: underline; padding: 10px; background: #f5f5f5; border-radius: 4px; margin: 10px auto; max-width: 600px; font-size: 0.85rem; }
.modal-body a:hover { background: #e0e0e0; }
.modal-body iframe { width: 100%; height: 600px; border: none; margin-top: 10px; }

/* Field selector modal */
.field-selector-modal .modal-content { max-width: 920px; width: min(920px, 96vw); height: auto; max-height: 92vh; padding: 26px 26px 22px; border-radius: 18px; background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%); }
.field-selector-modal .card-title { margin-bottom: 8px; }
.field-selector-subtitle { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 16px; }
.field-checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; max-height: 56vh; overflow-y: auto; padding: 14px 14px 12px; border: 1px solid rgba(10, 61, 145, 0.10); border-radius: 14px; background: rgba(10, 61, 145, 0.02); }
.field-checkbox-grid > div { background: var(--white); border: 1px solid rgba(10, 61, 145, 0.08); border-radius: 12px; min-height: 44px; }
.field-checkbox-grid label { line-height: 1.25; word-break: break-word; }
.field-selector-actions { margin-top: 16px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.field-selector-btn { min-width: 140px; }

/* UI status flags for certificate blur/validity */
.status-flag-cell { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; max-width: 120px; }
.status-chip { display: inline-flex; align-items: center; justify-content: center; padding: 4px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1; border: 1px solid transparent; white-space: nowrap; width: fit-content; }
.status-chip-success { background: rgba(16, 185, 129, 0.12); color: #059669; border-color: rgba(16, 185, 129, 0.22); }
.status-chip-warning { background: rgba(245, 158, 11, 0.14); color: #b45309; border-color: rgba(245, 158, 11, 0.24); }
.status-chip-danger { background: rgba(239, 68, 68, 0.12); color: #dc2626; border-color: rgba(239, 68, 68, 0.22); }

.site-footer { margin-top: auto; color: #fff; }
.footer-contact-band { padding: 44px 32px; background: linear-gradient(135deg, #0a3275 0%, #082b66 55%, #061f4f 100%); }
.footer-contact-layout { display: grid; grid-template-columns: minmax(420px, 1.4fr) minmax(280px, 0.8fr); gap: 48px; align-items: stretch; max-width: 1280px; margin: 0 auto; }
.footer-contact-details { order: 2; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; }
.footer-eyebrow { margin-bottom: 8px; color: #99f6e4; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.footer-contact-details h2 { margin: 0 0 20px; color: #fff; font-size: 1.5rem; }
.footer-contact-details h2 i { margin-right: 8px; color: #fbbf24; }
.footer-contact-details p,
.footer-contact-details a { color: rgba(255,255,255,0.9); font-size: 0.93rem; line-height: 1.65; }
.footer-contact-details > a { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; text-decoration: none; }
.footer-contact-details > a:hover { color: #fff; }
.footer-contact-details > a i,
.footer-address > i { width: 18px; color: #fbbf24; text-align: center; }
.footer-address { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; }
.footer-address > i { margin-top: 5px; }
.footer-directions-link { margin-top: 20px !important; padding: 10px 16px; border: 1px solid rgba(255,255,255,0.55); border-radius: 8px; background: rgba(255,255,255,0.1); font-weight: 600; transition: background 0.2s ease, transform 0.2s ease; }
.footer-directions-link:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }
.footer-map { order: 1; position: relative; min-height: 260px; overflow: hidden; border: 4px solid rgba(255,255,255,0.9); border-radius: 16px; background: #e2e8f0; box-shadow: 0 18px 45px rgba(3,20,55,0.4); }
.footer-map iframe { width: 100%; height: 100%; min-height: 260px; border: 0; pointer-events: none; display: block; }
.footer-map-label { position: absolute; right: 14px; bottom: 14px; padding: 9px 14px; border-radius: 999px; background: #fff; color: #0a3275; box-shadow: 0 5px 18px rgba(15,23,42,0.22); font-size: 0.8rem; font-weight: 700; }
.footer-legal-band { padding: 22px 20px; background: linear-gradient(135deg, #f59e0b 0%, #ffb51b 52%, #f59e0b 100%); text-align: center; }
.footer-legal-band p { margin: 4px 0; color: rgba(31,41,55,0.86); font-size: 0.8rem; }
.footer-legal-band p:first-child { color: #172554; font-size: 0.9rem; }
.footer-legal-band a { color: #0a3275; font-weight: 700; text-decoration: none; }
.footer-legal-band a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .footer-contact-band { padding: 34px 18px; }
  .footer-contact-layout { grid-template-columns: 1fr; gap: 28px; }
  .footer-contact-details { order: 2; }
  .footer-map { order: 1; }
  .footer-map,
  .footer-map iframe { min-height: 230px; }
}

@media (max-width: 768px) {
  .page-header { padding: 18px 16px; }
  .header-top { padding: 0; gap: 14px; }
  .header-logos { flex-direction: column; gap: 10px; }
  .logo { height: 52px; }
  .header-title h1 { font-size: 1rem; }
  .header-title p { font-size: 1.15rem; }
  .navbar { min-height: var(--navbar-height); }
  .hero { padding: 60px 20px; min-height: 320px; }
  .hero h1 { font-size: 2rem; transform: translateY(-10px); }
  .modal-content { min-width: 90%; }
  .field-checkbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 62vh; }
  .settings-card { flex-direction: column; }
  .upload-row { grid-template-columns: 1fr; }
  .dashboard-sidebar { width: 160px; padding: 16px 0; }
  .sidebar-nav { gap: 6px; padding: 0 8px; }
  .nav-btn { padding: 12px 12px; font-size: 0.9rem; }
  .nav-btn span { display: none; }
  .nav-btn i { min-width: 24px; text-align: center; }
}

@media (max-width: 640px) {
  .field-selector-modal .modal-content { width: 96vw; padding: 20px 18px 18px; }
  .field-checkbox-grid { grid-template-columns: 1fr; }
  .field-selector-actions { justify-content: stretch; }
  .field-selector-btn { flex: 1 1 100%; min-width: 0; }
}

/* Features flow layout: wave + staggered cards */
.features-section { padding: 60px 20px; text-align: center; }
.features-title { color: var(--primary-blue); font-size: 32px; font-weight: 700; margin: 0; }
.features-subtitle { color: var(--text-muted); margin-top: 8px; }
.features-container { position: relative; max-width: 1200px; margin: 40px auto 0; }
.wave { position: absolute; top: 90px; left: 0; width: 100%; z-index: 0; }
.features-row { display: flex; justify-content: space-between; position: relative; z-index: 1; gap: 18px; padding: 40px 10px; }
.feature-card { width: 180px; background: var(--white); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; transition: all 0.3s ease; box-shadow: 0 6px 18px rgba(10,61,145,0.04); }
.feature-card h3 { color: var(--text-dark); font-size: 16px; margin: 10px 0 5px; }
.feature-card p { color: var(--text-muted); font-size: 13px; margin: 0; }
.feature-card .icon { width: 50px; height: 50px; margin: 0 auto 10px; border-radius: 50%; background: rgba(245, 158, 11, 0.1); color: var(--accent-orange); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.feature-card .icon i { font-size: 20px; line-height: 1; }
.feature-card .icon svg { width: 56px; height: 56px; display: block; }
.feature-card .icon svg circle { opacity: 1; }
.feature-card.up { transform: translateY(-40px); }
.feature-card.down { transform: translateY(40px); }
.feature-card:hover { border-color: var(--accent-hover); box-shadow: 0 8px 20px rgba(0,0,0,0.08); transform: translateY(-5px); }

@media (max-width: 1100px) {
  .features-row { flex-wrap: wrap; justify-content: center; gap: 22px; }
  .feature-card { width: calc(33% - 18px); min-width: 200px; }
  .feature-card.up, .feature-card.down { transform: translateY(0); }
  .wave { display: none; }
}
@media (max-width: 700px) {
  .feature-card { width: calc(50% - 12px); }
}

/* Landing page overrides */
.hero.hero-landing {
  min-height: 620px;
  padding: 120px 20px;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  filter: brightness(1.14) saturate(1.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero.hero-landing::before {
  background: rgba(7, 18, 40, 0.10);
}

.hero.hero-landing .hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: none;
}

.hero.hero-landing h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transform: none;
  font-size: clamp(1.8rem, 3.2vw, 3.4rem);
  white-space: nowrap;
  overflow-wrap: normal;
  line-height: 1.08;
  margin-bottom: 16px;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  width: 100%;
  text-align: center;
}

@media (max-width: 780px) {
  .hero.hero-landing h1 { white-space: normal; font-size: clamp(1.6rem, 4.2vw, 2.1rem); }
}

.hero.hero-landing p {
  font-size: 1.12rem;
  max-width: 860px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.42);
}

.features-section {
  padding: 72px 20px 56px;
  text-align: center;
}

.features-title {
  color: var(--primary-blue);
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.features-subtitle {
  color: var(--text-muted);
  margin: 8px 0 0;
}

.features-container {
  position: relative;
  max-width: 1400px;
  margin: 56px auto 0;
}

.wave {
  position: absolute;
  top: 82px;
  left: 0;
  width: 100%;
  z-index: 0;
}

.features-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  position: relative;
  z-index: 1;
  padding: 34px 6px 12px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: 0 8px 20px rgba(10, 61, 145, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 240px;
}

.feature-card .icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.feature-card .icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.feature-card h3 {
  color: var(--text-dark);
  font-size: 16px;
  margin: 4px 0 6px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
}

.feature-card.up {
  transform: translateY(-36px);
}

.feature-card.down {
  transform: translateY(36px);
}

.feature-card:hover {
  border-color: var(--accent-hover);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  transform: translateY(-5px);
}

.about-section {
  padding: 70px 20px 80px;
}

.about-shell {
  max-width: 1500px;
}

.about-title {
  color: var(--primary-blue);
  margin: 0;
  text-align: center;
  font-size: 2rem;
}

.about-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin: 10px 0 28px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  overflow: visible;
}

.team-card {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid rgba(10, 61, 145, 0.1);
  box-shadow: 0 10px 24px rgba(10, 61, 145, 0.06);
  padding: 16px 16px 14px;
  aspect-ratio: 1 / 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  min-width: 0;
}

.team-photo-wrap {
  width: 58%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(10, 61, 145, 0.04), rgba(245, 158, 11, 0.04));
  border: 1px solid rgba(10, 61, 145, 0.08);
  flex: 0 0 auto;
  margin: 0 auto 6px;
}

.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.team-photo.zala-photo {
  object-position: center 6%;
  transform: scale(1.06);
}
.team-photo.hiren-photo { object-position: center 20%; }
.team-photo.bhargav-photo { object-position: center 20%; }
.team-photo.het-photo { object-position: center 18%; }
.team-photo.pujan-photo { object-position: center 18%; }

.team-card h3 {
  color: var(--primary-blue);
  margin: 10px 0 2px;
  font-size: 1.02rem;
  line-height: 1.2;
}

.team-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 0 6px;
}

.team-social {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 2px;
}

.team-social a {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(10, 61, 145, 0.06);
  color: var(--primary-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.team-social a:hover {
  transform: translateY(-2px);
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent-orange);
}

.team-social .fa-linkedin-in,
.team-social .fa-instagram {
  font-size: 1.05rem;
}

.team-social .social-x-icon {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

@media (max-width: 1200px) {
  .features-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-card.up,
  .feature-card.down {
    transform: none;
  }

  .wave {
    display: none;
  }
}

@media (max-width: 700px) {
  .features-row {
    grid-template-columns: 1fr;
  }

  .hero.hero-landing {
    min-height: 480px;
    padding: 84px 20px;
  }

  .feature-card,
  .team-card {
    min-height: 0;
  }
}

/* Landing page: professional capabilities and team presentation */
.landing-features {
  position: relative;
  padding: 88px 24px 96px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 12%, rgba(245, 158, 11, 0.10), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
}

.section-heading {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--primary-blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-kicker i {
  color: var(--accent-orange);
  font-size: 0.9rem;
}

.landing-features .features-title,
.about-section .about-title {
  max-width: 760px;
  margin: 0 auto;
  color: #102a56;
  font-size: clamp(1.9rem, 3vw, 2.65rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.landing-features .features-title i,
.about-section .about-title i {
  margin-right: 10px;
  color: var(--accent-orange);
  font-size: 0.78em;
}

.landing-features .features-subtitle,
.about-section .about-subtitle {
  max-width: 680px;
  margin: 16px auto 0;
  color: #64748b;
  font-size: 1rem;
  line-height: 1.7;
}

.landing-features .features-container {
  max-width: 1500px;
  margin: 36px auto 0;
}

.landing-features .features-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  padding: 0;
}

.landing-features .feature-card {
  position: relative;
  min-height: 190px;
  padding: 28px;
  overflow: hidden;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  border: 1px solid rgba(10, 61, 145, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 38px rgba(15, 42, 86, 0.07);
  transform: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.landing-features .feature-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -54px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(10, 61, 145, 0.035);
}

.landing-features .feature-card:hover {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 20px 48px rgba(15, 42, 86, 0.13);
  transform: translateY(-6px);
}

.landing-features .feature-card .icon {
  width: 52px;
  height: 52px;
  margin: 0 0 22px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 14px;
  background: linear-gradient(145deg, #fff8e8, #ffefd0);
  color: #e58b00;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.12);
}

.landing-features .feature-card .icon i {
  font-size: 1.3rem;
}

.landing-features .feature-card h3 {
  margin: 0 0 9px;
  color: #102a56;
  font-size: 1.05rem;
  line-height: 1.35;
}

.landing-features .feature-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.65;
}

.about-section {
  padding: 90px 24px 100px;
  background: #eef3f9;
}

.about-section .about-shell {
  max-width: 1780px;
}

.about-section .team-grid {
  gap: 22px;
  margin-top: 36px;
}

.about-section .team-card {
  position: relative;
  aspect-ratio: auto;
  min-height: 380px;
  padding: 34px 24px 24px;
  overflow: hidden;
  border: 1px solid rgba(10, 61, 145, 0.10);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 42, 86, 0.07);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.about-section .team-card:hover {
  transform: translateY(-6px);
  border-color: rgba(10, 61, 145, 0.2);
  box-shadow: 0 20px 46px rgba(15, 42, 86, 0.13);
}

.about-section .team-photo-wrap {
  width: 154px;
  height: 154px;
  margin: 4px auto 16px;
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px rgba(10, 61, 145, 0.12), 0 10px 24px rgba(15, 42, 86, 0.14);
}

.about-section .team-card h3 {
  margin: 0 0 8px;
  color: #102a56;
  font-size: 1rem;
}

.about-section .team-card .team-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(10, 61, 145, 0.06);
  color: #52627a;
  font-size: 0.75rem;
  font-weight: 600;
}

.about-section .team-role i {
  color: var(--accent-orange);
}

.about-section .team-social {
  gap: 8px;
  padding-top: 16px;
}

.about-section .team-social a {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(10, 61, 145, 0.09);
  background: #f6f8fc;
}

@media (max-width: 1200px) {
  .landing-features .features-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .landing-features .features-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-section .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .landing-features,
  .about-section {
    padding: 64px 18px 72px;
  }

  .landing-features .features-row,
  .about-section .team-grid {
    grid-template-columns: 1fr;
  }

  .landing-features .feature-card {
    min-height: 0;
    padding: 24px;
  }

  .about-section .team-card {
    width: 100%;
    max-width: 360px;
    min-height: 300px;
    margin: 0 auto;
  }
}

/* Dashboard home */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.dashboard-home-shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.dashboard-home-header {
  margin-bottom: 28px;
  padding: 8px 0;
}

.dashboard-home-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.dashboard-home-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange);
  font-size: 1.45rem;
}

.dashboard-home-heading h1 {
  margin: 0;
  color: #102a56;
  font-size: 1.6rem;
  line-height: 1.3;
}

.dashboard-home-heading p {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
}

.dashboard-home .history-layout {
  gap: 22px;
}

.dashboard-home .history-panel {
  padding: 24px;
  border: 1px solid rgba(10, 61, 145, 0.10);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 42, 86, 0.06);
}

.dashboard-home .history-panel-header {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e8edf4;
}

.history-panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-panel-icon {
  display: inline-flex;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(10, 61, 145, 0.08);
  color: var(--primary-blue);
  font-size: 1rem;
}

.dashboard-home .history-panel-title {
  margin: 0;
  color: #102a56;
  font-size: 1.05rem;
  line-height: 1.4;
}

.dashboard-home .history-panel-subtitle {
  margin: 2px 0 0;
  color: #75839a;
  font-size: 0.8rem;
}

.dashboard-home .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.dashboard-home .btn-outline {
  border-width: 1px;
}

.dashboard-home .btn-quiet {
  border: 1px solid #dbe3ee;
  background: #f7f9fc;
  color: #52627a;
}

.dashboard-home .btn-quiet:hover {
  border-color: #c4d0df;
  background: #edf2f8;
  color: var(--primary-blue);
}

.dashboard-home .history-session-select {
  min-height: 54px;
  border-radius: 12px;
  background: #f9fbfe;
}

.dashboard-home .history-session-actions .btn {
  min-height: 54px;
  border-radius: 12px;
}

.dashboard-home .history-panel-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  margin-bottom: 16px;
}

.history-search-wrap {
  position: relative;
}

.history-search-wrap > i {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 1;
  transform: translateY(-50%);
  color: #8190a5;
  pointer-events: none;
}

.dashboard-home .history-search-input {
  width: 100%;
  min-height: 44px;
  padding-left: 44px;
  border-color: #dbe3ee;
  border-radius: 11px;
  background: #fbfcfe;
}

.history-row-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #e7ecf3;
  border-radius: 12px;
  background: #f8fafc;
}

.history-row-controls > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #52627a;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.history-row-controls > span i {
  color: var(--primary-blue);
}

.history-row-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.dashboard-home .history-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-home .history-summary-item {
  min-height: 86px;
  padding: 16px;
  flex-direction: row;
  align-items: center;
  gap: 13px;
  border: 1px solid #e6ecf3;
  border-radius: 14px;
  background: #fafbfd;
}

.history-summary-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(10, 61, 145, 0.08);
  color: var(--primary-blue);
}

.history-summary-item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dashboard-home .history-summary-item strong {
  color: #102a56;
  font-size: 1.25rem;
}

.history-summary-success .history-summary-icon {
  background: rgba(16, 185, 129, 0.10);
  color: #059669;
}

.history-summary-failed .history-summary-icon {
  background: rgba(239, 68, 68, 0.09);
  color: #dc2626;
}

.history-table-wrap {
  min-height: 132px;
  margin-top: 0;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid #e1e7ef;
  border-radius: 14px;
  background: #fff;
}

.history-table-wrap::-webkit-scrollbar {
  height: 10px;
}

.history-table-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 999px;
}

.history-table-wrap::-webkit-scrollbar-thumb {
  background: #b9c6d8;
  border-radius: 999px;
}

.history-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #8ea0b8;
}

.dashboard-home .history-detail-table {
  min-width: max-content;
  width: max-content;
}

.dashboard-home .history-detail-table th,
.dashboard-home .history-detail-table td {
  white-space: nowrap;
}

.dashboard-home .history-detail-table th:last-child,
.dashboard-home .history-detail-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  box-shadow: -10px 0 16px rgba(15, 42, 86, 0.06);
}

.dashboard-home .history-detail-table th:last-child {
  z-index: 3;
  background: #f2f6fb;
}

.dashboard-home .history-detail-table td:last-child {
  background: #fff;
}

.history-action-cell {
  min-width: 150px;
}

.dashboard-home .history-detail-table thead th {
  padding: 13px 14px;
  background: #f2f6fb;
  color: #27466f;
  font-size: 0.8rem;
}

.dashboard-home .history-detail-table td {
  padding: 12px 14px;
}

.history-empty-state {
  display: flex;
  min-height: 130px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #8794a7;
}

.history-empty-state > i {
  margin-bottom: 5px;
  color: #a8b5c7;
  font-size: 1.6rem;
}

.history-empty-state strong {
  color: #46566d;
  font-size: 0.92rem;
}

.history-empty-state span {
  font-size: 0.78rem;
}

.history-pagination {
  margin-top: 16px;
}

@media (max-width: 800px) {
  .dashboard-home-header,
  .dashboard-home .history-panel {
    padding: 20px;
  }

  .dashboard-home .history-panel-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .history-search-wrap {
    grid-column: 1 / -1;
  }

  .history-row-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-row-options {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .dashboard-home-heading {
    align-items: flex-start;
  }

  .dashboard-home-heading h1 {
    font-size: 1.3rem;
  }

  .dashboard-home .history-panel-header,
  .dashboard-home .history-session-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-home .history-panel-toolbar,
  .dashboard-home .history-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-home .history-panel-toolbar .btn {
    width: 100%;
  }
}

/* Dashboard upload */
.dashboard-upload-shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.dashboard-upload-header {
  margin-bottom: 28px;
  padding: 8px 0;
  text-align: center;
}

.dashboard-upload-header h1 {
  margin: 0;
  color: #102a56;
  font-size: 1.6rem;
  line-height: 1.3;
}

.dashboard-upload-header h1 i {
  margin-right: 10px;
  color: var(--accent-orange);
  font-size: 0.9em;
}

.dashboard-upload .card {
  padding: 24px;
  border: 1px solid rgba(10, 61, 145, 0.10);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 42, 86, 0.06);
}

.upload-panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e8edf4;
}

.upload-panel-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(10, 61, 145, 0.08);
  color: var(--primary-blue);
  font-size: 1.05rem;
}

.upload-panel-icon.is-processing {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.upload-panel-icon.is-success {
  background: rgba(16, 185, 129, 0.10);
  color: #059669;
}

.upload-panel-heading h2 {
  margin: 0;
  color: #102a56;
  font-size: 1.08rem;
  line-height: 1.4;
}

.upload-panel-heading p {
  margin: 3px 0 0;
  color: #75839a;
  font-size: 0.82rem;
}

.dashboard-upload .upload-form {
  gap: 18px;
}

.dashboard-upload .upload-row {
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(420px, 1.8fr) auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 0;
}

.dashboard-upload .form-label {
  display: block;
  margin-bottom: 7px;
  color: #34445c;
  font-size: 0.82rem;
  font-weight: 600;
}

.dashboard-upload .form-label i {
  margin-right: 5px;
  color: var(--primary-blue);
}

.dashboard-upload .cert-select .form-select {
  width: 100%;
  min-height: 58px;
  padding: 10px 13px;
  border-color: #dbe3ee;
  border-radius: 12px;
  background: #fbfcfe;
  font-size: 0.88rem;
}

.dashboard-upload .upload-area {
  min-width: 0;
}

.dashboard-upload .file-upload-wrapper {
  border-radius: 12px;
}

.dashboard-upload .file-upload-multiple .file-label {
  min-height: 108px;
  padding: 18px 22px;
  border: 2px dashed #cbd7e6;
  border-radius: 14px;
  background: linear-gradient(135deg, #f9fbfe 0%, #f4f7fc 100%);
}

.upload-drop-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.upload-drop-content .file-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 13px;
  background: #fff3d6;
  color: #e58b00;
  font-size: 1.25rem;
}

.upload-drop-content strong,
.upload-drop-content span {
  display: block;
  text-align: left;
}

.upload-drop-content strong {
  color: #263b59;
  font-size: 0.88rem;
}

.upload-drop-content span {
  margin-top: 3px;
  color: #7b889c;
  font-size: 0.75rem;
}

.dashboard-upload .start-area {
  display: flex;
  align-items: stretch;
}

.dashboard-upload .start-area > label {
  display: none;
}

.dashboard-upload .start-area .btn {
  min-height: 58px;
  padding: 0 20px;
  border-radius: 12px;
  white-space: nowrap;
}

.selected-files-section {
  width: 100%;
  padding: 16px;
  border: 1px solid #e4eaf2;
  border-radius: 14px;
  background: #fafbfd;
}

.selected-files-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.selected-files-header label {
  color: #34445c;
  font-size: 0.84rem;
  font-weight: 600;
}

.selected-files-header label i {
  margin-right: 6px;
  color: var(--primary-blue);
}

.selected-file-count {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(10, 61, 145, 0.07);
  color: var(--primary-blue);
  font-size: 0.75rem;
  font-weight: 600;
}

.dashboard-upload .file-list-container {
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #e7ecf3;
  border-radius: 11px;
  background: #fff;
}

.dashboard-upload .file-list {
  margin-top: 0;
}

.dashboard-upload .file-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid #edf1f6;
  border-radius: 9px;
  background: #f9fafc;
}

.dashboard-upload .file-list-item .name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-upload .file-list-item .meta,
.dashboard-upload .file-list-empty {
  color: #7a8799;
  font-size: 0.8rem;
}

.dashboard-upload .file-list-empty {
  padding: 16px;
  text-align: center;
}

.dashboard-upload .upload-actions {
  padding-top: 0;
}

.dashboard-upload .upload-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #64748b;
}

.dashboard-upload .upload-hint i {
  color: var(--accent-orange);
}

.upload-status-panel,
.upload-results-panel {
  margin-top: 22px;
}

.dashboard-upload .processing-info,
.dashboard-upload .processing-steps {
  border: 1px solid #e2e9f2;
  border-radius: 14px;
  background: #f8fafc;
}

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

.upload-results-header .upload-panel-heading {
  margin: 0;
  padding: 0;
  border: 0;
}

.upload-results-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.results-row-controls,
.results-download-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.results-row-controls {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #e7ecf3;
  border-radius: 12px;
  background: #f8fafc;
}

.results-download-actions {
  margin-top: 20px;
}

@media (max-width: 1050px) {
  .dashboard-upload .upload-row {
    grid-template-columns: 1fr 1.5fr;
  }

  .dashboard-upload .start-area {
    grid-column: 1 / -1;
  }

  .dashboard-upload .start-area .btn {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .dashboard-upload .card {
    padding: 20px;
  }

  .dashboard-upload .upload-row {
    grid-template-columns: 1fr;
  }

  .dashboard-upload .start-area {
    grid-column: auto;
  }

  .upload-results-header,
  .upload-results-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-results-tools input,
  .upload-results-tools .btn {
    width: 100% !important;
  }
}

/* Modal Header & Details Styles */
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border-color); }
.modal-header h3 { margin: 0; color: var(--primary-blue); font-size: 1.3rem; }
.modal-header .modal-close { position: relative; top: 0; right: 0; }

.details-section { margin-bottom: 25px; }
.details-section h4 { color: var(--primary-blue); font-size: 1rem; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); }

.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 15px; }

.detail-item { display: flex; flex-direction: column; padding: 12px; background: rgba(10, 61, 145, 0.02); border-radius: 6px; border-left: 3px solid var(--accent-orange); }

.detail-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; font-weight: 600; }

.detail-value { font-size: 1rem; color: var(--text-dark); font-weight: 600; }

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

.details-list-item { padding: 10px 12px; background: #f9fafb; border-radius: 6px; border-left: 3px solid var(--accent-orange); }

.details-list-item strong { color: var(--primary-blue); display: block; margin-bottom: 2px; }

.details-list-item span { color: var(--text-muted); font-size: 0.85rem; display: block; margin-bottom: 1px; line-height: 1.25; }

.details-list-item.compact-field-row { display: flex; flex-direction: column; gap: 2px; }

.details-list-item.compact-field-row .compact-field-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.details-list-item.compact-field-row .compact-field-top strong { display: block; margin-bottom: 0; min-width: 0; flex: 1; }

.details-list-item.compact-field-row .compact-field-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; font-size: 0.78rem; color: var(--text-muted); }

.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 999; }

.modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; overflow-y: auto; }

.modal-content { background-color: var(--white); max-width: 700px; width: 90%; max-height: 90vh; overflow-y: auto; border-radius: 12px; box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15); padding: 24px; }
