﻿:root {
  --bg: #f3f7ff;
  --sidebar-bg: #0f172a;
  --panel: #ffffff;
  --panel-soft: #f7f9ff;
  --line: #dfe9ff;
  --text: #111827;
  --muted: #5f6b7a;
  --primary: #3b82f6;
  --primary-soft: #ebf5ff;
  --green: #22c55e;
  --yellow: #fbbf24;
  --red: #ef4444;
  --shadow: 0 10px 22px rgba(59, 130, 246, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
}

.student-dashboard {
  background: #edf2f7;
  min-height: 100vh;
}

.student-topbar {
  background: linear-gradient(180deg, #111827 0%, #1f2b39 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: 70px;
  padding: 0 18px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

.student-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff !important;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 2rem;
  margin: 0;
}

.student-user-wrap {
  gap: 12px;
}

.student-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.94rem;
}

.student-user-pill .material-symbols-outlined {
  font-size: 18px;
  color: #9bc8ff;
}

.student-logout-btn {
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.student-logout-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
}

.student-dashboard .container {
  max-width: 1200px;
  padding-top: 22px;
  padding-bottom: 30px;
}

.student-panel {
  background: #fff;
  border: 1px solid #dfe7f3;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.student-panel .card-header {
  background: #fff;
  border-bottom: 1px solid #e7edf6;
  padding: 0.9rem 1.1rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: #111827;
}

.student-panel .card-body {
  background: #fff;
}

.student-dashboard .qr-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid #e7edf6;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.student-profile-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.student-profile-details > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 10px;
  font-size: 1rem;
}

.student-profile-details > div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.student-profile-details span:first-child {
  color: #6b7280;
}

.student-profile-details span:last-child {
  font-weight: 700;
  color: #111827;
}

.student-dashboard .text-success {
  color: #1a8f5b !important;
}

.student-dashboard .text-warning {
  color: #d08c00 !important;
}

.student-history-header {
  padding-right: 0.8rem;
}

.student-date-input {
  min-width: 150px;
  border: 1px solid #dfe7f3;
  border-radius: 10px;
  background: #fff;
}

.student-history-table thead th {
  background: #f8fafc;
  color: #49566b;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid #e7edf6;
  padding: 0.9rem 1rem;
}

.student-history-table tbody td {
  padding: 0.9rem 1rem;
  color: #374151;
  border-color: #edf2f7;
  vertical-align: middle;
}

.student-history-table .badge {
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.42rem 0.7rem;
}

.student-history-table .bg-success {
  background: #16a34a !important;
}

.student-history-table .bg-warning {
  background: #f4b740 !important;
  color: #fff !important;
}

@media (max-width: 767.98px) {
  .student-brand {
    font-size: 1.3rem;
  }

  .student-topbar {
    flex-wrap: wrap;
    min-height: auto;
    padding: 12px 14px;
  }

  .student-user-wrap {
    width: 100%;
    justify-content: space-between;
    margin-top: 8px;
  }

  .student-user-pill {
    font-size: 0.78rem;
    max-width: 100%;
  }

  .student-dashboard .container {
    padding-top: 16px;
  }
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
}

.login-page {
  min-height: 100vh;
  margin: 0;
  background: #f3f3f5;
  color: #1f2937;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

.login-page * { box-sizing: border-box; }

.login-surface {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10px 18px 10px;
}

.login-content {
  width: min(100%, 660px);
  text-align: center;
  padding-top: 0;
  margin-top: 0;
}

.login-brand {
  width: auto;
  height: auto;
  margin: 0 auto -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  border-radius: 0;
}

.login-brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.04));
}

.login-brand-logo-right {
  width: 128px;
  height: 128px;
}

.login-kicker {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(17, 24, 39, 0.7);
}

.login-content h1 {
  margin: 0;
  font-size: clamp(2.8rem, 4vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
  font-weight: 800;
  color: #111827;
}

.login-summary {
  margin-top: 12px;
  font-size: clamp(1.05rem, 1.5vw, 1.55rem);
  line-height: 1.5;
  letter-spacing: -0.04em;
  color: rgba(17, 24, 39, 0.78);
}

.login-summary strong { font-weight: 800; }

.login-content h2 {
  margin: 0 0 10px;
  font-size: clamp(2.15rem, 2.7vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
  font-weight: 800;
  color: #111827;
}

.login-content p {
  margin: 0 auto 14px;
  max-width: 550px;
  font-size: 1.08rem;
  color: rgba(17, 24, 39, 0.72);
}

.login-alert {
  width: min(100%, 490px);
  margin: 12px auto 15px;
  padding: 0.85rem 0.95rem;
  border-radius: 10px;
  background: rgba(239, 93, 105, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.12);
  color: #c43245;
  text-align: left;
  font-size: 0.98rem;
}

.login-role-picker {
  display: flex;
  width: min(100%, 500px);
  margin: 0 auto 12px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(17, 24, 39, 0.18);
  border-radius: 10px;
  overflow: hidden;
}

.login-role-btn {
  flex: 1;
  min-height: 46px;
  border: 0;
  background: transparent;
  color: rgba(17, 24, 39, 0.8);
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
}

.login-role-btn.is-active {
  background: rgba(255,255,255,0.45);
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.06);
}

.login-form {
  width: min(100%, 500px);
  margin: 0 auto;
  text-align: left;
}

.login-field-group {
  margin-bottom: 10px;
}

.login-field-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.98rem;
  font-weight: 700;
  color: rgba(17, 24, 39, 0.85);
}

.login-input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 10px;
  border: 1px solid rgba(17, 24, 39, 0.18);
  background: rgba(223, 235, 249, 0.82);
  padding: 0 12px;
}

.login-input-shell:focus-within {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}

.login-input-icon {
  font-size: 1.08rem;
  opacity: 0.8;
}

.login-input-shell input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 1.02rem;
  color: #111827;
  padding: 0.8rem 0;
}

.login-submit-btn {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #1d76d9 0%, #1e72d4 100%);
  color: white;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 18px rgba(29, 99, 201, 0.2);
}

.login-submit-btn span { font-size: 1.2rem; }

@media (max-width: 720px) {
  .login-role-picker {
    flex-direction: column;
  }

  .login-benefits {
    flex-direction: column;
    align-items: flex-start;
  }
}

.admin-app {
  background: var(--bg);
}

.admin-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 220px;
  background: linear-gradient(180deg, #0f1c34 0%, #132b4e 18%, #142d4d 52%, #0f1c34 100%);
  color: #fff;
  padding: 0 0 20px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 10px 0 28px rgba(59, 130, 246, 0.14);
  transition: transform 0.25s ease;
}

.sidebar-inner {
  padding: 8px 12px 0;
  min-height: 100%;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 10px 10px;
  margin-top: 0;
  background: linear-gradient(180deg, #edf6ff 0%, #dfeeff 100%);
  border-radius: 0 0 18px 18px;
  box-shadow: inset 0 -1px 0 rgba(17, 24, 39, 0.06);
}

.brand-icon {
  width: 100%;
  max-width: 172px;
  min-height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  overflow: visible;
  border: none;
}

.brand-mini-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand-mini-logo-right {
  width: 52px;
  height: 52px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.1;
}

.brand-title {
  font-size: 1.08rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #102d5c;
}

.brand-subtitle {
  font-size: 0.66rem;
  color: rgba(16, 45, 92, 0.72);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
}

.nav-label {
  margin: 10px 10px 6px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(15, 23, 42, 0.35);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  transform: none;
}

.nav-item .material-symbols-outlined {
  font-size: 18px;
  color: #dff6ff;
}

.sidebar-card {
  margin: 18px 12px 0;
  border-radius: 14px;
  background: rgba(147, 197, 253, 0.14);
  border: 1px solid rgba(191, 219, 254, 0.38);
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.sidebar-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-card-head .material-symbols-outlined {
  font-size: 18px;
  color: #7dd3fc;
}

.sidebar-card p {
  margin: 8px 0 0;
  color: rgba(255,255,255,0.7);
  font-size: 0.79rem;
}

.scan-sidebar-logout {
  display: none;
}

.scan-admin-app .scan-sidebar-logout {
  display: flex;
  margin: 14px 12px 0;
  color: rgba(255,255,255,0.86);
}

.scan-admin-app .scan-sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fff;
}

.admin-main {
  margin-left: 220px;
  min-height: 100vh;
  transition: margin-left 0.25s ease;
}

.sidebar-collapsed .admin-sidebar {
  transform: translateX(-100%);
}

.sidebar-collapsed .admin-main {
  margin-left: 0;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 20px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.scan-admin-app .admin-topbar {
  position: static;
  height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.scan-admin-app .topbar-left {
  position: fixed;
  top: 18px;
  left: 240px;
  z-index: 20;
  transition: left 0.25s ease;
}

.scan-admin-app.sidebar-collapsed .topbar-left {
  left: 20px;
}

.scan-admin-app .topbar-right {
  display: none;
}

.topbar-left {
  display: flex;
  align-items: center;
}

.sidebar-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.scan-admin-app #sidebarToggle {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-account {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-info-hidden .topbar-account {
  display: none;
}

.account-info-toggle {
  cursor: pointer;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.user-pill .user-icon {
  color: var(--primary);
  font-size: 18px;
}

.logout-btn {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.admin-content {
  padding: 24px 24px 40px;
}

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

.page-title-block h4 {
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.page-title-block p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--panel);
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.stat-card[data-tone="success"] { border-left-color: var(--green); }
.stat-card[data-tone="warning"] { border-left-color: var(--yellow); }
.stat-card[data-tone="danger"] { border-left-color: var(--red); }

.stat-card .card-body {
  padding: 18px 18px 16px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 12px;
}

.stat-number {
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 800;
  color: var(--text);
}

.text-success { color: var(--green); }
.text-warning { color: var(--yellow); }
.text-danger { color: var(--red); }

.main-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 18px;
  margin-bottom: 18px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1.9fr 0.9fr;
  gap: 18px;
}

.dashboard-panel {
  background: var(--panel);
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 18px 16px;
}

.panel-title {
  margin: 0 0 18px;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text);
}

.bar-chart {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  min-height: 170px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 10px;
  min-height: 140px;
}

.bar {
  display: block;
  width: 100%;
  max-width: 40px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #7bb8ff 0%, #1f6feb 100%);
}

.bar-group label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.donut-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0 4px;
}

.donut-ring {
  position: relative;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 0%, var(--yellow) 0 0%, var(--red) 0 100%);
  display: grid;
  place-items: center;
}

.donut-ring::before {
  content: "";
  position: absolute;
  width: 104px;
  height: 104px;
  background: var(--panel);
  border-radius: 50%;
}

.donut-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.donut-center strong {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.donut-center span {
  font-size: 0.75rem;
  color: var(--muted);
}

.legend-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.legend-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
}

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

.dot-green { background: var(--green); }
.dot-yellow { background: var(--yellow); }
.dot-red { background: var(--red); }

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

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

.table th,
.table td {
  border-top: 1px solid var(--line);
  padding: 11px 10px;
  vertical-align: middle;
  font-size: 0.8rem;
}

.table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dfefff, #d5ffef);
  color: var(--primary);
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.status-badge.success {
  background: rgba(42, 181, 116, 0.12);
  color: var(--green);
}

.status-badge.warning {
  background: rgba(244, 184, 63, 0.12);
  color: var(--yellow);
}

.quick-panel .quick-actions {
  display: grid;
  gap: 10px;
}

.quick-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.quick-actions .btn-primary {
  background: var(--primary-soft);
  border-color: rgba(31,111,235,.2);
  color: var(--primary);
}

.quick-actions .btn-outline-secondary {
  background: #fff;
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    width: 200px;
  }

  .admin-main {
    margin-left: 200px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .admin-sidebar {
    width: 180px;
  }

  .admin-main {
    margin-left: 180px;
  }

  .admin-content {
    padding: 18px 14px 32px;
  }

  .content-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .page-title-block h4 {
    font-size: 1.7rem;
  }

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

.student-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  min-height: 200px;
}

.student-qr-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.05);
}

.student-qr-actions {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.student-dashboard .student-download-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 170px;
  min-height: 42px;
  padding: 0.7rem 1.1rem;
  border: 1px solid #0d6bd7;
  border-radius: 10px;
  background: linear-gradient(180deg, #2d90ff 0%, #0d6ce0 100%);
  color: #fff;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(13, 108, 224, 0.18);
  transition: none;
}

.student-dashboard .student-download-btn:hover,
.student-dashboard .student-download-btn:focus,
.student-dashboard .student-download-btn:active {
  background: linear-gradient(180deg, #2d90ff 0%, #0b5ec2 100%);
  color: #fff;
  border-color: #0b5ec2;
  box-shadow: 0 4px 10px rgba(13, 108, 224, 0.18);
}

.student-dashboard .student-download-btn .material-symbols-outlined {
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.scan-page {
  max-width: 1120px;
  margin: 0 auto;
}

.scan-welcome {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  overflow: hidden;
  padding: 28px 34px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 5% 0%, rgba(147, 197, 253, 0.24), transparent 34%),
    linear-gradient(120deg, #eff6ff 0%, #fff 58%, #eff6ff 100%);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.09);
}

.scan-logos {
  display: flex;
  align-items: center;
  gap: 16px;
}

.scan-logo {
  display: flex;
  width: 76px;
  height: 76px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.07);
}

.scan-logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.scan-logo-divider {
  width: 1px;
  height: 42px;
  background: #cbd5e1;
}

.scan-welcome-copy {
  min-width: 0;
}

.scan-eyebrow {
  display: inline-block;
  margin-bottom: 5px;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.scan-welcome-copy h1 {
  margin: 0;
  color: #1e3a8a;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.scan-welcome-copy p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 0.92rem;
}

.scan-clock {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 205px;
  padding: 14px 18px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.scan-clock > .material-symbols-outlined {
  color: #2563eb;
  font-size: 28px;
}

.scan-clock time {
  display: block;
  color: #1e3a8a;
  font-size: 1.65rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.scan-clock-date {
  margin-top: 4px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.scan-schedule-note {
  margin: 12px 2px 18px;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.6;
}

.scan-schedule-note strong {
  color: #334155;
}

.scan-success-popup {
  position: fixed;
  z-index: 1080;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.48);
  animation: scan-popup-fade-in 180ms ease-out;
}

.scan-success-popup[hidden] {
  display: none;
}

.scan-success-popup__card {
  position: relative;
  width: min(100%, 440px);
  padding: 34px 30px 30px;
  border: 1px solid #bbf7d0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  text-align: center;
  animation: scan-popup-rise-in 220ms ease-out;
}

.scan-success-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
}

.scan-success-popup__close:hover {
  background: #e2e8f0;
}

.scan-success-popup__icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
}

.scan-success-popup.is-info .scan-success-popup__card {
  border-color: #bfdbfe;
}

.scan-success-popup.is-info .scan-success-popup__icon {
  background: #dbeafe;
  color: #1d4ed8;
}

.scan-success-popup.is-info .scan-success-popup__eyebrow,
.scan-success-popup.is-info .scan-success-popup__details > span {
  color: #1d4ed8;
}

.scan-success-popup.is-info .scan-success-popup__card h2 {
  color: #1e3a8a;
}

.scan-success-popup.is-danger .scan-success-popup__card {
  border-color: #fecaca;
}

.scan-success-popup.is-danger .scan-success-popup__icon {
  background: #fee2e2;
  color: #b91c1c;
}

.scan-success-popup.is-danger .scan-success-popup__eyebrow,
.scan-success-popup.is-danger .scan-success-popup__details > span {
  color: #b91c1c;
}

.scan-success-popup.is-danger .scan-success-popup__card h2 {
  color: #7f1d1d;
}

.scan-success-popup__icon .material-symbols-outlined {
  font-size: 36px;
  font-weight: 700;
}

.scan-success-popup__eyebrow {
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.scan-success-popup__card h2 {
  margin: 7px 0 12px;
  color: #14532d;
  font-size: 1.55rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.scan-success-popup__details {
  color: #334155;
  font-size: 0.98rem;
  line-height: 1.8;
}

.scan-success-popup__details > span {
  color: #166534;
  font-weight: 800;
}

@keyframes scan-popup-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scan-popup-rise-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.scan-results {
  margin-top: 14px;
}

.scan-result-card,
.scan-input-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.scan-result-card {
  display: flex;
  min-height: clamp(360px, calc(100vh - 360px), 650px);
  flex-direction: column;
}

.scan-result-card .card-header,
.scan-input-card .card-header {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
  color: #1e293b;
  font-weight: 800;
}

.scan-result-card .card-header > .material-symbols-outlined {
  color: #2563eb;
}

.scan-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}

.scan-live-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 3px #dbeafe;
}

.scan-result-card .card-body {
  display: flex;
  flex: 1;
  padding: 16px;
}

.scan-result-empty {
  display: flex;
  min-height: 180px;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 13px;
  background: #f8fafc;
  font-size: 0.92rem;
}

.scan-result-empty .alert {
  width: 100%;
  min-height: 180px;
  margin: 0;
  align-content: center;
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.8;
  text-align: left;
}

.scan-result-empty .alert-success {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

.scan-result-empty .alert-success strong {
  color: #1e3a8a;
}

.scan-controls {
  margin-top: 42px;
}

.scan-mode-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 14px;
}

.scan-mode-heading h2 {
  margin: 0;
  color: #1e293b;
  font-size: 1.05rem;
  font-weight: 800;
}

.scan-mode-heading p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.8rem;
}

.scan-mode-switch {
  padding: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.scan-mode-switch .btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 9px !important;
  font-size: 0.82rem;
  font-weight: 700;
}

.scan-mode-switch .material-symbols-outlined {
  font-size: 18px;
}

.scan-mode-switch .btn-primary {
  border-color: #2563eb;
  background: #2563eb;
}

.scan-mode-switch .btn-outline-primary {
  border-color: transparent;
  color: #64748b;
}

.scan-mode-switch .btn-outline-primary:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.scan-tip {
  border-radius: 12px;
  color: #475569;
  font-size: 0.82rem;
}

.scan-input-card .card-body {
  padding: 18px;
}

.scan-input-card textarea {
  min-height: 76px;
}

@media (max-width: 767.98px) {
  .scan-welcome {
    grid-template-columns: 1fr auto;
    gap: 18px 14px;
    padding: 22px 18px;
  }

  .scan-logos {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .scan-logo {
    width: 64px;
    height: 64px;
    border-radius: 15px;
  }

  .scan-logo-divider {
    height: 34px;
  }

  .scan-welcome-copy {
    grid-column: 1 / -1;
    text-align: center;
  }

  .scan-clock {
    grid-column: 1 / -1;
    justify-self: center;
    min-width: 210px;
  }

  .scan-schedule-note {
    margin-bottom: 14px;
  }

  .scan-result-card {
    min-height: clamp(300px, calc(100vh - 440px), 520px);
  }

  .scan-controls {
    margin-top: 32px;
  }

  .scan-mode-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .scan-live-indicator {
    font-size: 0;
  }

  .scan-live-indicator span {
    margin-left: 4px;
  }

  .scan-mode-switch {
    width: 100%;
  }

  .scan-mode-switch .btn {
    justify-content: center;
    flex: 1;
  }
}

.student-qr-note {
  margin: 0;
  color: var(--muted);
  text-align: left;
  max-width: 420px;
  font-size: 0.92rem;
}

.student-profile-box {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.student-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.student-profile-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.student-profile-row span {
  color: var(--muted);
}

.student-profile-row strong {
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 575.98px) {
  .admin-sidebar {
    display: none;
  }

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

  .admin-topbar {
    padding: 0 12px;
  }

  .scan-admin-app .topbar-left,
  .scan-admin-app.sidebar-collapsed .topbar-left {
    left: 16px;
  }

  .user-pill span:nth-child(2) {
    display: none;
  }

  .login-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .login-hero h1 {
    font-size: 2.5rem;
  }
}
