/* Main Theme Variable definitions */
:root {
  --bg-primary: #F7F9FC;
  --bg-secondary: #FFFFFF;
  --border-color: #E2E8F0;
  
  --text-primary: #1E293B;
  --text-secondary: #475569;
  --text-muted: #64748B;
  
  --accent-primary: #0D2C6C; /* PrimaryBlue */
  --accent-secondary: #2F80ED; /* SecondaryBlue */
  --accent-success: #27AE60; /* SocialGreen */
  --accent-gold: #F2C94C; /* AccentGold */
  --accent-rose: #E11D48;
  --accent-purple: #7E22CE;
  --accent-orange: #B45309;
  --accent-cyan: #00838F;
  --accent-bg-alpha: rgba(13, 44, 108, 0.08);

  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-premium: 0 4px 18px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 12px;
}

/* Dark mode overrides (Activated via document class dark-mode) */
body.dark-mode {
  --bg-primary: #020617; /* BackgroundDark */
  --bg-secondary: #0F172A; /* SurfaceDark */
  --border-color: #1E293B;
  
  --text-primary: #F8FAFC; /* TextLight */
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --accent-primary: #1D4ED8; /* PrimaryBlueDark */
  --accent-bg-alpha: rgba(29, 78, 216, 0.15);
}

/* Base resets & fonts */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #ECEFF4;
  color: var(--text-primary);
  font-family: var(--font-body);
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease;
}

body.dark-mode {
  background-color: #020617;
}

/* Responsive Shell container for Mobile-First PWA look on web */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-primary);
  box-shadow: 0 0 35px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  transition: var(--transition-smooth);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
}

/* Sticky Toolbars / App Bars */
.app-bar-blue {
  background: linear-gradient(180deg, var(--accent-primary), #1A365D);
  padding: calc(2rem + env(safe-area-inset-top, 0px)) 1.25rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #FFFFFF;
}

.app-bar-blue h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.2px;
}

.app-bar-back-btn {
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Screen transition manager */
.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  width: 100%;
  animation: fadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); /* default padding for screens without bottom nav */
}

.app-container.has-bottom-nav .screen {
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); /* leaves space for bottom navigation */
}

.screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards UI */
.card {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
}

/* Login/Register screen wrappers */
.login-wrapper {
  padding: 3.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  background-color: var(--bg-primary);
}

.brand-header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-box {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  overflow: hidden;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow-lg);
  background-color: #FFFFFF;
}

.logo-img-login {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-title {
  font-size: 1.85rem;
  color: var(--accent-primary);
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.form-container {
  width: 100%;
  padding: 1.5rem;
}

.form-header-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

/* Outlined Floating Input Style (replicating Jetpack Compose OutlinedTextField) */
.input-group-outlined {
  position: relative;
  margin-bottom: 1.25rem;
  width: 100%;
}

.input-group-outlined input,
.input-group-outlined select {
  width: 100%;
  padding: 0.95rem 1rem 0.95rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.input-group-outlined select {
  appearance: none;
  -webkit-appearance: none;
}

.input-group-outlined input:focus,
.input-group-outlined select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-bg-alpha);
}

.input-group-outlined label {
  position: absolute;
  left: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.92rem;
  pointer-events: none;
  transition: var(--transition-smooth);
  background-color: transparent;
  padding: 0 0.25rem;
}

.input-group-outlined input:focus ~ label,
.input-group-outlined input:not(:placeholder-shown) ~ label,
.input-group-outlined select:focus ~ label,
.input-group-outlined select:valid ~ label,
.input-group-outlined input[type="date"] ~ label {
  top: 0;
  left: 1rem;
  font-size: 0.78rem;
  color: var(--accent-primary);
  background-color: var(--bg-secondary);
  font-weight: 600;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted);
}

.password-toggle-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
}

.forgot-password-link {
  text-align: right;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

.forgot-password-link a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-secondary);
}

/* Button variants */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 0.92rem;
  gap: 0.5rem;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 1rem 2rem;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px var(--accent-bg-alpha);
}

.btn-secondary {
  background-color: var(--border-color);
  color: var(--text-primary);
}

.btn-danger {
  background-color: #EA4335;
  color: #FFFFFF;
}

.btn-google-sso {
  background-color: #FFFFFF;
  color: #1E293B;
  border: 1px solid #CBD5E1;
  font-weight: 600;
  width: 100%;
}

.btn-google-sso:hover {
  background-color: #F8FAFC;
}

.google-icon {
  width: 20px;
  height: 20px;
}

.signup-redirect {
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.signup-redirect a {
  color: var(--accent-primary);
  font-weight: 700;
}

/* Dashboard Header Styles */
.dashboard-header {
  background: linear-gradient(180deg, var(--accent-primary) 0%, #172554 100%);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 1.5rem 2rem;
  color: #FFFFFF;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.header-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.avatar-info-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  cursor: pointer;
}

.user-info-text h2 {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.user-info-text p {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  margin-top: 0.1rem;
}

.notification-btn {
  background: transparent;
  border: none;
  font-size: 1.35rem;
  color: #FFFFFF;
  cursor: pointer;
}

.header-report-card,
.header-report-card-empty {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-report-card-empty {
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.header-report-card-empty h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
}

.header-report-card-empty p {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.1rem;
}

.report-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-badge {
  color: var(--accent-gold);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.report-num {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
}

.report-card-body {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.report-body-icon {
  font-size: 2rem;
}

.report-body-meta h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

.report-body-meta p {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Home Body Content */
.home-body-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.stat-card-row {
  display: flex;
  gap: 0.75rem;
  margin-top: -2rem; /* pulls up slightly onto header overlap */
  z-index: 10;
  margin-bottom: 1.5rem;
}

.stat-card {
  flex: 1;
  background-color: var(--bg-secondary);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-premium);
  border: 1px solid var(--border-color);
}

.stat-icon {
  font-size: 1.75rem;
}

.stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
}

.stat-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.edu-promo-card {
  background-color: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-premium);
}

.edu-logo-box {
  background-color: #DCFCE7;
  color: #15803D;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.edu-text-box h4 {
  font-size: 0.9rem;
  color: #166534;
}

.edu-text-box p {
  font-size: 0.7rem;
  color: #14532D;
  margin-top: 0.1rem;
}

.edu-arrow {
  color: #15803D;
  margin-left: auto;
}

.menu-section-title {
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Grid Menu Wrapper */
.menu-grid-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.menu-item-box {
  border-radius: 16px;
  padding: 1.25rem 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-premium);
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.menu-item-box:hover {
  transform: translateY(-3px);
}

.menu-item-box h4 {
  font-size: 0.88rem;
  font-weight: 700;
}

.menu-box-icon {
  font-size: 1.75rem;
}

.bg-blue { background-color: #E0F2FE; color: #0369A1; }
.bg-indigo { background-color: #ECEFFE; color: #3F51B5; }
.bg-orange { background-color: #FEF3C7; color: #B45309; }
.bg-rose { background-color: #FFF1F2; color: #E11D48; }
.bg-purple { background-color: #F3E8FF; color: #7E22CE; }
.bg-cyan { background-color: #E0F7FA; color: #00838F; }

.btn-admin-panel {
  background-color: var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  border-radius: 12px;
}

/* Fingerprint scanner visual screen styles */
.scan-body-content {
  padding: 1.5rem;
}

.scan-page-description {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
  margin-bottom: 1.25rem;
}

.profile-photo-row {
  display: flex;
  align-items: center;
  background-color: rgba(0,0,0,0.03);
  border: 1px dashed var(--border-color);
  border-radius: 16px;
  padding: 0.75rem 1rem;
  gap: 1rem;
  cursor: pointer;
  margin-bottom: 1.25rem;
}

.profile-photo-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: rgba(13, 44, 108, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
}

.profile-photo-info h4 {
  font-size: 0.88rem;
  color: var(--text-primary);
}

.profile-photo-info p {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.photo-check-icon {
  margin-left: auto;
  color: var(--accent-success);
  font-weight: bold;
}

.section-card-title {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--accent-primary);
}

/* Finger selector layout grid */
.finger-picker-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.75rem;
  justify-content: space-between;
}

.finger-select-btn {
  flex: 1;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.5rem 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
  position: relative;
}

.finger-select-btn small {
  font-size: 0.55rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  font-weight: 500;
  text-align: center;
}

.finger-select-btn.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(13, 44, 108, 0.2);
  background-color: var(--accent-bg-alpha);
}

.finger-badge-checkmark {
  display: none;
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--accent-success);
  color: #FFFFFF;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  font-size: 0.55rem;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.finger-select-btn.scanned .finger-badge-checkmark {
  display: flex;
}

/* Virtual Finger Scanner */
.sensor-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5rem;
}

.sensor-box {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, #e2e8f0 0%, #cbd5e1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.1), var(--shadow-premium);
}

.sensor-box.scanning {
  background: radial-gradient(circle, #dcfce7 0%, #86efac 100%);
}

.sensor-icon {
  font-size: 3.5rem;
  z-index: 5;
}

.sensor-laser-line {
  display: none;
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: var(--accent-success);
  box-shadow: 0 0 10px var(--accent-success);
  top: 0;
  left: 0;
  animation: laserScan 2s linear infinite;
  z-index: 6;
}

.sensor-box.scanning .sensor-laser-line {
  display: block;
}

@keyframes laserScan {
  0% { top: 0; }
  50% { top: 100%; }
  100% { top: 0; }
}

.sensor-helper-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
}

/* Bottom Navigation Bar styles */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 0.65rem 0 calc(0.65rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.04);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  gap: 0.25rem;
  flex: 1;
}

.nav-icon-svg {
  font-size: 1.35rem;
  padding: 4px 16px;
  border-radius: 20px;
  transition: var(--transition-smooth);
}

.nav-item.active {
  color: var(--accent-primary);
}

.nav-item.active .nav-icon-svg {
  background-color: var(--accent-bg-alpha);
  color: var(--accent-primary);
}

/* Report History List layout */
.reports-body-content {
  padding: 1.5rem;
}

.reports-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-card {
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.history-avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--accent-bg-alpha);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.history-card-meta h4 {
  font-size: 1rem;
  color: var(--text-primary);
}

.history-card-meta p {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Dynamic Page Card sheets (inside report details) */
.report-detail-toolbar {
  position: sticky;
  top: 0;
  background-color: var(--accent-primary);
  color: #FFFFFF;
  padding: calc(1.25rem + env(safe-area-inset-top, 0px)) 1rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 80;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.toolbar-title {
  font-size: 0.95rem;
  font-weight: bold;
}

.pdf-download-toolbar-btn {
  background: var(--accent-gold);
  border: none;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-detail-scroll-body {
  flex: 1;
  overflow-y: auto;
  background-color: var(--bg-primary);
}

.report-info-card {
  background: var(--accent-primary);
  border-radius: 16px;
  padding: 1.25rem;
  color: #FFFFFF;
  margin: 1rem;
  box-shadow: var(--shadow-premium);
}

/* Beautiful Paper Sheets matching print page dimensions */
.report-page-sheet {
  background-color: #FFFFFF;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  margin: 1rem 0.85rem 1.5rem;
  color: #1E293B; /* Page sheet text is ALWAYS dark for maximum contrast/readability */
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Sheet header representing page indices */
.report-sheet-banner {
  background-color: rgba(13, 44, 108, 0.06);
  color: var(--accent-primary);
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  margin: -1.5rem -1.5rem 1.5rem -1.5rem;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  letter-spacing: 0.2px;
}

/* Page sheet custom content decorators */
.sheet-main-title {
  font-size: 1.35rem;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  font-family: var(--font-title);
}

.sheet-section-lbl {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-secondary);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.sheet-para {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #475569;
  margin-bottom: 1rem;
}

/* Progress bar inside sheets */
.sheet-progress-wrapper {
  margin-bottom: 1rem;
}

.sheet-progress-lbl-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #1E293B;
}

.sheet-progress-track {
  height: 8px;
  background-color: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
}

.sheet-progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease-out;
}

/* Interactive sliding indicator scale */
.sheet-scale-bar {
  height: 12px;
  background: linear-gradient(90deg, #E11D48 0%, #FBBC05 50%, #27AE60 100%);
  border-radius: 6px;
  position: relative;
  margin: 1.25rem 0 0.5rem;
  width: 100%;
}

.sheet-scale-pin {
  position: absolute;
  top: -6px;
  width: 24px;
  height: 24px;
  background-color: #FFFFFF;
  border: 4px solid var(--accent-primary);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: left 0.5s ease-out;
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
}

.sheet-table th {
  background-color: #F8FAFC;
  color: #0D2C6C;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.8rem 0.85rem;
  text-align: left;
  border-bottom: 1.5px solid #E2E8F0;
  border-right: 1px solid #E2E8F0;
}

.sheet-table th:last-child {
  border-right: none;
}

.sheet-table td {
  padding: 0.8rem 0.85rem;
  font-size: 0.82rem;
  border-bottom: 1px solid #E2E8F0;
  border-right: 1px solid #E2E8F0;
  color: #334155;
  background-color: #FFFFFF;
}

.sheet-table td:last-child {
  border-right: none;
}

.sheet-table tr:last-child td {
  border-bottom: none;
}

/* Status Badges */
.status-badge-green {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.status-badge-green::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #22C55E;
  border-radius: 2px;
}

.status-badge-orange {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FED7AA;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.status-badge-orange::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #F97316;
  border-radius: 2px;
}

/* Redesigned Fingerprint List Selection States */
.finger-list-item:hover {
  background-color: rgba(13, 44, 108, 0.04);
}
.finger-list-item.active {
  box-shadow: 0 2px 8px rgba(13, 44, 108, 0.1);
}

/* RIASEC & Kolb detail page layout */
.submenu-tabs-bar {
  display: flex;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem;
  gap: 0.25rem;
  overflow-x: auto;
  white-space: nowrap;
}

.submenu-tab, .kolb-tab, .edu-tab {
  background-color: transparent;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.submenu-tab.active,
.kolb-tab.active,
.edu-tab.active {
  background-color: var(--accent-bg-alpha);
  color: var(--accent-primary);
}

.submenu-content-body {
  padding: 1.25rem;
}

.profile-alias-text {
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: var(--accent-secondary);
  margin-top: 0.2rem;
}

.bullet-list-custom {
  list-style: none;
  margin-top: 0.5rem;
}

.bullet-list-custom li {
  font-size: 0.88rem;
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.bullet-list-custom li::before {
  content: "•";
  color: var(--accent-secondary);
  font-weight: bold;
  position: absolute;
  left: 0.25rem;
  top: 0;
}

/* Quote styles */
.quote-card-container {
  background-color: #F8FAFC;
  border-left: 4px solid var(--accent-primary);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  font-style: italic;
}

.quote-card-container p {
  font-size: 0.88rem;
  color: #334155;
}

.quote-card-container strong {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: normal;
}

/* Chat & Interview style layouts */
.chat-body-content,
.interview-body-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.chat-subtitle-helper {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1rem;
}

.chat-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

.chat-history {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.chat-msg {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.chat-msg.incoming {
  align-self: flex-start;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-msg.outgoing {
  align-self: flex-end;
  background-color: var(--accent-primary);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

.chat-input-bar {
  display: flex;
  padding: 0.75rem;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  gap: 0.5rem;
}

.input-control {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  font-size: 0.9rem;
}

/* Modals overlays & Spinners */
.modal-overlay-custom {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.spinner-custom {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-overlay-custom h3 {
  color: #FFFFFF;
  font-size: 1.05rem;
  text-align: center;
  font-weight: 500;
  max-width: 320px;
  line-height: 1.5;
}

/* Google account simulated dialog */
.google-chooser-card {
  background-color: #FFFFFF;
  border-radius: 28px;
  width: 100%;
  max-width: 360px;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  color: #202124;
}

.google-chooser-title {
  font-size: 1.25rem;
  font-weight: 500;
  text-align: center;
  color: #202124;
  margin-bottom: 0.25rem;
}

.google-chooser-subtitle {
  font-size: 0.8rem;
  color: #5f6368;
  text-align: center;
  margin-bottom: 1.5rem;
}

.google-accounts-list {
  display: flex;
  flex-direction: column;
  border: 1px solid #DADCE0;
  border-radius: 12px;
  overflow: hidden;
}

.google-account-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.google-account-item:hover {
  background-color: #F8F9FA;
}

.google-avatar-sim {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent-secondary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.google-account-meta {
  display: flex;
  flex-direction: column;
}

.google-account-meta strong {
  font-size: 0.85rem;
  color: #3C4043;
}

.google-account-meta span {
  font-size: 0.72rem;
  color: #5F6368;
}

/* Switch toggle custom styling */
.switch-toggle-custom {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch-toggle-custom input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #CBD5E1;
  transition: .4s;
  border-radius: 34px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.switch-toggle-custom input:checked + .switch-slider {
  background-color: var(--accent-primary);
}

.switch-toggle-custom input:checked + .switch-slider:before {
  transform: translateX(22px);
}

/* Step list guide */
.step-guide-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.step-guide-num {
  width: 28px;
  height: 28px;
  background-color: var(--accent-bg-alpha);
  color: var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.step-guide-item div strong {
  font-size: 0.9rem;
  color: var(--text-primary);
  display: block;
}

.step-guide-item div p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
  line-height: 1.4;
}

.edu-content-sec {
  display: none;
  padding: 1.25rem;
}

.edu-content-sec.active {
  display: block;
}

/* Admin lists activities */
.admin-log-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-log-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
}

.admin-log-title-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-log-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* Profile fields details rows */
.profile-avatar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.user-avatar-large {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s ease;
}

.user-avatar-large::after {
  content: "📷";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 50%;
}

.user-avatar-large:hover::after {
  opacity: 1;
}

.profile-avatar-center h3 {
  font-size: 1.35rem;
  color: var(--text-primary);
}

.profile-avatar-center p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.profile-info-row {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.profile-info-row:last-child {
  border-bottom: none;
}

.profile-info-lbl {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.profile-info-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Interview Career setup badges */
.badge-row-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-career-select {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background-color: var(--bg-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.badge-career-select.active {
  background-color: var(--accent-primary);
  color: #FFFFFF;
  border-color: var(--accent-primary);
}

/* Profile and Admin screen bodies */
.profile-body-content {
  padding: 0 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}

.admin-body-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

/* Select control standalone */
.select-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.92rem;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.select-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-bg-alpha);
}

/* Chat nav item tab */
.nav-item[data-screen="chat"] .nav-icon-svg {
  font-size: 1.35rem;
}

/* Smooth dark-mode card override */
body.dark-mode .report-page-sheet {
  background-color: #0F172A;
  color: #F1F5F9;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

body.dark-mode .report-page-sheet .sheet-para,
body.dark-mode .report-page-sheet .sheet-progress-lbl-row,
body.dark-mode .report-page-sheet .sheet-table td {
  color: #CBD5E1;
}

body.dark-mode .report-page-sheet .sheet-main-title,
body.dark-mode .report-page-sheet .section-card-title {
  color: #93C5FD;
}

body.dark-mode .sheet-table th {
  background-color: rgba(29, 78, 216, 0.15);
  color: #93C5FD;
}

body.dark-mode .report-sheet-banner {
  background-color: rgba(29, 78, 216, 0.15);
  color: #93C5FD;
}

body.dark-mode .quote-card-container {
  background-color: #1E293B;
  border-left-color: #3B82F6;
}

body.dark-mode .quote-card-container p {
  color: #CBD5E1;
}

body.dark-mode .edu-promo-card {
  background-color: #064E3B;
  border-color: #047857;
}

body.dark-mode .edu-text-box h4 {
  color: #6EE7B7;
}

body.dark-mode .edu-text-box p {
  color: #A7F3D0;
}

body.dark-mode .google-chooser-card {
  background-color: #1E293B;
  color: #F1F5F9;
}

body.dark-mode .google-chooser-title,
body.dark-mode .google-account-meta strong {
  color: #F1F5F9;
}

body.dark-mode .google-chooser-subtitle,
body.dark-mode .google-account-meta span {
  color: #94A3B8;
}

body.dark-mode .google-accounts-list {
  border-color: #334155;
}

body.dark-mode .google-account-item:hover {
  background-color: #0F172A;
}

body.dark-mode .btn-google-sso {
  background-color: #1E293B;
  color: #F1F5F9;
  border-color: #334155;
}

/* Scan AI loading overlay centered card */
#scan-loading-overlay,
#interview-loading-overlay {
  text-align: center;
  gap: 1rem;
}

/* ==========================================================================
   BIOMETRIC SCANNER (PWA PARITY WITH APK)
   ========================================================================== */

/* Scan laser line animation */
@keyframes scanLineAnim {
  0% {
    top: 0;
  }
  50% {
    top: 100%;
  }
  100% {
    top: 0;
  }
}

.scanner-laser-overlay {
  animation: scanLineAnim 2.2s infinite ease-in-out;
}

/* Finger button checkmarks and scanned styles */
.finger-select-btn {
  position: relative;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-dark, #333333);
  transition: all 0.2s ease;
  overflow: hidden;
}

.finger-select-btn.active {
  border-color: #0D2C6C !important;
  background: rgba(13, 44, 108, 0.08) !important;
  color: #0D2C6C !important;
}

.finger-select-btn.scanned {
  background: #27ae60 !important;
  border-color: #27ae60 !important;
  color: #ffffff !important;
}

.finger-select-btn.scanned small {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Dark mode overrides for finger buttons */
body.dark-mode .finger-select-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

body.dark-mode .finger-select-btn.active {
  background: rgba(0, 210, 255, 0.15) !important;
  border-color: #00d2ff !important;
  color: #00d2ff !important;
}

body.dark-mode .finger-select-btn.scanned {
  background: #2ecc71 !important;
  border-color: #2ecc71 !important;
  color: #0f172a !important;
}

body.dark-mode .finger-select-btn.scanned small {
  color: rgba(15, 23, 42, 0.8) !important;
}

/* Segmented Control Scan Mode */
.scan-mode-segmented {
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.scan-mode-btn {
  transition: all 0.2s ease;
  font-size: 0.82rem;
}

body.dark-mode .scan-mode-segmented {
  background: rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .scan-mode-btn {
  color: #94a3b8;
}

body.dark-mode .scan-mode-btn.active {
  background: #00d2ff !important;
  color: #0f172a !important;
}

/* Camera Video Mirror / Overlay styling */
#camera-video {
  transform: none;
}

.cam-ctrl-btn {
  transition: background-color 0.2s;
}

.cam-ctrl-btn:hover {
  background-color: rgba(0,0,0,0.85) !important;
}

/* Biometric pulse glow animation for fingerprint SVG */
@keyframes pulseGlow {
  0% {
    transform: scale(1);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
    color: #00D2FF;
  }
  100% {
    transform: scale(1);
    opacity: 0.65;
  }
}

.fingerprint-glow-svg {
  animation: pulseGlow 2.2s infinite ease-in-out;
}

/* Custom Date Input for iOS and Mobile browser compatibility */
.custom-date-input {
  width: 100%;
  padding: 0.95rem 1rem 0.95rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
  transition: var(--transition-smooth);
}

.custom-date-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-bg-alpha);
}

/* Hide native Webkit calendar picker icon on iOS but keep it clickable */
.custom-date-input::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
}

/* Enforce compact layout on 10 fingers list to prevent horizontal overflow on narrow mobile screens (e.g. iPhone) */
.finger-list-item {
  padding: 0.35rem 0.25rem !important;
  gap: 0.25rem !important;
}

.finger-badge {
  width: 18px !important;
  height: 18px !important;
  font-size: 0.6rem !important;
  border-radius: 4px !important;
}

.finger-image-preview-wrapper {
  width: 32px !important;
  height: 32px !important;
  border-radius: 4px !important;
}

.finger-image-preview-wrapper img {
  width: 100% !important;
  height: 100% !important;
}

.finger-list-item span {
  font-size: 0.68rem !important;
}

.finger-list-item small.finger-status {
  font-size: 0.58rem !important;
}

/* Participant Cards styling in Home Screen */
.participant-card {
  width: 130px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-premium);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.participant-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-secondary);
}

.participant-card-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-bg-alpha);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
  border: 2px solid var(--border-color);
}

.participant-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.participant-card-name {
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.participant-card-ktp {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: monospace;
}

.participant-card-action {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 0.4rem;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 4px;
  align-items: center;
}

.participant-card-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(225, 29, 72, 0.1);
  color: var(--accent-rose);
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  cursor: pointer;
  z-index: 5;
  transition: var(--transition-smooth);
}

.participant-card-delete:hover {
  background: var(--accent-rose);
  color: white;
}

.photo-upload-row:hover {
  border-color: var(--accent-secondary) !important;
  background: rgba(47, 128, 237, 0.03) !important;
}
