:root {
  color-scheme: light;
  --gold: #f59e0b;
  --gold-dark: #b45309;
  --gold-hover: #d97706;
  --ink: #0f172a;
  --slate: #1e293b;
  --muted: #475569;
  --paper: #f8fafc;
  --border: #dbe1e8;
  --radius: 0.5rem;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    1rem/1.65 "Segoe UI",
    system-ui,
    sans-serif;
}
body.modal-open {
  overflow: hidden;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.65rem);
  font-weight: 750;
  letter-spacing: -0.04em;
}
h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.15rem;
}
p + p,
h2 + p,
h3 + p {
  margin-top: 0.85rem;
}
a {
  color: var(--gold-dark);
  text-underline-offset: 0.22em;
  overflow-wrap: anywhere;
}
a:hover {
  text-decoration-thickness: 2px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: #fef3c7;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--gold-dark);
  outline-offset: 4px;
}
.site-header :focus-visible,
.hero :focus-visible,
footer :focus-visible {
  outline-color: var(--gold);
}
ul,
ol {
  padding-left: 1.3rem;
}
li + li {
  margin-top: 0.55rem;
}
svg {
  display: block;
  width: 100%;
  height: auto;
}
.wrap {
  width: min(100% - 2rem, 1180px);
  margin-inline: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 1rem;
  transform: translateY(-200%);
  z-index: 10;
  padding: 0.7rem 1rem;
  background: white;
  color: var(--ink);
}
.skip-link:focus {
  transform: none;
}
.site-header {
  background: var(--ink);
  color: white;
  border-top: 4px solid var(--gold);
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: white;
  text-decoration: none;
}
.brand strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.015em;
}
.brand small {
  display: block;
  color: #cbd5e1;
  font-size: 0.75rem;
}
.brand-mark {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  border: 1px solid #64748b;
  padding: 0.25rem 0.45rem;
}
.brand-mark span {
  color: var(--gold);
}
.faculty {
  display: none;
  font-size: 0.8rem;
  color: #cbd5e1;
}
.menu-toggle {
  background: transparent;
  border: 1px solid #94a3b8;
  color: white;
  min-height: 44px;
  padding: 0.4rem 0.7rem;
  border-radius: 0.25rem;
}
.navigation {
  display: flex;
  flex-direction: column;
  padding-block: 0.3rem 1rem;
  gap: 0.25rem;
}
.nav-btn {
  color: #e2e8f0;
  padding: 0.7rem 0.8rem;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 3px solid transparent;
}
.nav-btn:hover {
  background: var(--slate);
}
.nav-btn.active {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--slate);
}
main {
  min-height: 65vh;
  padding-block: 1.25rem 3rem;
}
.page-section {
  min-width: 0;
}
.hero {
  display: grid;
  background: var(--ink);
  color: white;
  border-radius: var(--radius);
}
.hero-copy {
  padding: 1.5rem;
}
.eyebrow {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--gold-dark);
  margin-bottom: 1rem;
}
.hero .eyebrow {
  color: #fbbf24;
}
.hero h1 em {
  color: #fbbf24;
  font-style: normal;
}
.hero-copy > p:not(.eyebrow) {
  color: #cbd5e1;
  margin-top: 1.5rem;
  max-width: 52ch;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.7rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.3rem;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  text-align: center;
}
.btn.primary {
  background: var(--gold);
  color: var(--ink);
}
.btn.primary:hover {
  background: var(--gold-hover);
}
.btn.light {
  background: #fff;
  color: var(--ink);
}
.btn.light:hover {
  background: #e2e8f0;
}
.btn.outline {
  background: white;
  border-color: #64748b;
  color: var(--ink);
}
.btn.outline:hover {
  background: #fef3c7;
  border-color: var(--gold-dark);
}
.btn:active,
.menu-toggle:active {
  transform: translateY(1px);
}
.hero-note {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: #cbd5e1;
}
.hero-note strong {
  display: block;
  color: #fff;
  margin-top: 0.2rem;
}
.hero-figure {
  min-width: 0;
  align-self: center;
  padding: 1rem 1.5rem 1.5rem;
}
.hero-figure figcaption {
  border-top: 1px solid #475569;
  padding-top: 1rem;
  font-size: 0.75rem;
  color: #e2e8f0;
}
.hero-figure figcaption span {
  display: block;
  color: #94a3b8;
}
.intro-band {
  display: grid;
  gap: 1rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.intro-band p {
  max-width: 80ch;
  color: var(--muted);
}
.intro-band strong {
  color: var(--ink);
}
.text-link {
  font-weight: 650;
  display: inline-block;
  padding-block: 0.55rem;
}
.section-heading {
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
}
.section-heading .eyebrow {
  margin-bottom: 0.5rem;
}
.section-heading > p:last-child:not(.eyebrow) {
  margin-top: 0.75rem;
  color: var(--muted);
}
.vision-grid,
.contact-grid,
.leadership,
.grid-2,
.grid-3,
.gallery-grid {
  display: grid;
  gap: 1.25rem;
}
.vision-grid > *,
.contact-grid > *,
.grid-2 > *,
.grid-3 > *,
.leadership > * {
  min-width: 0;
}
.vision {
  background: #fff;
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.vision p {
  font-size: 1.15rem;
}
.numbered {
  margin-bottom: 0;
}
.gallery-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.gallery-item svg {
  background: var(--slate);
  border-radius: 0.45rem 0.45rem 0 0;
}
.gallery-item figcaption {
  padding: 1.2rem;
}
.gallery-item figcaption strong,
.gallery-item figcaption span {
  display: block;
}
.gallery-item figcaption span {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
.leadership {
  border-block: 1px solid var(--border);
  padding-block: 1.5rem;
}
.leadership small {
  color: var(--muted);
}
.leadership h3 {
  margin-top: 0.5rem;
}
.contact-grid {
  margin-block: 3.5rem;
  gap: 2rem;
}
address {
  font-style: normal;
  margin-block: 1rem;
}
.contact-grid > div > a {
  display: block;
  width: fit-content;
  padding-block: 0.4rem;
}
.spaced {
  margin-top: 1.5rem;
}
.journal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid #64748b;
  color: var(--ink);
  text-decoration: none;
}
.journal small,
.journal strong {
  display: block;
}
.journal strong {
  font-size: 1.7rem;
  letter-spacing: 0.04em;
}
.journal > span:last-child {
  font-size: 2rem;
}
.journal:hover {
  background: #fff;
}
.page-heading {
  padding-block: 1.5rem 2rem;
  max-width: 900px;
}
.page-heading > p:last-child {
  margin-top: 1.25rem;
  color: var(--muted);
  max-width: 72ch;
}
.notice {
  padding: 1.15rem 1.3rem;
  border: 1px solid #d97706;
  border-radius: 0.3rem;
  background: #fffbeb;
  margin-bottom: 1.75rem;
  color: #78350f;
}
.notice p {
  margin-top: 0.4rem;
}
.card {
  padding: 1.4rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 3px #0f172a06;
}
.card h2 {
  font-size: 1.25rem;
}
.card p,
.card li {
  color: var(--muted);
}
.index {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 1rem;
}
.source-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin-block: 1.5rem;
}
.course-list {
  border-top: 1px solid var(--border);
}
.course {
  display: grid;
  gap: 1rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.course h2 {
  font-size: 1.4rem;
}
.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}
.badge {
  background: #fef3c7;
  color: #78350f;
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  font-weight: 650;
}
.item-code {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 650;
}
.module-list {
  display: grid;
  gap: 0.3rem 1.5rem;
  margin-block: 1rem;
}
.module-list li {
  margin-top: 0;
}
.coordinator {
  font-size: 0.875rem;
  color: var(--muted);
}
.audiences {
  border-block: 1px solid var(--border);
  padding-block: 1.5rem;
}
.audiences h2 {
  font-size: 1.2rem;
}
.workflow {
  list-style: decimal-leading-zero;
  padding-left: 2rem;
}
.workflow li {
  padding: 0.75rem 0 0.75rem 0.5rem;
}
.workflow li::marker {
  color: var(--gold-dark);
  font-weight: 700;
}
.workflow p {
  max-width: 85ch;
  color: var(--muted);
}
.form-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.form-card .btn,
.form-card .text-link {
  margin-top: 1rem;
}
.form-unavailable {
  font-size: 0.875rem;
  font-weight: 600;
}
.filter-bar {
  display: grid;
  align-items: end;
  gap: 1rem;
}
.filter-bar label {
  display: block;
  font-size: 0.875rem;
  font-weight: 650;
  margin-bottom: 0.4rem;
}
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0.6rem 0.7rem;
  border: 1px solid #64748b;
  background: white;
  color: var(--ink);
  border-radius: 0.3rem;
}
.result-count {
  margin-block: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.equipment-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.equipment-category {
  font-size: 0.8rem;
  margin-block: 0.5rem;
}
.equipment-card h2 {
  margin-bottom: 0.25rem;
}
.equipment-card > p:not(.item-code):not(.equipment-category) {
  font-size: 0.9rem;
}
.equipment-card .storage {
  margin-bottom: 1.4rem;
}
.equipment-card .btn {
  margin-top: auto;
  width: 100%;
}
.empty-state {
  grid-column: 1 / -1;
  padding: 2rem 1.25rem;
  border: 1px dashed #64748b;
}
.table-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.table-responsive {
  max-width: 100%;
  overflow-x: auto;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  background: white;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
.table-responsive table {
  min-width: 680px;
}
caption {
  text-align: left;
  padding: 1rem;
  font-weight: 650;
}
th,
td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
thead th {
  background: var(--slate);
  color: white;
  font-weight: 600;
}
tbody th {
  width: 30%;
  font-weight: 600;
}
tbody tr:nth-child(even) {
  background: var(--paper);
}
dialog {
  width: min(780px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  color: var(--ink);
  box-shadow: 0 20px 70px #0004;
}
dialog::backdrop {
  background: #0f172abf;
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal-header .eyebrow {
  margin-bottom: 0.5rem;
}
.modal-header h2 {
  font-size: 1.4rem;
}
.close-btn {
  flex: 0 0 44px;
  min-height: 44px;
  background: var(--paper);
  border: 1px solid #64748b;
  border-radius: 0.25rem;
  font-size: 1.5rem;
  color: var(--ink);
}
#modalKartuBody > h3 {
  font-size: 1.4rem;
  margin-top: 0.5rem;
}
.equipment-details {
  margin-block: 1.5rem;
}
.equipment-details dt {
  font-weight: 650;
  margin-top: 1rem;
}
.equipment-details dd {
  margin: 0.25rem 0 0;
  color: var(--muted);
}
.sop {
  padding: 1.25rem;
  background: var(--paper);
  border: 1px solid var(--border);
}
.sop .source-note {
  margin-bottom: 0;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}
footer {
  background: var(--ink);
  color: #cbd5e1;
  padding-block: 2rem;
  font-size: 0.85rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}
footer strong {
  color: #fff;
}
footer a {
  color: #fbbf24;
}
@media (min-width: 40rem) {
  .wrap {
    width: min(100% - 3rem, 1180px);
  }
  main {
    padding-top: 2rem;
  }
  .grid-2,
  .grid-3,
  .gallery-grid,
  .leadership {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-bar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .filter-bar > button {
    justify-self: start;
  }
  .module-list {
    grid-template-columns: 1fr 1fr;
  }
  .hero-copy {
    padding: 2.5rem;
  }
  .hero-figure {
    max-width: 580px;
    width: 100%;
    margin-inline: auto;
  }
  .contact-grid,
  .vision-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .course {
    grid-template-columns: 160px 1fr;
  }
  .course-meta {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }
  dialog {
    padding: 2rem;
  }
  .equipment-details {
    display: grid;
    grid-template-columns: 11rem 1fr;
  }
  .equipment-details dt,
  .equipment-details dd {
    padding-block: 0.75rem;
    border-bottom: 1px solid var(--border);
    margin: 0;
  }
  .equipment-details dd {
    padding-left: 1rem;
  }
}
@media (min-width: 60.001rem) {
  .menu-toggle {
    display: none;
  }
  .faculty {
    display: block;
  }
  .navigation {
    flex-direction: row;
    justify-content: space-between;
    padding-bottom: 0;
  }
  .nav-btn {
    padding-inline: 0.65rem;
  }
  .hero {
    grid-template-columns: 1.2fr 1fr;
  }
  .hero-copy {
    padding: 3rem 0 3rem 2.75rem;
  }
  .hero-figure {
    padding: 2rem;
  }
  .intro-band {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 3rem;
  }
  .grid-3,
  .gallery-grid,
  .leadership {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .filter-bar {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  }
  .vision-grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 3rem;
  }
}
@media (max-width: 23rem) {
  .brand-mark {
    display: none;
  }
  .hero-copy {
    padding: 1.25rem;
  }
  .hero-figure {
    padding-inline: 1rem;
  }
  .actions .btn {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@page {
  size: A4;
  margin: 15mm;
}
@media print {
  body {
    background: white;
    color: black;
    font-size: 10pt;
  }
  body.modal-open {
    overflow: visible;
  }
  body.modal-open > :not(dialog) {
    display: none !important;
  }
  dialog[open] {
    display: block;
    position: static;
    width: 100%;
    max-width: none;
    max-height: none;
    height: auto;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  dialog::backdrop {
    background: transparent;
  }
  .modal-actions,
  .close-btn,
  .site-header,
  .skip-link {
    display: none !important;
  }
  .modal-header {
    break-after: avoid;
  }
  .equipment-details {
    display: block;
  }
  .equipment-details dt {
    margin-top: 0.6rem;
    padding: 0;
    border: 0;
    break-after: avoid;
  }
  .equipment-details dd {
    margin: 0.15rem 0 0;
    padding: 0;
    border: 0;
    color: black;
  }
  .sop {
    padding: 0.75rem;
    background: white;
    break-inside: avoid;
  }
  .source-note,
  .item-code,
  .eyebrow {
    color: black;
  }
  main {
    width: 100%;
    padding: 0;
  }
  .cart-drawer,
  .cart-floating-btn,
  .cart-backdrop,
  .toast-notification,
  .filter-chips,
  #iosInstallModal,
  #scannerModal,
  #installAppBtn {
    display: none !important;
  }
}
/* Reference diagrams use dark strokes on a light drawing surface. */
.gallery-art svg {
  background: #f1f5f9;
}
.gallery-item figcaption small {
  display: block;
  color: var(--muted);
  margin-top: 0.3rem;
}
.code,
.category,
.state,
.shelf,
.form-state {
  font-size: 0.85rem;
  color: var(--muted);
}
.equipment-card .code {
  margin-bottom: 0.75rem;
}
.equipment-card .shelf {
  margin-bottom: 1.25rem;
}
.form-state {
  display: block;
  margin-top: 1rem;
}
@media (min-width: 60.001rem) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}

/* ==========================================================================
   ENHANCED UI/UX, ANIMATIONS, FILTER CHIPS, & CART DRAWER
   ========================================================================== */

/* Micro-interactions: Card hover & tap tactile response */
.equipment-card,
.form-card,
.course {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s ease;
}

.equipment-card:hover,
.form-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -6px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  border-color: #cbd5e1;
}

.btn:active {
  transform: scale(0.97);
}

/* Category Filter Chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
  margin-bottom: 0.5rem;
}

.chip-btn {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: white;
  color: var(--slate);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip-btn:hover {
  border-color: var(--gold-dark);
  color: var(--gold-dark);
}

.chip-btn.active {
  background: var(--slate);
  color: white;
  border-color: var(--slate);
}

/* Card action row */
.equipment-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.equipment-actions .btn {
  flex: 1 1 auto;
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--ink);
  border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

/* Floating Action Button (Cart) */
.cart-floating-btn {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 850;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  background: var(--ink);
  color: white;
  border: 2px solid var(--gold);
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.925rem;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.35);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.cart-floating-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(15, 23, 42, 0.45);
}

.cart-floating-btn:active {
  transform: scale(0.96);
}

.cart-badge {
  background: var(--gold);
  color: var(--ink);
  font-size: 0.775rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  min-width: 1.4rem;
  text-align: center;
}

/* Cart Drawer Backdrop */
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 950;
  backdrop-filter: blur(2px);
  transition: opacity 0.25s ease;
}

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  z-index: 999;
  background: white;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
}

/* Mobile: Bottom Sheet */
@media (max-width: 48rem) {
  .cart-drawer {
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    border-radius: 1rem 1rem 0 0;
  }
}

/* Desktop: Slide-over Drawer */
@media (min-width: 48.001rem) {
  .cart-drawer {
    top: 0;
    right: 0;
    bottom: 0;
    width: min(100%, 26rem);
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  }
}

.cart-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}

.cart-drawer-header h2 {
  font-size: 1.25rem;
  margin-top: 0.15rem;
}

.cart-drawer-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-empty-message {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
}

.cart-item-info {
  flex: 1 1 auto;
  min-width: 0;
}

.cart-item-info strong {
  display: block;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-info small {
  color: var(--muted);
  font-size: 0.8rem;
}

.cart-item-stepper {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stepper-btn {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--paper);
  font-weight: 700;
  cursor: pointer;
}

.stepper-btn:hover {
  background: #e2e8f0;
}

.stepper-val {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.cart-remove-btn {
  background: transparent;
  border: none;
  color: #dc2626;
  font-size: 1.15rem;
  padding: 0.35rem;
  cursor: pointer;
  line-height: 1;
}

.cart-remove-btn:hover {
  color: #b91c1c;
}

.cart-student-meta {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.cart-student-meta label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate);
  margin-top: 0.6rem;
  margin-bottom: 0.25rem;
}

.cart-student-meta input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.cart-drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn-wa {
  background: #059669;
  color: white;
  border: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-wa:hover {
  background: #047857;
}

.cart-footer-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.35rem;
}

.btn.text-link {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--gold-dark);
  text-decoration: underline;
  cursor: pointer;
}

.btn.text-danger {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  color: #dc2626;
  cursor: pointer;
}

.btn.text-danger:hover {
  text-decoration: underline;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  z-index: 1200;
  max-width: min(90vw, 24rem);
  text-align: center;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ==========================================================================
   PWA & NATIVE APP EXPERIENCE (TOUCH OPTIMIZATION & INSTALL MODAL)
   ========================================================================== */

html {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior-y: contain;
}

body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.cart-floating-btn {
  bottom: calc(1.25rem + env(safe-area-inset-bottom));
  right: calc(1.25rem + env(safe-area-inset-right));
}

@media (max-width: 48rem) {
  .cart-drawer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

.btn-install {
  background: var(--ink);
  color: var(--gold);
  border: 1px solid var(--gold);
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.btn-install:hover {
  background: var(--gold);
  color: var(--ink);
}

/* iOS Install Dialog */
.ios-install-dialog {
  border: none;
  border-radius: 1rem;
  padding: 0;
  max-width: min(90vw, 28rem);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  background: white;
}

.ios-install-dialog::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
}

.ios-install-content {
  display: flex;
  flex-direction: column;
}

.ios-install-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}

.ios-install-header h2 {
  font-size: 1.15rem;
  margin: 0;
}

.ios-install-body {
  padding: 1.25rem 1.5rem;
}

.ios-install-body p {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--slate);
}

.ios-steps {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ios-svg-icon {
  width: 20px !important;
  height: 20px !important;
  display: inline-block;
  vertical-align: -3px;
  color: #0284c7;
  margin: 0 0.25rem;
  flex-shrink: 0;
}

.ios-install-dialog .close-btn {
  all: unset;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(118, 118, 128, 0.12);
  color: #8e8e93;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.ios-install-dialog .close-btn:hover {
  background: rgba(118, 118, 128, 0.24);
  color: var(--ink);
}

.ios-install-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--paper);
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   LIVE LAB STATUS BADGE
   ========================================================================== */
.lab-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 47.99rem) {
  .lab-status-badge {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border-width: 0;
  }
}

.lab-status-badge.open {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.lab-status-badge.closed {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.lab-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.lab-status-badge.open .lab-status-dot {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.lab-status-badge.closed .lab-status-dot {
  background: #ef4444;
}

/* ==========================================================================
   SEARCH BARCODE SCANNER BUTTON & INPUT GROUP
   ========================================================================== */
.search-input-group {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.search-input-group input[type="search"] {
  flex: 1;
  min-width: 0;
}

.btn-scan {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-scan:hover {
  background: #f1f5f9;
  border-color: var(--teal);
  color: var(--teal);
}

/* ==========================================================================
   SCANNER MODAL DIALOG
   ========================================================================== */
.scanner-dialog {
  border: none;
  border-radius: 1rem;
  padding: 0;
  max-width: min(92vw, 30rem);
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  background: #ffffff;
}

.scanner-dialog::backdrop {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
}

.scanner-dialog-content {
  display: flex;
  flex-direction: column;
}

.scanner-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.scanner-header h2 {
  font-size: 1.15rem;
  margin: 0.2rem 0 0;
}

.scanner-header .eyebrow {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.scanner-header .close-btn {
  all: unset;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(118, 118, 128, 0.12);
  color: #8e8e93;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
}

.scanner-header .close-btn:hover {
  background: rgba(118, 118, 128, 0.24);
  color: var(--ink);
}

.scanner-header .close-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.scanner-body {
  padding: 1.25rem 1.5rem;
}

.scanner-hint {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--slate);
  line-height: 1.4;
}

.scanner-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 220px;
  background: #0f172a;
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-reticle {
  position: absolute;
  width: 65%;
  height: 65%;
  pointer-events: none;
}

.reticle-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid #38bdf8;
}

.reticle-corner.tl {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 4px;
}

.reticle-corner.tr {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 4px;
}

.reticle-corner.bl {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
  border-bottom-left-radius: 4px;
}

.reticle-corner.br {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 4px;
}

.scanner-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8, 0 0 20px #0284c7;
  animation: scanLaser 2s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

@keyframes scanLaser {
  0% {
    top: 5%;
  }
  100% {
    top: 95%;
  }
}

.scanner-viewport.detected .scanner-laser {
  background: #10b981;
  box-shadow: 0 0 12px #10b981, 0 0 24px #059669;
  animation: none;
  top: 50%;
}

.scanner-message {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  margin: 0;
  padding: 0.35rem 0.65rem;
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  border-radius: 0.35rem;
  font-size: 0.8rem;
  text-align: center;
  backdrop-filter: blur(2px);
}

.scanner-footer {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  align-items: center;
  justify-content: space-between;
}

.btn-file-scan {
  font-size: 0.85rem;
  cursor: pointer;
  margin: 0;
}

/* ==========================================================================
   OFFICIAL FORMS & SHEETS CARDS
   ========================================================================== */
.official-access-card,
.official-sheets-card {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.official-access-card h3,
.official-sheets-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.official-hint {
  margin: 0 0 1.25rem;
  color: var(--slate);
  font-size: 0.85rem;
}

.official-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
}

.form-official-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  text-align: center;
  text-decoration: none;
}

.official-sheets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

.sheet-link-btn {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.sheet-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: var(--teal);
}

.sheet-badge {
  align-self: flex-start;
  padding: 0.15rem 0.5rem;
  background: #ecfdf5;
  color: #065f46;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sheet-link-btn strong {
  font-size: 0.95rem;
}

.sheet-link-btn small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}
