/* THE TANANCHAi — SMART ATTENDANCE */
/* Design Tokens: Navy / White / Orange */

:root {
  --navy-900: #0F172A;
  --navy-800: #1E293B;
  --navy-700: #334155;
  --surface: #FFFFFF;
  --background: #F8FAFC;
  --orange-600: #EA580C;
  --orange-500: #F97316;
  --orange-100: #FFEDD5;
  --emerald-600: #059669;
  --emerald-100: #D1FAE5;
  --amber-600: #D97706;
  --amber-100: #FEF3C7;
  --rose-600: #E11D48;
  --rose-100: #FFE4E6;
  --slate-400: #94A3B8;
  --slate-200: #E2E8F0;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--navy-900);
  line-height: 1.5;
  min-height: 100vh;
}

/* App Layout with Left Sidebar (All Functions on Left Side) */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Left Sidebar */
.sidebar {
  width: 270px;
  background-color: var(--navy-900);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--navy-800);
  flex-shrink: 0;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--navy-800);
  margin-bottom: 1.25rem;
}

.brand-badge {
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: white;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.brand h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: white;
  line-height: 1.3;
}

.sidebar-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #64748B;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  color: #94A3B8;
  border: 1px solid transparent;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
  width: 100%;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: white;
  background: var(--navy-800);
}

.tab-btn.active {
  color: white;
  background: var(--orange-600);
  border-color: var(--orange-500);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--navy-800);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  margin-right: 0.4rem;
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  max-width: calc(100vw - 270px);
  background-color: var(--background);
}

/* Container & Cards */
.container {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--slate-200);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy-900);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-700);
  margin-bottom: 0.25rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--orange-500);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--orange-600);
  color: white;
}

.btn-primary:hover {
  background-color: #C2410C;
}

.btn-secondary {
  background-color: var(--navy-800);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--navy-700);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--slate-200);
  color: var(--navy-800);
}

.btn-outline:hover {
  background-color: var(--background);
}

.btn-success {
  background-color: var(--emerald-600);
  color: white;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-present { background-color: var(--emerald-100); color: var(--emerald-600); }
.badge-late { background-color: var(--amber-100); color: var(--amber-600); }
.badge-excused { background-color: #E0E7FF; color: #4338CA; }
.badge-absent { background-color: var(--rose-100); color: var(--rose-600); }
.badge-not-conducted { background-color: #F1F5F9; color: var(--slate-400); }
.badge-dropped { background-color: #FEE2E2; color: #991B1B; }

/* Grid Matrix Table */
.table-responsive {
  overflow-x: auto;
}

table.attendance-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

table.attendance-matrix th,
table.attendance-matrix td {
  padding: 0.6rem 0.5rem;
  text-align: center;
  border: 1px solid var(--slate-200);
}

table.attendance-matrix th {
  background-color: #F1F5F9;
  font-weight: 700;
  color: var(--navy-800);
}

table.attendance-matrix th.student-col,
table.attendance-matrix td.student-col {
  text-align: left;
  min-width: 160px;
  font-weight: 600;
}

/* Projector View Styles */
.projector-fullscreen {
  background-color: var(--navy-900);
  color: white;
  min-height: 100vh;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.projector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--navy-800);
  padding-bottom: 1.5rem;
}

.projector-main {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin: 3rem 0;
  gap: 2rem;
}

.qr-box {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-code-canvas {
  width: 280px;
  height: 280px;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--navy-900);
  border-radius: 8px;
}

.countdown-timer {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--orange-600);
}

.projector-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat-item {
  background: var(--navy-800);
  padding: 1.25rem 2rem;
  border-radius: 12px;
  text-align: center;
}

.stat-num {
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--orange-500);
}

.stat-label {
  font-size: 0.95rem;
  color: #94A3B8;
  font-weight: 600;
}

.privacy-ticker {
  background: var(--navy-800);
  padding: 1rem;
  border-radius: 10px;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  white-space: nowrap;
}

.ticker-item {
  background: rgba(255,255,255,0.06);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  padding: 1.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

/* Print Styles */
@media print {
  header, .sidebar, .nav-tabs, .btn, .no-print {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .main-content {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .card {
    border: none;
    box-shadow: none;
    padding: 0;
  }
  table.attendance-matrix th, table.attendance-matrix td {
    border-color: #64748B;
  }
}

/* Dashboard Overview Tokens & Components (Frontend Design Skill Principles) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.15s ease;
}

.stat-box:hover {
  border-color: var(--slate-400);
}

.stat-box-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748B;
}

.stat-box-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.1;
}

.stat-box-sub {
  font-size: 0.75rem;
  color: #94A3B8;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  border-left: 4px solid var(--navy-900);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.section-card.active-session {
  border-left-color: var(--emerald-600);
}

.section-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.section-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.3;
}

.section-card-meta {
  font-size: 0.85rem;
  color: #64748B;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.section-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--slate-200);
  padding-top: 0.75rem;
}

.badge-major {
  display: inline-block;
  background: #EEF2F6;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin: 0.15rem;
  border: 1px solid #CBD5E1;
}

.empty-state-box {
  background: white;
  border: 1px dashed var(--slate-400);
  border-radius: 8px;
  padding: 3rem 1.5rem;
  text-align: center;
  color: #64748B;
  margin-bottom: 1.5rem;
}

/* Responsive adjustment for Mobile */
@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    padding: 1rem;
    border-right: none;
    border-bottom: 1px solid var(--navy-800);
  }
  .sidebar-section-title, .sidebar-footer {
    display: none;
  }
  .nav-tabs {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .tab-btn {
    width: auto;
    font-size: 0.8rem;
    padding: 0.4rem 0.65rem;
  }
  .main-content {
    max-width: 100%;
    padding: 1rem;
  }
}


/* --- Enhanced Executive Dashboard & Workspace Styles --- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  background: white;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--slate-200);
  margin-bottom: 1.25rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 140px;
  flex: 1;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748B;
  letter-spacing: 0.5px;
}

.filter-select {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  font-size: 0.85rem;
  background-color: #F8FAFC;
  color: var(--navy-900);
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.filter-select:focus {
  outline: none;
  border-color: var(--orange-500);
  background-color: white;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.chart-card {
  background: white;
  border-radius: 8px;
  border: 1px solid var(--slate-200);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.chart-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chart-container {
  width: 100%;
  height: 240px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: #475569;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Workspace Sub-Navigation */
.subnav-tabs {
  display: flex;
  border-bottom: 2px solid var(--slate-200);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.subnav-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: -2px;
  transition: all 0.15s ease;
}

.subnav-btn:hover {
  color: var(--navy-900);
}

.subnav-btn.active {
  color: var(--orange-600);
  border-bottom-color: var(--orange-600);
  font-weight: 700;
}

/* Gradebook Table & Score Inputs */
.gradebook-table-container {
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  background: white;
  margin-top: 1rem;
}

.gradebook-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.gradebook-table th, .gradebook-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--slate-200);
}

.gradebook-table th {
  background: #F8FAFC;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.gradebook-table td.score-cell {
  text-align: center;
  padding: 0.35rem;
}

.score-input {
  width: 65px;
  padding: 0.35rem 0.45rem;
  text-align: center;
  border: 1px solid var(--slate-200);
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-900);
  font-family: inherit;
  transition: all 0.15s ease;
}

.score-input:focus {
  outline: none;
  border-color: var(--orange-500);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.15);
}

.score-input.unrecorded {
  color: #94A3B8;
  background-color: #F8FAFC;
}

.grade-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-weight: 800;
  border-radius: 4px;
  font-size: 0.85rem;
  text-align: center;
}

.grade-A { background: #DCFCE7; color: #166534; }
.grade-BP { background: #E0F2FE; color: #075985; }
.grade-B { background: #E0E7FF; color: #3730A3; }
.grade-CP { background: #FEF9C3; color: #854D0E; }
.grade-C { background: #FEF08A; color: #713F12; }
.grade-DP { background: #FFEDD5; color: #9A3412; }
.grade-D { background: #FEE2E2; color: #991B1B; }
.grade-F { background: #FEE2E2; color: #991B1B; font-weight: 900; }
.grade-I { background: #F1F5F9; color: #64748B; font-style: italic; }

.finalized-banner {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Instructor Profile Layout */
.profile-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 1.5rem;
}

.avatar-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #F8FAFC;
  border-radius: 8px;
  border: 1px dashed var(--slate-400);
}

.avatar-preview-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  background: #E2E8F0;
}

/* Impact Warning Modal Box */
.impact-warning-box {
  background: #FFF1F2;
  border: 1px solid #FECDD3;
  border-radius: 6px;
  padding: 1rem;
  color: #9F1239;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   DYNAMIC QR & FULLSCREEN PROJECTOR MODE (UX/UI SPECIFICATION v1.1)
   ========================================================================== */

body.fullscreen-qr-active .sidebar,
body.fullscreen-qr-active .topbar,
body.fullscreen-qr-active .navbar {
  display: none !important;
}

.qr-fullscreen-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #0A0F1D;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.qr-fs-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  padding: 1.5vh 3vw;
  box-sizing: border-box;
  justify-content: space-between;
}

.qr-fs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5vh;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.qr-fs-title-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.qr-fs-badge {
  display: inline-block;
  align-self: flex-start;
  background: #0284C7;
  color: #FFFFFF;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.qr-fs-course {
  font-size: clamp(1.4rem, 2.5vmin, 2.2rem);
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
  letter-spacing: -0.01em;
}

.qr-fs-subtitle {
  font-size: clamp(0.95rem, 1.6vmin, 1.25rem);
  color: #94A3B8;
  margin: 0;
}

.qr-fs-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-fs-toggle-test {
  background: rgba(14, 165, 233, 0.2);
  color: #38BDF8;
  border: 1px solid #0284C7;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-size: clamp(0.85rem, 1.4vmin, 1rem);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-fs-toggle-test:hover {
  background: #0284C7;
  color: #FFFFFF;
}

.btn-fs-exit {
  background: #E11D48;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-size: clamp(0.85rem, 1.4vmin, 1rem);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-fs-exit:hover {
  background: #BE123C;
}

/* 1:1 Square QR Card (Fits 16:9 and 4:3 Aspect Ratios) */
.qr-fs-center-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 2vh 0;
}

.qr-fs-card {
  background: #FFFFFF;
  border-radius: clamp(16px, 2.5vmin, 28px);
  padding: clamp(12px, 2vmin, 22px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(70vh, 70vw);
  height: min(70vh, 70vw);
  max-width: min(750px, 85vmin);
  max-height: min(750px, 85vmin);
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.qr-fs-svg-box {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-fs-svg-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Footer Dual Countdown Timers & Live Student Counters */
.qr-fs-footer {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 2vw;
  align-items: center;
  padding-top: 2vh;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.qr-fs-timer-card,
.qr-fs-counter-card {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1vh 1.5vw;
  text-align: center;
}

.qr-fs-timer-label,
.qr-fs-counter-label {
  font-size: clamp(0.8rem, 1.3vmin, 0.95rem);
  color: #94A3B8;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.qr-fs-timer-val {
  font-size: clamp(1.4rem, 2.5vmin, 2.2rem);
  font-weight: 800;
  color: #F97316;
  font-variant-numeric: tabular-nums;
}

.qr-fs-timer-card:last-child .qr-fs-timer-val {
  color: #38BDF8;
}

.qr-fs-counter-val {
  font-size: clamp(1.4rem, 2.5vmin, 2.2rem);
  font-weight: 800;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.qr-fs-percent-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  font-size: clamp(0.75rem, 1.2vmin, 0.9rem);
  font-weight: 700;
}

.qr-fs-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.qr-fs-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #F97316, #FB923C);
  width: 100%;
  transition: width 1s linear;
}

.qr-fs-timer-sub {
  font-size: clamp(0.75rem, 1.1vmin, 0.85rem);
  color: #64748B;
  margin-top: 0.2rem;
}

/* In-View Projector Mode Enhancements */
.projector-fullscreen {
  max-width: 1100px;
  margin: 0 auto;
}

.qr-code-canvas {
  width: 260px;
  height: 260px;
  margin: 0 auto 1rem auto;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.qr-code-canvas svg {
  width: 100%;
  height: 100%;
  display: block;
}
