/* LabSpace TI UMS v2 - Warm Stone Editorial Stylesheet */
:root {
  --bg: #ece8df;
  --surface: #f7f4ed;
  --surface-subtle: #e3ded3;
  --surface-elevated: #fbf9f4;
  --border: #d4cdc0;
  --border-strong: #bfb6a6;
  --ink: #1c1917;
  --ink-muted: #57534e;
  --navy: #1c1917;
  --navy-soft: #e3ded3;
  --accent: #1c1917;
  --accent-hover: #292524;
  --accent-ink: #faf8f5;

  --open-bg: #eaf5ec;
  --open-border: #8ec99a;
  --open-ink: #14532d;
  --open-bar: #16a34a;

  --busy-bg: #fbecec;
  --busy-border: #efb6b6;
  --busy-ink: #991b1b;
  --busy-bar: #dc2626;

  --reserved-bg: #eaf1fb;
  --reserved-border: #adc8f5;
  --reserved-ink: #1d4ed8;
  --reserved-bar: #2563eb;

  --pending-bg: #fbf2dd;
  --pending-border: #e6c67e;
  --pending-ink: #854d0e;
  --pending-bar: #d97706;

  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.05);
  --shadow-md: 0 14px 34px rgba(28, 25, 23, 0.14);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0c0c0e;
  --surface: #141417;
  --surface-subtle: #1c1c21;
  --surface-elevated: #1a1a1f;
  --border: #2a2a31;
  --border-strong: #3d3d47;
  --ink: #faf8f5;
  --ink-muted: #a8a29e;
  --navy: #faf8f5;
  --navy-soft: #26262c;
  --accent: #faf8f5;
  --accent-hover: #e7e5e4;
  --accent-ink: #141417;

  --open-bg: #0d2317;
  --open-border: #1e5b3d;
  --open-ink: #4ade80;
  --open-bar: #22c55e;

  --busy-bg: #271316;
  --busy-border: #69262d;
  --busy-ink: #fca5a5;
  --busy-bar: #ef4444;

  --reserved-bg: #111c33;
  --reserved-border: #1e3a8a;
  --reserved-ink: #93c5fd;
  --reserved-bar: #3b82f6;

  --pending-bg: #271b0d;
  --pending-border: #6b4714;
  --pending-ink: #fcd34d;
  --pending-bar: #f59e0b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 16px 38px rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scrollbar-gutter: stable;
}

html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

html.theme-transitioning body,
html.theme-transitioning .app-header,
html.theme-transitioning .lab-card,
html.theme-transitioning .summary-strip,
html.theme-transitioning .toolbar-card,
html.theme-transitioning .panel-card,
html.theme-transitioning .slot-cell,
html.theme-transitioning .timeline-rail,
html.theme-transitioning .btn,
html.theme-transitioning .icon-btn,
html.theme-transitioning .table-wrap,
html.theme-transitioning .hero-preview-card,
html.theme-transitioning .workflow-step-card,
html.theme-transitioning .landing-lab-card,
html.theme-transitioning .landing-feature-card,
html.theme-transitioning .landing-info-card,
html.theme-transitioning .faq-item,
html.theme-transitioning .landing-cta-card {
  transition: background-color 240ms ease, color 240ms ease, border-color 240ms ease !important;
}

html.ls-booting body {
  opacity: 0;
}

body {
  margin: 0;
  padding-top: 65px;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

a[href],
button,
summary,
select,
input[type="checkbox"],
input[type="radio"],
label[for] {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus {
  left: 16px;
}

/* Word-by-word GSAP Reveal Mask */
.word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.word-inner {
  display: inline-block;
}

/* Top Header & Navigation */
.app-header {
  background: rgba(247, 244, 237, 0.99);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
}
html[data-theme="dark"] .app-header {
  background: rgba(20, 20, 23, 0.97);
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
body.is-authenticated .header-inner {
  max-width: none;
  margin: 0;
  padding: 0 20px;
}
@media (min-width: 961px) {
  body.is-authenticated .hamburger-btn {
    display: none !important;
  }
}
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.hamburger-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.hamburger-btn:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}
.hamburger-btn[hidden] {
  display: none;
}
.header-route-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.header-route-pill[hidden] {
  display: none;
}
body.is-authenticated .desktop-nav {
  display: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s ease;
}
.brand:hover .brand-logo-img {
  transform: scale(1.06);
}
html[data-theme="dark"] .brand-logo-img {
  filter: drop-shadow(0 2px 6px rgba(96, 165, 250, 0.28)) brightness(1.22);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 3px;
}
.nav-tab {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-tab:hover {
  color: var(--ink);
  background: var(--surface-subtle);
}
.nav-tab.is-active {
  color: var(--ink);
  background: var(--surface-subtle);
}
.nav-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.auth-header-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px;
}
.lang-switcher-full {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}
.lang-btn {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 9px;
  min-height: 30px;
  border-radius: 7px;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}
.lang-btn:hover {
  color: var(--ink);
}
.lang-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.icon-btn:hover {
  background: var(--surface-subtle);
  color: var(--ink);
  transform: scale(1.07);
}
.icon-btn:active {
  transform: scale(0.92);
}
@keyframes bellRing {
  0%, 100% { transform: rotate(0deg); }
  12% { transform: rotate(15deg); }
  24% { transform: rotate(-13deg); }
  36% { transform: rotate(9deg); }
  48% { transform: rotate(-6deg); }
  60% { transform: rotate(0deg); }
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
#btn-notif svg {
  transform-origin: top center;
}
#btn-notif:hover svg,
#btn-notif[aria-expanded="true"] svg {
  animation: bellRing 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}
#btn-notif.has-unread svg {
  color: var(--ink);
  animation: bellRing 2.8s ease-in-out infinite;
}

/* Notification Bell & Popover */
.notif-wrap {
  position: relative;
}
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
  pointer-events: none;
  z-index: 2;
  animation: badgePulse 2.2s ease-in-out infinite;
}
.notif-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(340px, 90vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  z-index: 55;
  overflow: hidden;
  transform-origin: top right;
  animation: popEnter 160ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 700;
}
.notif-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.notif-item {
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.8125rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item:hover {
  background: var(--surface-subtle);
}
.notif-item strong {
  font-size: 0.8125rem;
}
.notif-item span {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.wib-clock-pill {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.user-menu-wrap {
  position: relative;
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8125rem;
  text-align: left;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  animation: pillPop 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.user-pill:hover {
  background: var(--surface-subtle);
  border-color: var(--border-strong);
}
.user-chevron {
  color: var(--ink-muted);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), color 0.16s ease;
  flex-shrink: 0;
}
.user-pill[aria-expanded="true"] .user-chevron {
  transform: rotate(180deg);
  color: var(--ink);
}
@keyframes profilePopIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes profileRowIn {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.user-menu-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 286px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 60;
  transform-origin: top right;
  animation: profilePopIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.user-menu-head {
  padding: 14px;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
}
.user-menu-hero {
  display: flex;
  align-items: center;
  gap: 11px;
}
.user-avatar-lg {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(155deg, #27272a 0%, #141821 100%);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: visible;
  box-shadow: var(--shadow-sm);
}
.user-online-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--surface-subtle);
}
.user-menu-identity {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-menu-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.user-menu-name-row strong {
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--open-bg);
  color: var(--open-ink);
  border: 1px solid var(--open-border);
  white-space: nowrap;
  flex-shrink: 0;
}
.user-role-pill.is-admin {
  background: var(--navy);
  color: var(--accent-ink);
  border-color: transparent;
}
.user-menu-id-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--ink-muted);
}
.user-copy-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}
.user-copy-btn:hover {
  background: var(--surface-elevated);
  color: var(--ink);
  transform: scale(1.06);
}
.user-menu-email {
  font-size: 0.7rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.user-stat-tile {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.user-stat-tile strong {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.2;
}
.user-stat-tile span {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.user-menu-actions {
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 2px;
}
.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}
.user-menu-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 9px 10px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background-color 0.15s ease, transform 0.15s ease;
  animation: profileRowIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.user-menu-item:nth-child(2) { animation-delay: 35ms; }
.user-menu-item:nth-child(3) { animation-delay: 70ms; }
.user-menu-item:nth-child(5) { animation-delay: 105ms; }
.user-menu-item-left {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.user-menu-arrow {
  font-size: 1rem;
  line-height: 1;
  color: var(--ink-muted);
  transition: transform 0.16s ease, color 0.16s ease;
}
.user-menu-item:hover {
  background: var(--surface-subtle);
}
.user-menu-item:hover .user-menu-arrow {
  transform: translateX(3px);
  color: var(--ink);
}
.user-menu-item.is-danger {
  color: var(--busy-ink);
}
.user-menu-item.is-danger:hover {
  background: var(--busy-bg);
}
.user-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(155deg, #27272a 0%, #141821 100%);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: visible;
}
.drawer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}
.lego-avatar-svg {
  display: block;
  width: 88%;
  height: 88%;
  overflow: visible;
}
.lego-head {
  transform-box: fill-box;
  transform-origin: center bottom;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.lego-torso {
  transform-box: fill-box;
  transform-origin: center bottom;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.lego-eyes {
  transform-box: fill-box;
  transform-origin: center center;
  animation: legoBlink 4.6s infinite;
}
@keyframes legoBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.12); }
}
@keyframes legoBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-1.2px) rotate(-2deg); }
}
.cf-profile-btn .lego-head,
.user-avatar-lg .lego-head {
  animation: legoBob 3.8s ease-in-out infinite;
}
.cf-profile-btn:hover .lego-head,
.user-avatar-lg:hover .lego-head,
.avatar-choice-btn:hover .lego-head,
.avatar-choice-btn.is-selected .lego-head {
  transform: translateY(-1.4px) rotate(-6deg) scale(1.04);
}
.cf-profile-btn:hover .lego-torso,
.user-avatar-lg:hover .lego-torso,
.avatar-choice-btn:hover .lego-torso {
  transform: translateY(-0.5px) scale(1.03);
}
.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.avatar-choice-btn {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  border-radius: 12px;
  padding: 8px 6px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}
.avatar-choice-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-elevated);
  transform: translateY(-1px);
}
.avatar-choice-btn.is-selected {
  border-color: var(--ink);
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.avatar-choice-preview {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(155deg, #27272a 0%, #141821 100%);
  display: grid;
  place-items: center;
}
.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.user-meta strong {
  font-size: 0.75rem;
}
.user-meta span {
  font-size: 0.6875rem;
  color: var(--ink-muted);
  font-family: var(--font-mono);
}

/* Mobile Nav Trigger */
.mobile-menu-btn {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid transparent;
  background: var(--surface-subtle);
  color: var(--ink);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.16s ease;
}
.mobile-menu-btn:hover {
  background: var(--border);
}
.mobile-menu-btn svg line {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
}
.mobile-menu-btn[aria-expanded="true"] svg line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-menu-btn[aria-expanded="true"] svg line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-btn[aria-expanded="true"] svg line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-bottom-nav {
  display: none;
}

/* Main Workspace & Cloudflare-Style Fixed Collapsible Sidebar */
.app-workspace-shell {
  flex: 1;
  width: 100%;
  display: block;
}
body.is-authenticated .app-workspace-shell {
  display: block;
  padding-left: 256px;
  transition: padding-left 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
body.is-authenticated.sidebar-collapsed .app-workspace-shell {
  padding-left: 64px;
}
body.is-authenticated .app-footer {
  padding-left: 256px;
  transition: padding-left 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
body.is-authenticated.sidebar-collapsed .app-footer {
  padding-left: 64px;
}
.cf-sidebar {
  position: fixed;
  top: 65px;
  left: 0;
  bottom: 0;
  width: 256px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  gap: 10px;
  overflow: visible;
  z-index: 35;
  transition: width 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.cf-sidebar[hidden] {
  display: none;
}
.cf-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
}
.cf-account-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cf-account-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--open-dot);
  flex-shrink: 0;
}
.cf-collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.cf-collapse-btn:hover {
  background: var(--surface-subtle);
  color: var(--ink);
  border-color: transparent;
}
.cf-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.cf-search-ico {
  position: absolute;
  left: 10px;
  color: var(--ink-muted);
  pointer-events: none;
}
.cf-search-input {
  width: 100%;
  height: 34px;
  padding: 0 54px 0 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.cf-search-input:focus {
  border-color: var(--border-strong);
  background: var(--surface);
}
.cf-kbd {
  position: absolute;
  right: 7px;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  pointer-events: none;
}
.cf-sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cf-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 6px;
}
.cf-nav-group-label {
  padding: 6px 10px 3px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cf-nav-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}
.cf-nav-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cf-nav-item-main svg {
  flex-shrink: 0;
  transition: transform 0.16s ease;
}
.cf-nav-item:hover .cf-nav-item-main svg {
  transform: translateX(1.5px);
}
.cf-item-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cf-nav-item:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}
.cf-nav-item.is-active {
  background: var(--surface-subtle);
  color: var(--ink);
  font-weight: 700;
  border-color: var(--border);
}
.cf-nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 999px;
  background: var(--ink);
}
.cf-nav-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.cf-sidebar-foot {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  position: relative;
}
.cf-profile-wrap {
  width: 100%;
  position: relative;
}
.cf-profile-btn {
  width: 100%;
  justify-content: space-between;
  padding: 7px 9px;
  border-radius: 11px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}
.cf-profile-btn:hover {
  background: var(--surface-elevated);
  border-color: var(--border-strong);
}
.cf-profile-btn .user-avatar {
  position: relative;
  flex-shrink: 0;
}
.cf-profile-btn .user-meta {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.cf-profile-btn .user-meta strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes profilePopUp {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.cf-profile-popover {
  top: auto;
  right: auto;
  bottom: calc(100% + 10px);
  left: 0;
  width: 278px;
  transform-origin: bottom left;
  animation: profilePopUp 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.header-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 230px;
}
.header-search-wrap[hidden] {
  display: none !important;
}
.header-search-input {
  width: 100%;
  height: 36px;
  padding: 0 56px 0 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8125rem;
  outline: none;
  transition: border-color 0.16s ease, background-color 0.16s ease, width 0.2s ease;
}
.header-search-input:focus {
  border-color: var(--border-strong);
  background: var(--surface);
}
.header-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(320px, 90vw);
  max-height: 320px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 65;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: profilePopIn 170ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.header-search-results[hidden] {
  display: none;
}
.header-search-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8125rem;
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}
.header-search-item:hover {
  background: var(--surface-subtle);
}
.header-search-item small {
  font-size: 0.7rem;
  color: var(--ink-muted);
}
.cf-theme-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.cf-theme-icon-btn:hover {
  background: var(--surface-subtle);
  color: var(--ink);
  border-color: transparent;
  transform: scale(1.08) rotate(10deg);
}
.cf-theme-icon-btn:active {
  transform: scale(0.94);
}
.cf-theme-icon-btn svg {
  position: absolute;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}
.cf-theme-icon-btn .theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
.cf-theme-icon-btn .theme-icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.45);
}
html[data-theme="dark"] .cf-theme-icon-btn .theme-icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.45);
}
html[data-theme="dark"] .cf-theme-icon-btn .theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
.summary-item.is-clickable {
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.16s ease;
}
.summary-item.is-clickable:hover {
  transform: translateY(-2px);
  background: var(--surface-elevated);
}
body.is-authenticated.sidebar-collapsed .cf-account-label,
body.is-authenticated.sidebar-collapsed .cf-search-wrap,
body.is-authenticated.sidebar-collapsed .cf-nav-group-label,
body.is-authenticated.sidebar-collapsed .cf-item-label,
body.is-authenticated.sidebar-collapsed .cf-nav-badge,
body.is-authenticated.sidebar-collapsed .cf-foot-lang,
body.is-authenticated.sidebar-collapsed .cf-profile-meta,
body.is-authenticated.sidebar-collapsed .cf-profile-chev {
  display: none;
}
body.is-authenticated.sidebar-collapsed .cf-profile-btn {
  justify-content: center;
  padding: 6px;
}
body.is-authenticated.sidebar-collapsed .cf-sidebar {
  width: 64px;
  padding: 12px 8px;
  align-items: center;
}
body.is-authenticated.sidebar-collapsed .cf-nav-item {
  justify-content: center;
  padding: 8px;
}
body.is-authenticated.sidebar-collapsed .cf-sidebar-foot {
  justify-content: center;
}
@media (min-width: 961px) {
  body.is-authenticated #view-laboran .subtabs {
    display: none;
  }
}
@media (max-width: 960px) {
  body.is-authenticated .app-workspace-shell,
  body.is-authenticated.sidebar-collapsed .app-workspace-shell,
  body.is-authenticated .app-footer,
  body.is-authenticated.sidebar-collapsed .app-footer {
    display: block;
    padding-left: 0;
  }
  body.is-authenticated .mobile-menu-btn {
    display: inline-flex;
  }
  .cf-sidebar {
    display: none !important;
  }
}
.main-container {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 56px;
}

.view-panel {
  display: none;
}
.view-panel.is-active {
  display: block;
  animation: panelEnter 210ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
#view-landing.view-panel.is-active,
.auth-page-view.view-panel.is-active {
  animation: none;
}

/* Page Head */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.page-head h1 {
  margin: 0 0 4px;
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-subtitle {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  max-width: 62ch;
}
.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Buttons & Tactile Ripple Interactions */
.btn,
.cf-nav-item,
.drawer-nav-item,
.support-mode-btn,
.support-prompt-chip,
.chip-btn,
.seg-btn,
.stepper-btn,
.icon-btn,
.nav-tab,
.subtab-btn,
.slot-cell,
.week-day-cell,
.btn-ghost-pill,
.mob-nav-btn,
.auth-tab-btn,
.mobile-menu-btn,
.lang-btn {
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn:active:not(:disabled),
.btn.is-pressed:not(:disabled),
.chip-btn:active:not(:disabled),
.chip-btn.is-pressed:not(:disabled),
.seg-btn:active:not(:disabled),
.seg-btn.is-pressed:not(:disabled),
.stepper-btn:active:not(:disabled),
.stepper-btn.is-pressed:not(:disabled),
.icon-btn:active:not(:disabled),
.icon-btn.is-pressed:not(:disabled),
.nav-tab:active:not(:disabled),
.nav-tab.is-pressed:not(:disabled),
.subtab-btn:active:not(:disabled),
.subtab-btn.is-pressed:not(:disabled),
.btn-ghost-pill:active:not(:disabled),
.btn-ghost-pill.is-pressed:not(:disabled),
.slot-cell:active:not(:disabled),
.slot-cell.is-pressed:not(:disabled),
.week-day-cell:active:not(:disabled),
.week-day-cell.is-pressed:not(:disabled),
.mob-nav-btn:active:not(:disabled),
.mob-nav-btn.is-pressed:not(:disabled),
.auth-tab-btn:active:not(:disabled),
.auth-tab-btn.is-pressed:not(:disabled),
.mobile-menu-btn:active:not(:disabled),
.mobile-menu-btn.is-pressed:not(:disabled),
.lang-btn:active:not(:disabled),
.lang-btn.is-pressed:not(:disabled),
.cf-nav-item.is-pressed,
.drawer-nav-item.is-pressed,
.support-mode-btn.is-pressed,
.support-prompt-chip.is-pressed {
  transform: scale(0.94);
}
.btn.is-pressed:not(:disabled) {
  box-shadow: 0 0 0 3px var(--border);
}
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.36;
  pointer-events: none;
  transform: scale(0);
  animation: btnRipple 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.res-lab-spec-card {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.res-lab-spec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--surface-subtle);
}
.btn-danger {
  background: var(--busy-bg);
  color: var(--busy-ink);
  border-color: var(--busy-border);
}
.btn-danger:hover:not(:disabled) {
  filter: brightness(0.96);
}
.btn-success {
  background: var(--open-bg);
  color: var(--open-ink);
  border-color: var(--open-border);
}
.btn-sm {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 0.8125rem;
}

/* Landing page */
.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: center;
  padding: 18px 0 42px;
  border-bottom: 1px solid var(--border);
}
.hero-kicker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
}
.hero-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.2vw, 3.05rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.hero-desc {
  margin: 0 0 22px;
  font-size: 1.02rem;
  color: var(--ink-muted);
  max-width: 56ch;
}
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-live-strip {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hero-live-item {
  padding: 12px 14px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-live-item:last-child {
  border-right: none;
}
.hero-live-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.hero-live-item strong {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--ink);
}
.hero-live-item strong.is-open-txt {
  color: var(--open-ink);
}

.hero-preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-md);
}
.hero-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
}
.hero-snapshot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.snapshot-row {
  width: 100%;
  text-align: left;
  font-family: inherit;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.15s ease, box-shadow 0.15s ease;
}
.snapshot-row:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.snapshot-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.snapshot-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
}
.snapshot-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* Pinned Workflow Section (GSAP + ScrollTrigger) */
.pinned-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}
.pinned-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 32px;
  align-items: start;
}
.pinned-left {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 900px) {
  .pinned-left {
    position: sticky;
    top: 88px;
  }
}
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.pinned-heading {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 2.7vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.pinned-lead {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}
.pinned-progress-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--surface-subtle);
  overflow: hidden;
  margin-bottom: 10px;
}
.pinned-progress-fill {
  width: 25%;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.pinned-step-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}
.pinned-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.workflow-step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  opacity: 0.72;
  transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
}
.workflow-step-card:hover {
  opacity: 0.94;
  border-color: var(--border-strong);
  transform: translateX(3px);
}
.workflow-step-card.is-active {
  opacity: 1;
  border-color: var(--border-strong);
  border-left-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}
.step-num {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--surface-subtle);
  color: var(--ink);
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.workflow-step-card.is-active .step-num {
  background: var(--accent);
  color: var(--accent-ink);
}
.workflow-step-card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}
.workflow-step-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* Landing Room Showcase */
.landing-labs-section {
  padding: 52px 0 36px;
}
.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 28ch;
}
.landing-labs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.landing-lab-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, box-shadow 0.18s ease;
}
.landing-lab-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.landing-lab-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.landing-lab-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.landing-lab-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--ink-muted);
}
.landing-lab-meta span {
  white-space: nowrap;
}

.landing-cta-section {
  padding: 20px 0 8px;
}
.landing-cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.landing-cta-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.landing-cta-card p {
  margin: 0 0 6px;
  color: var(--ink-muted);
}

/* Unified Slim Metric Strip */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.summary-strip.is-slim {
  margin-bottom: 10px;
}
.summary-strip.is-slim .summary-item {
  padding: 9px 14px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.summary-strip.is-slim .summary-item-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.summary-strip.is-slim .summary-label {
  font-size: 0.65rem;
}
.summary-strip.is-slim .summary-value {
  font-size: 1.18rem;
  line-height: 1.1;
}
.summary-strip.is-slim .summary-note {
  font-size: 0.7rem;
}
@media (max-width: 820px) {
  .summary-strip.is-slim {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .summary-strip.is-slim .summary-item {
    border-bottom: 1px solid var(--border);
  }
  .summary-strip.is-slim .summary-item:nth-child(n+3) {
    border-bottom: none;
  }
}
.summary-item {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.summary-item:last-child {
  border-right: none;
}
.summary-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.summary-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.3125rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
#stat-open-slots {
  color: var(--open-ink);
}
.summary-note {
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

/* Filter & Command Toolbar */
.toolbar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.command-bar {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.command-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.command-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.search-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 0;
  max-width: 420px;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}
.input.search-input {
  min-height: 36px;
  padding: 5px 34px 5px 38px;
  border-radius: 10px;
  font-size: 0.8125rem;
}
.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--ink-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
}
.search-clear:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.segmented-ctrl {
  display: inline-flex;
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.seg-btn {
  border: none;
  background: none;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 7px;
  min-height: 30px;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}
.seg-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.input.input-compact,
.select.input-compact {
  min-height: 36px;
  padding: 4px 10px;
  width: auto;
  font-size: 0.8125rem;
  border-radius: 9px;
}
.select.input-compact {
  padding-right: 32px;
  background-position: right 10px center;
}
.date-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.date-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.stepper-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  border-radius: 999px;
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.14s ease;
}
.stepper-btn:hover {
  background: var(--surface);
  color: var(--ink);
}
.stepper-date {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  height: 32px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.stepper-native-date {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.btn-ghost-pill {
  height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 10px;
}
.btn-ghost-pill:hover {
  background: var(--surface-subtle);
}
.filter-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.chip-btn {
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface-subtle);
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}
.chip-btn:hover {
  color: var(--ink);
  background: var(--border);
}
.chip-btn.is-active {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}

/* Legend Bar */
.legend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-left-width: 4px;
  flex-shrink: 0;
}
.swatch-open {
  background: var(--open-bg);
  border-color: var(--open-border);
  border-left-color: var(--open-bar);
}
.swatch-busy {
  border-left-color: var(--busy-bar);
}
.swatch-reserved {
  border-left-color: var(--reserved-bar);
}
.swatch-pending {
  border-left-color: var(--pending-bar);
}

/* Lab Monitoring Cards */
.lab-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lab-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.lab-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.lab-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.lab-code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--accent-ink);
}
.lab-name {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
}
.lab-spec-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
}
.lab-spec-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
}
.lab-spec-tag.is-cap {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
}
.lab-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.lab-open-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-subtle);
  padding: 4px 9px;
  border-radius: 999px;
}
.lab-status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  white-space: nowrap;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.lab-status-pill.is-now-open .live-dot {
  animation: livePulse 2.4s ease-in-out infinite;
}
.lab-status-pill.is-aktif,
.lab-status-pill.is-now-open {
  background: var(--open-bg);
  border-color: var(--open-border);
  color: var(--open-ink);
}
.lab-status-pill.is-now-reserved {
  background: var(--reserved-bg);
  border-color: var(--reserved-border);
  color: var(--reserved-ink);
}
.lab-status-pill.is-maintenance,
.lab-status-pill.is-now-busy {
  background: var(--busy-bg);
  border-color: var(--busy-border);
  color: var(--busy-ink);
}

/* Interactive Timeline Track (07:00 - 21:00) */
.timeline-rail {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.slot-cell {
  border: 1px solid var(--border);
  border-left-width: 3.5px;
  border-radius: 9px;
  padding: 10px 10px;
  text-align: left;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-height: 70px;
  background: var(--surface);
  color: var(--ink);
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.slot-cell.is-current-slot {
  border-top-color: var(--ink-muted);
  border-right-color: var(--ink-muted);
  border-bottom-color: var(--ink-muted);
  box-shadow: 0 3px 10px rgba(28, 25, 23, 0.08);
}
html[data-theme="dark"] .slot-cell.is-current-slot {
  border-top-color: rgba(250, 248, 245, 0.32);
  border-right-color: rgba(250, 248, 245, 0.32);
  border-bottom-color: rgba(250, 248, 245, 0.32);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.slot-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.slot-now-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
}
.slot-cell:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.slot-time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-muted);
}
.slot-label {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slot-cell.is-open {
  background: var(--open-bg);
  border-color: var(--open-border);
  border-left-color: var(--open-bar);
  color: var(--open-ink);
}
.slot-cell.is-open .slot-time {
  color: var(--open-ink);
}
.slot-cell.is-open:hover {
  border-color: var(--open-ink);
}
.slot-cell.is-praktikum {
  background: var(--surface);
  border-color: var(--border);
  border-left-color: var(--busy-bar);
  color: var(--ink);
}
.slot-cell.is-praktikum .slot-time {
  color: var(--busy-ink);
}
.slot-cell.is-reserved {
  background: var(--surface);
  border-color: var(--border);
  border-left-color: var(--reserved-bar);
  color: var(--ink);
}
.slot-cell.is-reserved .slot-time {
  color: var(--reserved-ink);
}
.slot-cell.is-pending {
  background: var(--surface);
  border-color: var(--border);
  border-left-color: var(--pending-bar);
  color: var(--ink);
}
.slot-cell.is-pending .slot-time {
  color: var(--pending-ink);
}
.slot-cell.is-maintenance,
.slot-cell.is-past {
  background: var(--surface-subtle);
  border-color: var(--border);
  border-left-color: var(--border-strong);
  color: var(--ink-muted);
}
.slot-cell.is-past {
  opacity: 0.72;
  cursor: not-allowed;
}

/* Weekly Calendar Overview Grid */
.week-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.week-day-cell {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}
.week-day-cell:hover {
  border-color: var(--ink);
  background: var(--surface-subtle);
}
.week-day-cell.is-selected {
  border-color: var(--accent);
  background: var(--surface-subtle);
}
.week-day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
}
.week-day-name {
  font-size: 0.8125rem;
  font-weight: 700;
}
.week-day-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.week-day-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.week-pill {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.week-pill.is-open {
  background: var(--open-bg);
  border-color: var(--open-border);
  color: var(--open-ink);
}
.week-pill.is-busy {
  background: var(--busy-bg);
  border-color: var(--busy-border);
  color: var(--busy-ink);
}
.week-pill.is-booked {
  background: var(--reserved-bg);
  border-color: var(--reserved-border);
  color: var(--reserved-ink);
}
.week-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-subtle);
  overflow: hidden;
  display: flex;
  margin-top: auto;
}
.week-bar-open {
  background: var(--open-ink);
  height: 100%;
}

/* Floating Toast Feedback (POSITION A: Top-Right below Header) */
.toast-stack {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(330px, calc(100vw - 28px));
  pointer-events: none;
}
.toast-item {
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  background: var(--open-bg);
  color: var(--open-ink);
  border: 1px solid var(--open-border);
  border-radius: 10px;
  padding: 9px 11px 11px;
  box-shadow: var(--shadow-md);
  font-size: 0.785rem;
  line-height: 1.38;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  animation: toastSlideTop 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast-item.is-error {
  background: var(--busy-bg);
  color: var(--busy-ink);
  border-color: var(--busy-border);
}
.toast-item.is-warn {
  background: var(--pending-bg);
  color: var(--pending-ink);
  border-color: var(--pending-border);
}
.toast-item.is-info {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.toast-item.is-leaving {
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
}
.toast-body {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(22, 163, 74, 0.14);
  color: var(--open-ink);
}
.toast-item.is-error .toast-icon {
  background: rgba(220, 38, 38, 0.14);
  color: var(--busy-ink);
}
.toast-item.is-warn .toast-icon {
  background: rgba(217, 119, 6, 0.16);
  color: var(--pending-ink);
}
.toast-item.is-info .toast-icon {
  background: var(--surface-subtle);
  color: var(--ink);
}
.toast-close {
  border: none;
  background: none;
  color: inherit;
  opacity: 0.7;
  padding: 2px 4px;
  font-size: 0.8rem;
  line-height: 1.2;
}
.toast-close:hover {
  opacity: 1;
}
.toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2.5px;
  width: 100%;
  background: var(--open-bar);
  transform-origin: left center;
  animation: toastProgress 4200ms linear forwards;
}
.toast-item.is-error .toast-progress { background: var(--busy-bar); }
.toast-item.is-warn .toast-progress { background: var(--pending-bar); }
.toast-item.is-info .toast-progress { background: var(--ink-muted); }

.verify-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.verify-chip {
  border: 1px solid var(--border-strong);
  background: var(--surface-subtle);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  min-height: 32px;
  border-radius: 999px;
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}
.verify-chip:hover {
  background: var(--surface-elevated);
  border-color: var(--ink);
}
.verify-chip.is-selected {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* Auth Modal Tabs & Helper */
.modal-dialog.is-auth {
  max-width: 780px;
}
.modal-head-auth {
  padding: 12px 18px;
}
.auth-head-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
}
.modal-body-auth {
  padding: 0;
}
.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.18fr);
}
.auth-aside {
  background: #1c1917;
  color: #faf8f5;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  border-right: 1px solid var(--border);
}
html[data-theme="dark"] .auth-aside {
  background: #0c0c0e;
}
.auth-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #a8a29e;
  margin-bottom: 10px;
}
.auth-aside-title {
  margin: 0 0 18px;
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: #faf8f5;
}
.auth-aside-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-aside-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #e7e5e4;
}
.auth-aside-list svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #a8a29e;
}
.auth-aside-foot {
  padding-top: 14px;
  border-top: 1px solid rgba(250, 248, 245, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  color: #d6d3d1;
}
.auth-main {
  padding: 24px 24px 22px;
}
.auth-main-title {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.auth-main-sub {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}
.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.field-ico {
  position: absolute;
  left: 12px;
  color: var(--ink-muted);
  pointer-events: none;
}
.input.has-ico {
  padding-left: 38px;
}
.input.has-pw {
  padding-right: 42px;
}
.pw-toggle {
  position: absolute;
  right: 4px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.pw-toggle:hover {
  color: var(--ink);
  background: var(--surface-subtle);
}
.pw-toggle.is-visible {
  color: var(--accent);
  background: var(--surface-subtle);
}
@media (max-width: 760px) {
  .auth-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-aside {
    padding: 16px 18px;
    gap: 12px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .auth-aside-title {
    font-size: 1.05rem;
    margin-bottom: 10px;
  }
  .auth-aside-list {
    gap: 6px;
  }
  .auth-main {
    padding: 18px;
  }
  .pw-toggle {
    width: 44px;
    height: 44px;
    right: 0;
  }
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
}
.auth-tab-btn {
  border: none;
  background: none;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 38px;
  border-radius: 8px;
}
.auth-tab-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.auth-quick-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 0.8125rem;
}
.auth-quick-box p {
  margin: 0 0 8px;
  color: var(--ink-muted);
}

/* Dedicated Sign In & Register Pages (/login, /register) */
.auth-nav-link {
  text-decoration: none;
}
#btn-open-login.is-active {
  background: var(--surface-subtle);
  border-color: var(--ink);
  color: var(--ink);
}
#btn-open-register.is-active {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--navy);
}
.auth-page-shell {
  max-width: 860px;
  margin: 8px auto 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.auth-back-link:hover {
  background: var(--surface);
  color: var(--ink);
}
body.is-auth-route .app-header .auth-header-btns,
body.is-auth-route .mobile-bottom-nav #mob-nav-auth {
  display: none;
}
.auth-page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.auth-page-view.is-active .auth-page-shell {
  animation: authShellEnter 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.auth-page-view.is-active .auth-main > * {
  animation: authContentFade 240ms cubic-bezier(0.16, 1, 0.3, 1) 40ms both;
}
@keyframes authShellEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes authContentFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-page-card.is-shaking {
  animation: modalShake 340ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
.auth-page-head {
  margin-bottom: 18px;
}
.auth-page-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.auth-switch-row {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.825rem;
  color: var(--ink-muted);
}
.auth-switch-link {
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-switch-link:hover {
  opacity: 0.8;
}

/* Forms & Anti-Bentrok Split Layout */
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.panel-card h2 {
  margin: 0 0 4px;
  font-size: 1.125rem;
}
.panel-desc {
  margin: 0 0 18px;
  font-size: 0.875rem;
  color: var(--ink-muted);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field.is-full {
  grid-column: 1 / -1;
}
.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--surface-elevated);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.875rem;
}
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px 15px;
}
.select.is-enhanced {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}
.select-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.select-wrap.is-compact {
  display: inline-block;
  width: auto;
}
.ls-select-trigger {
  width: 100%;
  min-height: 42px;
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.select-wrap.is-compact .ls-select-trigger {
  min-height: 36px;
  padding: 4px 32px 4px 10px;
  font-size: 0.8125rem;
  border-radius: 9px;
}
.ls-select-trigger:hover {
  border-color: var(--ink-muted);
}
.select-wrap.is-open .ls-select-trigger {
  border-color: var(--ink);
}
.ls-select-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.select-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  color: var(--ink-muted);
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), color 0.16s ease;
}
.select-wrap.is-compact .select-chevron {
  right: 10px;
}
.select-wrap.is-open .select-chevron {
  transform: translateY(-50%) rotate(180deg);
  color: var(--ink);
}
input[type="date"] {
  cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  border-radius: 6px;
  padding: 4px;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background-color: var(--surface-subtle);
  transform: scale(1.08);
}
.ls-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  min-width: 170px;
  max-height: 230px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  padding: 4px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: modalEnter 150ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ls-select-menu[hidden] {
  display: none;
}
.select-wrap.dir-down .ls-select-menu {
  top: calc(100% + 5px);
}
.select-wrap.dir-up .ls-select-menu {
  bottom: calc(100% + 5px);
}
.ls-select-option {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background-color 0.12s ease;
}
.ls-select-option:hover {
  background: var(--surface-subtle);
}
.ls-select-option.is-selected {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
html[data-theme="dark"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
.textarea {
  min-height: 82px;
  resize: vertical;
}
.field-hint {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* Status & Validation Alerts */
.alert-box {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.875rem;
  border: 1px solid;
  margin-bottom: 16px;
}
.alert-box strong {
  display: block;
  margin-bottom: 2px;
}
.alert-ok {
  background: var(--open-bg);
  border-color: var(--open-border);
  color: var(--open-ink);
}
.alert-error {
  background: var(--busy-bg);
  border-color: var(--busy-border);
  color: var(--busy-ink);
}
.alert-warn {
  background: var(--pending-bg);
  border-color: var(--pending-border);
  color: var(--pending-ink);
}
.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agenda-item {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  background: var(--surface-elevated);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
}

/* Tables & Lists */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}
.data-table th {
  background: var(--surface-subtle);
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.status-badge svg {
  flex-shrink: 0;
}
.status-pending {
  background: var(--pending-bg);
  border-color: var(--pending-border);
  color: var(--pending-ink);
}
.status-approved {
  background: var(--open-bg);
  border-color: var(--open-border);
  color: var(--open-ink);
}
.status-rejected,
.status-cancelled {
  background: var(--busy-bg);
  border-color: var(--busy-border);
  color: var(--busy-ink);
}
.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Subtabs inside Laboran Console */
.subtabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.subtab-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.subtab-btn:hover {
  color: var(--ink);
}
.subtab-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.laboran-subpanel {
  display: none;
}
.laboran-subpanel.is-active {
  display: block;
  animation: panelEnter 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Empty & Loading States */
.state-box {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
}
.state-box h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}
.state-box p {
  margin: 0 0 14px;
  color: var(--ink-muted);
  font-size: 0.875rem;
}
.loading-bar {
  display: none;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
}
.loading-bar.is-visible {
  display: block;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 12, 14, 0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 80;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, visibility 200ms linear;
}
.modal-backdrop.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 200ms ease, visibility 0s linear;
}
.modal-dialog {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: transform 230ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
}
.modal-backdrop.is-open .modal-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.modal-dialog.is-shaking {
  animation: modalShake 340ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
.modal-dialog.is-wide {
  max-width: 680px;
}
.modal-dialog > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.modal-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.modal-head h2 {
  margin: 0;
  font-size: 1.0625rem;
}
.modal-body {
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}
.modal-foot {
  flex-shrink: 0;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Official Printable Permit Ticket */
.permit-sheet {
  position: relative;
  overflow: hidden;
  border: 1.5px solid #cbd5e1;
  padding: 24px 24px 18px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.permit-ribbon {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: linear-gradient(90deg, #0f172a 0%, #0f172a 72%, #16a34a 72%, #16a34a 100%);
}
.permit-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  border-bottom: 1.5px solid #e2e8f0;
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.permit-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1 1 340px;
}
.permit-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}
.permit-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #334155;
  margin-bottom: 3px;
}
.permit-header h3 {
  margin: 0 0 3px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: #0f172a;
}
.permit-header p {
  margin: 0;
  font-size: 0.75rem;
  color: #475569;
}
.permit-code-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  padding: 8px 11px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.permit-code-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.permit-code-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}
.permit-status-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid #86efac;
}
.permit-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
  margin-bottom: 16px;
}
.permit-summary-cell {
  padding: 9px 12px;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.permit-summary-cell:last-child {
  border-right: none;
}
.permit-summary-cell span {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.permit-summary-cell strong {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}
.permit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 152px;
  gap: 18px;
  align-items: start;
}
.permit-meta {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 0;
  margin: 0;
  font-size: 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px 12px;
  background: #ffffff;
}
.permit-meta dt,
.permit-meta dd {
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
}
.permit-meta dt:last-of-type,
.permit-meta dd:last-of-type {
  border-bottom: none;
}
.permit-meta dt {
  color: #64748b;
  font-weight: 600;
}
.permit-meta dd {
  margin: 0;
  color: #0f172a;
  font-weight: 500;
  line-height: 1.4;
}
.permit-qr-card {
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 10px 10px;
  background: #f8fafc;
  text-align: center;
  width: 100%;
}
.permit-qr-card svg {
  display: block;
  margin: 0 auto;
  border-radius: 6px;
  background: #ffffff;
  padding: 4px;
  border: 1px solid #e2e8f0;
}
.permit-qr-code {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
}
.permit-qr-hint {
  display: block;
  margin-top: 2px;
  font-size: 0.625rem;
  color: #475569;
  line-height: 1.35;
}
.permit-qr-hash {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.permit-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1.5px dashed #cbd5e1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}
.permit-rules {
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.45;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}
.permit-rules strong {
  display: block;
  font-size: 0.74rem;
  color: #0f172a;
  margin-bottom: 4px;
}
.permit-rules ul {
  margin: 0;
  padding-left: 16px;
}
.permit-rules li + li {
  margin-top: 2px;
}
.permit-sign {
  text-align: right;
  font-size: 0.74rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 10px;
}
.permit-seal-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  padding: 4px 6px;
}
.permit-seal-kicker,
.permit-seal-foot {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #15803d;
  text-transform: uppercase;
  line-height: 1;
}
.permit-seal-svg {
  display: block;
}
.permit-sign-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.permit-sign-label {
  font-size: 0.66rem;
  color: #64748b;
}
.permit-sign-stamp {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #0f172a;
  border: 1px solid #0f172a;
  border-radius: 5px;
  padding: 2px 7px;
}
.permit-doc-foot {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.64rem;
  color: #64748b;
}

/* Mobile Slide Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.28s linear;
}
.mobile-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s linear;
}
.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 14, 0.56);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.26s ease;
}
.mobile-drawer.is-open .drawer-scrim {
  opacity: 1;
}
.drawer-panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(330px, 88vw);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 8px 0 30px rgba(12, 12, 14, 0.18);
}
.mobile-drawer.is-open .drawer-panel {
  transform: translateX(0);
}
.drawer-panel > * {
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer-nav-section {
  margin: 10px 0 4px;
  padding: 0 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.drawer-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  min-height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.drawer-nav-item:hover {
  background: var(--surface-subtle);
}
.drawer-nav-item.is-active {
  background: var(--ink);
  color: var(--surface);
}
.drawer-nav-item.is-active .nav-count {
  background: rgba(255, 255, 255, 0.18);
  color: var(--surface);
  border-color: transparent;
}
.mobile-drawer.is-open .drawer-panel > * {
  opacity: 1;
  transform: translateX(0);
}
.mobile-drawer.is-open .drawer-panel > *:nth-child(2) { transition-delay: 0.04s; }
.mobile-drawer.is-open .drawer-panel > *:nth-child(3) { transition-delay: 0.07s; }
.mobile-drawer.is-open .drawer-panel > *:nth-child(4) { transition-delay: 0.10s; }
.mobile-drawer.is-open .drawer-panel > *:nth-child(5) { transition-delay: 0.13s; }
.mobile-drawer.is-open .drawer-panel > *:nth-child(6) { transition-delay: 0.16s; }
.mobile-drawer.is-open .drawer-panel > *:nth-child(7) { transition-delay: 0.19s; }

/* Footer */
.app-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: auto;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 165px 18px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}
.footer-reset-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-reset-btn:hover {
  color: var(--ink);
}

@media (max-width: 1040px) {
  .landing-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .pinned-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .summary-item:nth-child(1),
  .summary-item:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }
  .summary-item:nth-child(2n) {
    border-right: none;
  }
  .slot-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .week-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .form-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Mobile Breakpoint (< 760px) */
@media (max-width: 760px) {
  .desktop-nav,
  .header-actions .auth-header-btns,
  .header-actions .header-search-wrap,
  .header-actions .lang-switcher,
  .header-actions #btn-theme-toggle {
    display: none !important;
  }
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 11px;
  }
  .mobile-menu-label {
    display: none;
  }
  .hamburger-btn {
    min-height: 44px;
    padding: 0 10px;
  }
  .hamburger-label,
  .header-route-pill {
    display: none !important;
  }
  .icon-btn {
    width: 44px;
    height: 44px;
  }
  .stepper-btn {
    width: 44px;
    height: 44px;
  }
  .btn-sm,
  .chip-btn,
  .seg-btn,
  .subtab-btn,
  .lang-btn {
    min-height: 44px;
  }
  .toast-close {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .header-inner {
    min-height: 56px;
    padding: 0 14px;
    gap: 8px;
  }
  .brand {
    min-width: 0;
  }
  .brand-name {
    font-size: 0.9375rem;
  }
  .brand-sub {
    font-size: 0.6875rem;
  }
  .main-container {
    padding: 16px 14px 92px;
    min-width: 0;
  }
  .landing-hero {
    padding: 8px 0 28px;
  }
  .hero-live-strip {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-live-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .hero-live-item:last-child {
    border-bottom: none;
  }
  .landing-labs-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pinned-section {
    padding: 32px 0;
  }
  .pinned-left {
    padding: 18px;
  }
  .landing-cta-card {
    padding: 20px;
  }
  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .page-head-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .page-head-actions .wib-clock-pill {
    align-self: flex-start;
  }
  .page-head-actions .btn-primary {
    width: 100%;
  }
  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }
  .summary-item {
    padding: 11px 12px;
    min-width: 0;
  }
  .summary-item:nth-child(1),
  .summary-item:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }
  .summary-item:nth-child(2n) {
    border-right: none;
  }
  .summary-value {
    font-size: 1.25rem;
  }
  .command-top {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .search-wrap {
    flex: none;
    width: 100%;
    max-width: 100%;
  }
  .date-controls {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
  .segmented-ctrl {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .seg-btn {
    text-align: center;
  }
  .date-stepper {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: space-between;
  }
  .stepper-date {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    padding: 0 6px;
    font-size: 0.78rem;
  }
  .filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .chip-btn {
    font-size: 0.75rem;
    padding: 0 11px;
  }
  .legend-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    font-size: 0.75rem;
    margin-bottom: 14px;
  }
  .lab-card {
    padding: 14px;
  }
  .lab-card-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }
  .lab-status-pill {
    white-space: normal;
    line-height: 1.3;
    font-size: 0.75rem;
    padding: 6px 11px;
    align-self: flex-start;
  }
  .timeline-rail {
    padding: 6px;
  }
  .slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .slot-cell {
    padding: 9px 8px;
    min-height: 64px;
  }
  .slot-time {
    font-size: 0.6875rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
  }
  .slot-now-tag {
    font-size: 0.5625rem;
    padding: 1px 4px;
  }
  .toolbar-card .select.input-compact {
    width: 100%;
  }
  .week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .permit-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .permit-summary-cell:nth-child(1),
  .permit-summary-cell:nth-child(2) {
    border-bottom: 1px solid #e2e8f0;
  }
  .permit-summary-cell:nth-child(2) {
    border-right: none;
  }
  .permit-grid,
  .permit-footer {
    grid-template-columns: minmax(0, 1fr);
  }
  .permit-code-box,
  .permit-sign,
  .permit-sign-text {
    align-items: flex-start;
    text-align: left;
  }
  .permit-meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .permit-meta dt {
    border-bottom: none;
    padding-bottom: 1px;
  }
  .permit-meta dd {
    padding-top: 0;
  }
  .app-footer {
    padding-bottom: 72px;
  }
  .subtabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .subtab-btn {
    justify-content: center;
    font-size: 0.75rem;
    padding: 6px 8px;
  }
  .table-wrap:has(.data-table-cards) {
    border: none;
    background: transparent;
    overflow: visible;
  }
  .data-table-cards thead {
    display: none;
  }
  .data-table-cards,
  .data-table-cards tbody,
  .data-table-cards tr,
  .data-table-cards td {
    display: block;
    width: 100%;
  }
  .data-table-cards tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
  }
  .data-table-cards td {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .data-table-cards td:last-child {
    border-bottom: none;
    padding-bottom: 2px;
    padding-top: 10px;
  }
  .data-table-cards td::before {
    content: attr(data-label);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink-muted);
  }
  .toast-stack {
    top: 66px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .mobile-bottom-nav {
    display: flex;
    align-items: stretch;
    gap: 4px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(247, 244, 237, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    z-index: 45;
  }
  html[data-theme="dark"] .mobile-bottom-nav {
    background: rgba(20, 20, 23, 0.92);
  }
  .mob-nav-btn {
    flex: 1 1 0;
    background: none;
    border: none;
    color: var(--ink-muted);
    font-family: inherit;
    font-size: 0.6875rem;
    font-weight: 600;
    min-height: 46px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: var(--radius-sm);
    padding: 4px 2px;
    transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.16s ease, color 0.16s ease;
  }
  .mob-nav-btn svg {
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .mob-nav-btn.is-active {
    color: var(--ink);
    background: var(--surface-subtle);
  }
  .mob-nav-btn.is-active svg {
    transform: translateY(-1px) scale(1.08);
  }
}

@keyframes pillPop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(-3px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes popEnter {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes modalShake {
  15%, 45%, 75% { transform: translateX(-6px); }
  30%, 60%, 90% { transform: translateX(6px); }
  100% { transform: translateX(0); }
}
@keyframes themeIconSpin {
  from {
    opacity: 0.35;
    transform: rotate(-110deg) scale(0.6);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}
@keyframes btnRipple {
  to {
    transform: scale(2.8);
    opacity: 0;
  }
}
@keyframes panelEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toastSlideTop {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.38; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Print stylesheet for Official Surat Izin PDF (Strictly 1-Page A4) */
@page {
  size: A4 portrait;
  margin: 12mm;
}
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: block !important;
    background: #ffffff !important;
    overflow: visible !important;
  }
  body > *:not(#modal-permit) {
    display: none !important;
  }
  #modal-permit {
    position: static !important;
    inset: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  #modal-permit .modal-dialog {
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
  }
  #modal-permit .modal-body {
    overflow: visible !important;
    padding: 0 !important;
  }
  #modal-permit .modal-head,
  #modal-permit .modal-foot {
    display: none !important;
  }
  .permit-sheet {
    border: 1.5px solid #0f172a !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    padding: 20px 20px 16px !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .permit-summary-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .permit-grid {
    grid-template-columns: minmax(0, 1fr) 152px !important;
  }
  .permit-footer {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }
}

/* Floating Interactive Support Launcher & Widget */
.support-float-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.support-fab {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, background-color 0.16s ease;
}
.support-fab:hover {
  transform: translateY(-2px);
  background: var(--surface-elevated);
}
.support-fab:active {
  transform: scale(0.95);
}
.support-fab-ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--reserved-bg);
  color: var(--reserved-ink);
  border: 1px solid var(--reserved-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.support-fab-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--busy-bar);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.support-fab-badge[hidden] {
  display: none;
}
.support-widget {
  width: min(400px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 20px 52px rgba(12, 12, 14, 0.26);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalEnter 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.support-widget[hidden] {
  display: none;
}
.support-widget-head {
  background: linear-gradient(135deg, #18181b 0%, #27272a 100%);
  color: #faf8f5;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.support-widget-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.support-bot-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.support-bot-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
.support-online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #18181b;
}
.support-widget-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.support-widget-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.support-widget-title-row strong {
  font-size: 0.9rem;
  font-weight: 700;
}
.support-ai-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
}
.support-widget-sub {
  font-size: 0.72rem;
  color: #d6d3d1;
}
.support-widget-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.support-head-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #faf8f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.support-head-icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
.support-widget-tabs {
  margin: 10px 12px 0;
  width: calc(100% - 24px);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.support-widget-tabs .support-mode-btn {
  justify-content: center;
  min-height: 34px;
  font-size: 0.8rem;
  padding: 4px 10px;
}
.support-widget .support-panel.is-active {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px 12px;
}
.support-widget-stream {
  min-height: 210px;
  max-height: 255px;
  padding: 10px;
}
.support-widget-composer {
  display: flex;
  align-items: center;
  gap: 8px;
}
.support-widget-composer .input {
  min-height: 38px;
  font-size: 0.82rem;
}
.support-widget-composer .btn {
  min-height: 38px;
  padding: 0 14px;
}
.support-widget-cs-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.support-mode-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.support-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.support-mode-btn:hover {
  color: var(--ink);
}
.support-mode-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.support-panel {
  display: none;
}
.support-prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.support-prompt-chip {
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.support-prompt-chip:hover {
  background: var(--surface-subtle);
  transform: translateY(-1px);
}
.support-chat-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px;
}
.chat-bubble {
  max-width: 85%;
  padding: 9px 12px 10px;
  border-radius: 14px;
  font-size: 0.815rem;
  line-height: 1.48;
  border: 1px solid var(--border);
  white-space: pre-line;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  animation: chatBubbleIn 200ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes chatBubbleIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-bubble.is-bot,
.chat-bubble.is-cs {
  align-self: flex-start;
  background: var(--surface);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.chat-bubble.is-cs {
  border-left: 3px solid #22c55e;
}
.chat-bubble.is-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.45);
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.22);
}
.chat-bubble.is-user .chat-meta {
  color: rgba(255, 255, 255, 0.85);
  opacity: 1;
}
.chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.69rem;
  opacity: 0.72;
  margin-bottom: 4px;
  font-weight: 700;
}
.chat-sender-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chat-role-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  flex-shrink: 0;
}
.chat-bubble.is-cs .chat-role-dot {
  background: #22c55e;
}
.chat-bubble.is-user .chat-role-dot {
  background: #93c5fd;
}
.chat-time {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.8;
}
.chat-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.chat-action-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface-subtle);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 0.14s ease;
}
.chat-action-btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
}
.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-muted);
  animation: typingBounce 1.1s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.45; }
  40% { transform: scale(1); opacity: 1; }
}
.support-cs-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 760px) {
  .support-float-root {
    right: 12px;
    bottom: 76px;
  }
  .support-widget {
    width: min(360px, calc(100vw - 24px));
  }
}

/* Student Tools Views (Smart Slot Finder, Lab Directory, E-Ticket Wallet) */
.finder-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}
.finder-results-grid,
.student-labs-grid,
.tickets-wallet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.finder-lab-card,
.student-lab-card,
.ticket-wallet-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.finder-lab-head,
.student-lab-head,
.ticket-wallet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.finder-slot-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.finder-slot-btn {
  border: 1px solid var(--open-border);
  background: var(--open-bg);
  color: var(--open-ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}
.finder-slot-btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.student-lab-specs {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--ink);
  line-height: 1.45;
}
.card-head-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-head-inline h3 {
  margin: 0;
  font-size: 1rem;
}
.card-sub-inline {
  margin: 2px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}
.ticket-wallet-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.ticket-wallet-qr {
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.ticket-wallet-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8125rem;
}
.ticket-wallet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
@media (max-width: 860px) {
  .finder-controls,
  .finder-results-grid,
  .student-labs-grid,
  .tickets-wallet-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Upgraded Account Settings Modal */
.modal-dialog.is-profile {
  max-width: 600px;
}
.modal-head-sub {
  margin: 3px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}
.profile-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.profile-hero-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.profile-hero-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-hero-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.profile-hero-name-row strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.profile-hero-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.profile-hero-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.profile-stat-chip {
  min-width: 68px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1px;
}
.profile-stat-chip strong {
  font-size: 0.9375rem;
  line-height: 1.2;
  color: var(--ink);
}
.profile-stat-chip span {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}
.profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
}
.profile-tab-btn {
  min-height: 34px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.profile-tab-btn:hover {
  color: var(--ink);
}
.profile-tab-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.input.is-readonly,
.input:disabled {
  background-color: var(--surface-subtle);
  color: var(--ink-muted);
  cursor: not-allowed;
  user-select: none;
  caret-color: transparent;
  opacity: 0.92;
}
.input.is-readonly:focus,
.input:disabled:focus {
  border-color: var(--border);
  box-shadow: none;
  outline: none;
}
.profile-security-note {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-bottom: 14px;
  line-height: 1.45;
}
.profile-pref-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-pref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}
.profile-pref-item > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.profile-pref-item strong {
  font-size: 0.84rem;
  color: var(--ink);
}
.profile-pref-item span {
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.profile-seg-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.profile-seg-btn {
  min-height: 30px;
  padding: 0 11px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.profile-seg-btn:hover {
  color: var(--ink);
}
.profile-seg-btn.is-active {
  background: var(--navy);
  color: var(--accent-ink);
}
@media (max-width: 600px) {
  .profile-hero-card {
    flex-direction: column;
    align-items: stretch;
  }
  .profile-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-pref-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Landing Extended Sections & Footer CC */
.landing-features-section,
.landing-rules-section,
.landing-faq-section {
  padding: 46px 0 18px;
}
.landing-features-section {
  border-bottom: 1px solid var(--border);
  padding-bottom: 48px;
}
.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.landing-feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.16s ease, box-shadow 0.18s ease;
}
.landing-feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.feature-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--ink);
  display: grid;
  place-items: center;
}
.landing-feature-card h3 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
}
.landing-feature-card p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.landing-rules-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-bottom: 46px;
}
.landing-rules-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.85fr);
  gap: 18px;
  align-items: stretch;
}
.landing-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.landing-info-title {
  margin: 0 0 14px;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.landing-rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.landing-rules-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}
.rule-index {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.landing-rules-list strong {
  display: block;
  font-size: 0.875rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.landing-rules-list p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.45;
}
.landing-desk-lead {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.55;
}
.landing-desk-meta {
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}
.landing-desk-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.landing-desk-meta dt {
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}
.landing-desk-meta dd {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
.landing-desk-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.landing-faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.24s ease;
}
.faq-item:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.faq-item[open] {
  border-color: var(--border-strong);
}
.faq-item.is-expanded {
  background: var(--surface-elevated);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  user-select: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-chevron {
  flex-shrink: 0;
  color: var(--ink-muted);
  width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 999px;
  background: var(--surface-subtle);
  transform: rotate(0deg);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease, background-color 0.2s ease;
}
.faq-item.is-expanded .faq-chevron,
.faq-item[open]:not(.is-closing) .faq-chevron {
  transform: rotate(180deg);
  color: var(--ink);
  background: var(--surface-subtle);
}
.faq-answer-wrap {
  transition: opacity 0.24s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-item:not(.is-expanded) .faq-answer-wrap {
  opacity: 0;
  transform: translateY(-4px);
}
.faq-item.is-expanded .faq-answer-wrap {
  opacity: 1;
  transform: translateY(0);
}
.faq-item p {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.83rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.footer-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 1040px) {
  .landing-features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .landing-rules-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .landing-features-grid,
  .landing-faq-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-inner {
    padding: 16px 20px;
  }
}

/* Landing Map Card */
.desk-meta-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.desk-meta-split > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.landing-map-card {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-subtle);
  overflow: hidden;
}
.landing-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.landing-map-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink);
}
.landing-map-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.landing-map-frame {
  display: block;
  width: 100%;
  height: 185px;
  border: none;
  background: var(--surface-subtle);
}
html[data-theme="dark"] .landing-map-frame {
  filter: invert(90%) hue-rotate(180deg) contrast(0.92);
}

/* Modern Per-Room Availability & Spec Workspace */
.room-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.room-tabs-track {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
  min-width: 0;
}
.room-tabs-track::-webkit-scrollbar {
  display: none;
}
.room-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 5px 11px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}
.room-tab-btn:hover {
  color: var(--ink);
  background: rgba(128, 128, 128, 0.08);
}
.room-tab-btn:active {
  transform: scale(0.97);
}
.room-tab-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.room-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--open-dot);
  flex-shrink: 0;
}
.room-tab-dot.is-maint {
  background: var(--busy-bar);
}
.room-tab-dot.is-full {
  background: var(--pending-ink);
}
.room-tab-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
}
.room-tab-name {
  color: var(--ink-muted);
  font-weight: 600;
}
.room-tab-btn.is-active .room-tab-name {
  color: var(--ink);
}
.room-tab-open {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--open-bg);
  color: var(--open-ink);
}
.room-tab-open.is-maint {
  background: var(--busy-bg);
  color: var(--busy-ink);
}
.room-tab-open.is-full {
  background: var(--pending-bg);
  color: var(--pending-ink);
}
.room-matrix-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
}
.room-matrix-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}
.room-matrix-btn:active {
  transform: scale(0.97);
}
.room-matrix-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.room-matrix-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--ink-muted);
}
.room-matrix-btn.is-active .room-matrix-count {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}
@media (max-width: 820px) {
  .room-tabs-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .room-tabs-track {
    width: 100%;
  }
  .room-matrix-btn {
    justify-content: center;
    min-height: 38px;
  }
}
.lab-focus-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.lab-focus-hero {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  align-items: stretch;
}
.lab-photo-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  min-height: 210px;
}
.lab-photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lab-photo-caption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.lab-focus-summary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.lab-focus-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.lab-focus-title {
  margin: 6px 0 4px;
  font-size: clamp(1.2rem, 2.2vw, 1.48rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.lab-focus-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.lab-quick-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.lab-quick-spec-box {
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}
.lab-quick-spec-box span {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 2px;
}
.lab-quick-spec-box strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
}
.lab-focus-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}
.lab-focus-section {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.lab-focus-section:last-child {
  border-bottom: none;
}
.lab-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}
.lab-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: block;
}
.lab-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.lab-spec-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.lab-spec-row:nth-child(2n) {
  border-right: none;
}
.lab-spec-row:nth-last-child(-n+2) {
  border-bottom: none;
}
.lab-spec-key {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.lab-spec-val {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}
.lab-matrix-table th,
.lab-matrix-table td {
  vertical-align: middle;
}
.matrix-room-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.matrix-thumb {
  width: 56px;
  height: 36px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.matrix-slot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.matrix-slot-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--ink);
  cursor: pointer;
}
.matrix-slot-chip.is-open {
  background: var(--open-bg);
  border-color: var(--open-border);
  color: var(--open-ink);
}
.matrix-slot-chip.is-praktikum {
  background: var(--busy-bg);
  border-color: var(--busy-border);
  color: var(--busy-ink);
}
.matrix-slot-chip.is-reserved {
  background: var(--res-bg);
  border-color: var(--res-border);
  color: var(--res-ink);
}
.matrix-slot-chip.is-pending {
  background: var(--pend-bg);
  border-color: var(--pend-border);
  color: var(--pend-ink);
}
.matrix-slot-chip.is-maintenance,
.matrix-slot-chip.is-past {
  opacity: 0.55;
  cursor: not-allowed;
}
.student-lab-photo {
  width: 100%;
  height: 165px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.lab-split-workspace {
  display: grid;
  grid-template-columns: minmax(290px, 336px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.lab-split-aside {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 82px;
}
.lab-split-aside .lab-photo-wrap {
  min-height: 175px;
  aspect-ratio: 16 / 10;
}
.lab-aside-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.lab-aside-title {
  margin: 5px 0 2px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.lab-aside-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.lab-split-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
}
.lab-split-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}
.room-subtabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.room-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.room-subtab-btn:hover {
  color: var(--ink);
}
.room-subtab-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.room-subtab-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--open-bg);
  color: var(--open-ink);
}
.lab-split-body {
  padding: 16px;
}
.lab-split-body > * {
  animation: panelEnter 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lab-split-body .slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
}
.lab-split-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--ink-muted);
}
@media (max-width: 1020px) {
  .lab-split-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .lab-split-aside {
    position: static;
  }
}
@media (max-width: 960px) {
  .lab-focus-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .lab-spec-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .lab-spec-row {
    border-right: none;
  }
  .lab-spec-row:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }
  .lab-spec-row:last-child {
    border-bottom: none;
  }
}
@media (max-width: 600px) {
  .desk-meta-split,
  .lab-quick-specs {
    grid-template-columns: minmax(0, 1fr);
  }
  .lab-spec-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

/* Forgot Password & Desk Ticket Check-In (v67) */
.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.text-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.15s ease;
}
.text-link-btn:hover {
  color: var(--ink);
}
.modal-dialog.modal-sm {
  max-width: 460px;
}
.checkin-card {
  margin-bottom: 12px;
  border-color: var(--border-strong);
}
.checkin-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.checkin-head strong {
  display: block;
  font-size: 0.92rem;
}
.checkin-head .field-hint {
  margin: 2px 0 0;
}
.checkin-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 280px;
  max-width: 420px;
}
.checkin-controls .input {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.checkin-result {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.checkin-result[hidden] {
  display: none;
}
.checkin-result-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.checkin-result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.key-state-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  margin-top: 4px;
  width: fit-content;
  background: var(--open-bg);
  color: var(--open-ink);
  border: 1px solid var(--open-border);
}
.key-state-pill.is-returned {
  background: var(--surface-subtle);
  color: var(--ink-muted);
  border-color: var(--border);
}
@media (max-width: 640px) {
  .checkin-controls {
    max-width: none;
    width: 100%;
  }
}

