@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.2bf3d951bf9d.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   IFFar Esportes — Design System & Interface Styles
   Operational sports management system for Campus Júlio de Castilhos
   ========================================================================== */

:root {
  /* Core Colors */
  --ink: #18181B;
  --ink-secondary: #414147;
  --muted: #626269;
  --canvas: #FFFFFF;
  --surface: #FFFFFF;
  --surface-subtle: #FAFAFA;
  --line: #DEDEE2;
  --line-subtle: #EEEEF0;

  /* IFFar Green — Brand & Primary Action */
  --green: #1F6848;
  --green-hover: #174F37;
  --green-surface: #EBF3EE;
  --green-border: #C2DCCB;
  --green-dark: #123C2B;

  /* Court Lime — Availability & Timeline Signature */
  --court-lime: #E8F3ED;
  --court-lime-dark: #245D40;
  --court-lime-surface: #F3F8F5;
  --court-lime-border: #B8D3C2;

  /* Semantics */
  --blue: #245BDD;
  --blue-surface: #EEF3FE;
  --blue-border: #C8D8FA;

  --amber: #9A6B12;
  --amber-surface: #FDF7EB;
  --amber-border: #F3E0BD;

  --red: #B0444D;
  --red-hover: #8D343B;
  --red-surface: #FCECEE;
  --red-border: #F5C7CD;

  --neutral-status: #505652;
  --neutral-surface: #EEEEF0;
  --neutral-border: #DDE2DC;

  /* Dimensions & Radii */
  --sidebar-width: 248px;
  --radius-sm: 4px;
  --radius: 5px;
  --radius-md: 6px;
  --radius-lg: 6px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sheet: 0 -4px 24px rgba(22, 26, 24, 0.12);
  --shadow-dropdown: 0 4px 16px rgba(22, 26, 24, 0.08);

  /* Typography Stacks */
  --font-display: "Inter", Arial, sans-serif;
  --font-body: "Inter", Arial, sans-serif;

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   Reset & Base Elements
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  background-color: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button, summary, select {
  cursor: pointer;
}

button, a, input, select, textarea, summary {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

button:disabled, input:disabled, select:disabled, textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin-top: 0;
  margin-bottom: 8px;
  letter-spacing: -0.025em;
}

h1 {
  font-size: 24px;
  line-height: 32px;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 16px;
  font-weight: 600;
}

p {
  margin-top: 0;
  margin-bottom: 14px;
}

small, .small {
  font-size: 12px;
  line-height: 1.4;
}

strong {
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.preserve-lines {
  white-space: pre-line;
}

.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;
}

/* Accessibility Skip Link */
.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--green);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 13px;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.skip-link:focus {
  transform: translateY(0);
}

/* SVG Icons */
.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-xs {
  width: 14px;
  height: 14px;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 22px;
  height: 22px;
}

/* --------------------------------------------------------------------------
   App Layout & Navigation Shell
   -------------------------------------------------------------------------- */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  background-color: var(--canvas);
}

/* Mobile Header (Hidden on Desktop) */
.mobile-header {
  display: none;
}

/* Mobile Bottom Navigation (Hidden on Desktop) */
.mobile-bottom-nav {
  display: none;
}

/* Desktop Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  padding: 0 14px 16px;
  background: var(--surface-subtle);
  border-right: 1px solid var(--line);
}

.sidebar-top {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  padding: 17px 8px;
  margin: 0 -14px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text span {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: -0.015em;
}

.brand-text strong {
  color: var(--green);
  font-weight: 700;
}

.brand-text small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.nav-section-label {
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  padding: 8px 12px;
  margin-top: 4px;
}

.nav-section-label.admin-label {
  margin-top: 20px;
  padding-top: 0;
  border-top: 0;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.main-nav > a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav > a:hover {
  background-color: var(--canvas);
  color: var(--ink);
  text-decoration: none;
}

.main-nav > a.active {
  background-color: #EAEAEC;
  color: var(--ink);
  font-weight: 500;
  position: relative;
}

.main-nav > a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 2px;
  background-color: var(--green);
  border-radius: 0 2px 2px 0;
}

.nav-cta-wrapper {
  margin-top: 18px;
  padding-top: 12px;
}

.sidebar-cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 5px;
  background: #EEEEF0;
  color: var(--ink-secondary);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.avatar-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-surface);
  color: var(--green);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
}

.user-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.user-copy strong {
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-copy small {
  font-size: 11px;
  color: var(--muted);
}

.logout-form {
  margin: 0;
}

.logout-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  font-size: 12px;
  transition: background 0.15s ease, color 0.15s ease;
}

.logout-button:hover {
  background-color: var(--canvas);
  color: var(--ink);
}

.privacy-link {
  font-size: 11px;
  color: var(--muted);
  padding: 0 8px;
  text-decoration: none;
}

.privacy-link:hover {
  color: var(--green);
  text-decoration: underline;
}

/* Main Content Area */
.main-content {
  min-width: 0;
}

.main-content:focus {
  outline: none;
}

.content-wrap {
  max-width: 1440px;
  padding: 32px 40px 64px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Page Header
   -------------------------------------------------------------------------- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.page-title {
  margin-bottom: 6px;
  color: var(--ink);
}

.page-description {
  color: var(--muted);
  margin-bottom: 0;
  font-size: 13px;
  max-width: 760px;
  line-height: 1.6;
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.back-link:hover {
  color: var(--green);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Buttons & Links
   -------------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.button:hover {
  text-decoration: none;
}

.button-primary {
  background-color: var(--green);
  border-color: var(--green);
  color: #FFFFFF;
}

.button-primary:hover {
  background-color: var(--green-hover);
  border-color: var(--green-hover);
  color: #FFFFFF;
}

.button-secondary {
  background-color: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.button-secondary:hover {
  background-color: var(--canvas);
  border-color: #CCD2CA;
}

.button-quiet {
  background-color: transparent;
  border-color: var(--line);
  color: var(--ink-secondary);
}

.button-quiet:hover {
  background-color: var(--canvas);
  color: var(--ink);
}

.button-danger {
  background-color: var(--red-surface);
  border-color: var(--red-border);
  color: var(--red);
}

.button-danger:hover {
  background-color: #F8D8DC;
  border-color: #EFA6AE;
}

.button-full {
  width: 100%;
}

.button-small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.text-link {
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-underline-offset: 3px;
}

.text-link:hover {
  text-decoration: underline;
}

.text-link.small {
  font-size: 12px;
}

.icon-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.icon-button:hover {
  background: var(--canvas);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Panels, Cards & Surfaces
   -------------------------------------------------------------------------- */
.panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  min-width: 0;
  overflow: visible;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Status Badges
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

.badge-label {
  display: inline-block;
}

.badge-pending {
  background-color: var(--amber-surface);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.badge-approved {
  background-color: var(--green-surface);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.badge-in_use {
  background-color: var(--blue-surface);
  color: var(--blue);
  border: 1px solid var(--blue-border);
}

.badge-completed {
  background-color: var(--neutral-surface);
  color: var(--neutral-status);
  border: 1px solid var(--neutral-border);
}

.badge-rejected, .badge-cancelled {
  background-color: var(--neutral-surface);
  color: var(--muted);
  border: 1px solid var(--neutral-border);
}

.badge-overdue {
  background-color: var(--red-surface);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.badge-blocked {
  background-color: var(--neutral-surface);
  color: var(--neutral-status);
  border: 1px solid var(--neutral-border);
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Notices & Feedback Messages
   -------------------------------------------------------------------------- */
.messages {
  margin-bottom: 24px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.notice-icon {
  margin-top: 1px;
}

.notice-body {
  flex: 1;
}

.notice-success {
  background-color: var(--green-surface);
  border-color: var(--green-border);
  color: var(--green-dark);
}

.notice-error {
  background-color: var(--red-surface);
  border-color: var(--red-border);
  color: #7D252C;
}

.notice-warning {
  background-color: var(--amber-surface);
  border-color: var(--amber-border);
  color: #6B4908;
}

.notice-info {
  background-color: var(--blue-surface);
  border-color: var(--blue-border);
  color: #173FA5;
}

/* --------------------------------------------------------------------------
   Student Priority Card (Next Activity on Dashboard)
   -------------------------------------------------------------------------- */
.student-priority-panel {
  margin-bottom: 24px;
  border-radius: 0;
  border: 0;
  background: var(--surface);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.student-priority-panel .section-heading {
  background: transparent;
  border-bottom: 0;
  padding: 0 0 8px;
}

.next-activity-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 20px;
  gap: 20px;
}

.next-activity-content {
  display: flex;
  align-items: center;
  gap: 18px;
}

.date-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 52px;
  flex: 0 0 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  border-right: 1px solid var(--line);
}

.date-tile strong {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-weight: 500;
}

.date-tile span {
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  color: var(--muted);
  margin-top: 3px;
}

.next-activity-details h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.next-activity-details p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0;
}

.next-activity-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.empty-priority-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 20px;
  gap: 16px;
  color: var(--muted);
}

.empty-priority-card p {
  margin: 0;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Timeline & Occupancy Strip (Signature Component)
   -------------------------------------------------------------------------- */
.agenda-panel {
  margin-bottom: 28px;
}

.legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

.legend-dot.free {
  background-color: var(--court-lime);
  border: 1px solid var(--court-lime-border);
}

.legend-dot.occupied {
  background-color: #DDE2DC;
  border: 1px solid #CCD2CA;
}

.legend-dot.blocked {
  background: repeating-linear-gradient(45deg, #DEDEE2, #DEDEE2 4px, #CBD2CA 4px, #CBD2CA 8px);
  border: 1px solid #B8C0B7;
}

.legend-dot.own {
  background-color: var(--green-surface);
  border: 1px solid var(--green-border);
}

.agenda-toolbar {
  padding: 14px 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.date-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-switcher strong {
  font-size: 14px;
  font-weight: 600;
  min-width: 170px;
  text-align: center;
}

.date-switcher strong::first-letter {
  text-transform: uppercase;
}

.agenda-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.agenda-filters select, .agenda-filters input[type="date"] {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Timeline Layout */
.timeline-container {
  padding: 24px 18px 16px 0;
  overflow-x: auto;
}

.timeline-axis-header {
  position: relative;
  height: 28px;
  margin-left: 216px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  min-width: 640px;
}

.timeline-tick-label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline-tick-mark {
  position: absolute;
  bottom: 0;
  height: 6px;
  width: 1px;
  background-color: var(--line);
  transform: translateX(-50%);
}

.timeline-facilities {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.facility-lane {
  display: grid;
  grid-template-columns: 200px minmax(640px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-subtle);
}

.facility-label {
  padding-right: 12px;
}

.facility-label h3 {
  font-size: 14px;
  margin: 0 0 2px;
  line-height: 1.3;
}

.facility-label p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.facility-label .text-link {
  margin-top: 4px;
}

.timeline-track {
  position: relative;
  height: 52px;
  background: #F5F5F6;
  border-radius: 3px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.timeline-slot {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.2;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: filter 0.15s ease, transform 0.15s ease;
  z-index: 2;
}

.timeline-slot strong {
  display: block;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.timeline-slot span {
  display: block;
  font-size: 10px;
  opacity: 0.9;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Slot Types */
.slot-free {
  background-color: var(--court-lime);
  border: 1px solid var(--court-lime-border);
  color: var(--court-lime-dark);
  cursor: pointer;
  z-index: 1;
}

.slot-free:hover {
  background-color: #D5E9DC;
  border-color: #6A997C;
  text-decoration: none;
  z-index: 5;
  box-shadow: none;
}

.slot-occupied, .slot-pending, .slot-approved, .slot-in_use {
  background-color: #DEDEE2;
  border: 1px solid #CED4CD;
  color: #3B423D;
  cursor: default;
}

.slot-own {
  background-color: var(--green-surface);
  border: 1px solid #A2CBB0;
  color: #1A573C;
  font-weight: 600;
  cursor: pointer;
}

.slot-own:hover {
  background-color: #D8EBDD;
  text-decoration: none;
}

.slot-blocked {
  background: repeating-linear-gradient(45deg, #E6EBE4, #E6EBE4 8px, #D8DFD6 8px, #D8DFD6 16px);
  border: 1px solid #C4CDC2;
  color: #3B423D;
  cursor: default;
}

/* Mobile Facility Schedule (Shown on Small Screens) */
.mobile-facility-list {
  display: none;
}

/* --------------------------------------------------------------------------
   Professor Operational Home: Fila de Atenção & Decisões
   -------------------------------------------------------------------------- */
.triage-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.triage-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.triage-pill:hover {
  border-color: #CCD2CA;
  background-color: var(--surface-subtle);
  text-decoration: none;
}

.triage-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  flex-shrink: 0;
}

.triage-badge.alert {
  background-color: var(--red-surface);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.triage-badge.ready {
  background-color: var(--blue-surface);
  color: var(--blue);
  border: 1px solid var(--blue-border);
}

.triage-badge.pending {
  background-color: var(--amber-surface);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.triage-badge.all-good {
  background-color: var(--green-surface);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.triage-info strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
}

.triage-info small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.operational-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 32px;
  align-items: start;
}

/* Operational Queue Rows */
.operational-queue {
  display: flex;
  flex-direction: column;
}

.op-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-subtle);
}

.op-row:last-child {
  border-bottom: 0;
}

.op-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.op-row-text {
  min-width: 0;
}

.op-row-text strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.op-row-text p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.op-row-action {
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Request List & Tabbed Organization
   -------------------------------------------------------------------------- */
.tabs-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 1px;
}

.tab-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.tab-link:hover {
  color: var(--ink);
  text-decoration: none;
}

.tab-link.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar .inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reservation-list {
  display: flex;
  flex-direction: column;
}

.reservation-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-subtle);
  transition: background-color 0.15s ease;
}

.reservation-row:last-child {
  border-bottom: 0;
}

.reservation-row:hover {
  background-color: var(--surface-subtle);
  text-decoration: none;
}

.reservation-summary {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.reservation-summary strong {
  font-size: 14px;
}

.reservation-summary span {
  font-size: 12px;
  color: var(--muted);
}

.reservation-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.reservation-meta small {
  font-size: 12px;
  color: var(--muted);
}

.reservation-state {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.state-hint {
  font-size: 12px;
  color: var(--muted);
}

.row-action-btn {
  margin-left: 12px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Request Composer: Single-page guided form
   -------------------------------------------------------------------------- */
.composer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
}

.composer-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.composer-step {
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: #EEEEF0;
  color: var(--ink-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
}

.step-title {
  margin: 0;
  font-size: 16px;
}

/* Mode Switch: Segmented Control */
.segmented-control {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 20px;
  border: 1px solid #C9C9CE;
}

.segmented-control label {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.segmented-control input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control input[type="radio"]:checked + label {
  background: #EAEAEC;
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--green);
}

/* Date & Time Grid */
.date-time-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

/* Material Catalog & Stepper */
.material-catalog {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.material-search-input {
  margin-bottom: 14px;
}

.catalog-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  gap: 16px;
  border-bottom: 1px solid var(--line-subtle);
}

.catalog-item-name {
  font-size: 13px;
  font-weight: 600;
}

.quantity-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stepper-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  transition: background-color 0.15s ease;
}

.stepper-btn:hover {
  background-color: var(--canvas);
}

.stepper-input {
  width: 44px;
  height: 32px;
  border: 0 !important;
  border-left: 1px solid var(--line) !important;
  border-right: 1px solid var(--line) !important;
  text-align: center;
  padding: 0 !important;
  font-weight: 600;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Sticky Summary Panel */
.composer-summary-panel {
  position: sticky;
  top: 24px;
  padding: 20px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.summary-heading {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-subtle);
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 13px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.summary-row dt {
  color: var(--muted);
  font-size: 12px;
}

.summary-row dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.summary-materials-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  text-align: right;
}

.summary-materials-list li {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.summary-disclaimer {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Detail Layout (Student & Professor)
   -------------------------------------------------------------------------- */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 28px;
}

.detail-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  position: sticky;
  top: 24px;
}

.detail-section {
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
}

.detail-section h2 {
  font-size: 16px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-subtle);
}

/* "O Que Acontece Agora" Explanatory Banner */
.now-banner {
  padding: 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.now-icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.now-icon-circle.pending { background: var(--amber-surface); color: var(--amber); border: 1px solid var(--amber-border); }
.now-icon-circle.approved { background: var(--green-surface); color: var(--green); border: 1px solid var(--green-border); }
.now-icon-circle.in_use { background: var(--blue-surface); color: var(--blue); border: 1px solid var(--blue-border); }
.now-icon-circle.completed { background: var(--neutral-surface); color: var(--neutral-status); border: 1px solid var(--neutral-border); }
.now-icon-circle.alert { background: var(--red-surface); color: var(--red); border: 1px solid var(--red-border); }

.now-content strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.now-content p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

/* Detail Grid (Data rows) */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  margin: 0;
}

.detail-grid dt {
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  margin-bottom: 4px;
}

.detail-grid dd {
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.detail-grid .full-width {
  grid-column: 1 / -1;
}

/* Compact Student Contact Card for Professor */
.student-card {
  padding: 18px 20px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.student-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.student-card-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.student-contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.copy-btn {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
  min-height: 30px;
}

.copy-btn:hover {
  background: var(--canvas);
  color: var(--ink);
}

/* Materials & Units Rows */
.material-rows-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.material-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line-subtle);
}

.material-row-item strong {
  font-size: 13px;
}

.material-row-item small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* Audit History Timeline */
.timeline-history {
  list-style: none;
  padding: 0;
  margin: 0;
}

.history-item {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 20px;
}

.history-item:not(:last-child)::before {
  content: "";
  position: absolute;
  width: 1px;
  height: calc(100% - 10px);
  left: 6px;
  top: 18px;
  background: var(--line);
}

.history-item:last-child {
  padding-bottom: 0;
}

.history-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--green-border);
  flex-shrink: 0;
  margin-top: 4px;
}

.history-content {
  min-width: 0;
  flex: 1;
}

.history-content strong {
  font-size: 13px;
}

.history-content p {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0;
}

.history-content small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

/* Professor Unit Selection (Approval Form) */
.approval-category-group {
  margin-bottom: 18px;
  padding: 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.approval-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.approval-category-header h4 {
  margin: 0;
  font-size: 13px;
}

.cat-counter-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--amber-surface);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.cat-counter-pill.ready {
  background: var(--green-surface);
  color: var(--green);
  border-color: var(--green-border);
}

.unit-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.unit-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.unit-chip:hover {
  border-color: var(--green);
}

.unit-chip input[type="checkbox"] {
  accent-color: var(--green);
  cursor: pointer;
}

.unit-chip:has(input:checked) {
  background: var(--green-surface);
  border-color: var(--green);
  color: var(--green-dark);
}

/* Action Rail Details & Disclosures */
.action-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.action-panel h2 {
  font-size: 17px;
  margin-bottom: 6px;
}

.action-panel p {
  font-size: 12px;
  color: var(--muted);
}

.disclosure {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.disclosure > summary {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.disclosure > summary:hover {
  background-color: var(--surface-subtle);
  color: var(--ink);
}

.disclosure.danger-disclosure > summary {
  color: var(--red);
}

.disclosure[open] > summary {
  border-bottom: 1px solid var(--line-subtle);
  background-color: var(--surface-subtle);
}

.disclosure-body {
  padding: 20px;
}

/* --------------------------------------------------------------------------
   Inventory / Materials Screen (Tabular Surface)
   -------------------------------------------------------------------------- */
.inventory-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.inventory-metric-card {
  padding: 20px;
  background: var(--surface);
  border: 0;
  border-radius: 0;
  border-right: 1px solid var(--line);
}

.inventory-metric-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
  color: var(--ink);
  font-weight: 500;
}

.inventory-metric-card small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.data-table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.data-table th {
  padding: 12px;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line-subtle);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tr:hover td {
  background-color: var(--surface-subtle);
}

/* --------------------------------------------------------------------------
   Schedule Blocks (Pontual vs Semanal)
   -------------------------------------------------------------------------- */
.block-mode-tabs {
  margin-bottom: 18px;
}

.block-preview-box {
  padding: 12px 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink-secondary);
  margin-bottom: 18px;
}

.block-list {
  display: flex;
  flex-direction: column;
}

.block-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-subtle);
}

.block-item-row:last-child {
  border-bottom: 0;
}

.block-item-info h3 {
  font-size: 14px;
  margin: 0 0 3px;
}

.block-item-info p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Students Management Screen
   -------------------------------------------------------------------------- */
.student-list {
  display: flex;
  flex-direction: column;
}

.student-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line-subtle);
}

.student-card-row:last-child {
  border-bottom: 0;
}

.student-identity-col {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.student-identity-col h3 {
  font-size: 14px;
  margin: 0 0 2px;
}

.student-identity-col p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.student-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Forms & Controls
   -------------------------------------------------------------------------- */
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  font-size: 13px;
  transition: border-color 0.15s ease;
}

input:not([type=checkbox]):not([type=radio]):not([type=hidden]):focus,
select:focus,
textarea:focus {
  border-color: var(--green);
}

input::placeholder, textarea::placeholder {
  color: #8C948E;
}

textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.45;
}

input[type=checkbox], input[type=radio] {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
  flex-shrink: 0;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field {
  margin: 0;
  min-width: 0;
}

fieldset.form-field {
  border: 0;
  padding: 0;
}

.form-field > label, .form-field > legend {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.required-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: normal;
}

.help-text {
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 0;
  line-height: 1.45;
}

.field-error {
  color: var(--red);
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 500;
}

.has-error input, .has-error select, .has-error textarea {
  border-color: var(--red) !important;
}

.checkbox-field {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 8px;
}

.checkbox-field > label {
  flex: 1;
  font-size: 13px;
  font-weight: normal;
  cursor: pointer;
}

.checkbox-field .help-text, .checkbox-field .field-error {
  flex-basis: 100%;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line-subtle);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Empty States
   -------------------------------------------------------------------------- */
.empty-state {
  padding: 32px 16px;
  text-align: center;
}

.empty-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--muted);
  background: var(--canvas);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.empty-state h3, .empty-state h2 {
  font-size: 17px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--muted);
  font-size: 13px;
  max-width: 420px;
  margin: 0 auto 16px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Public / Auth Layout
   -------------------------------------------------------------------------- */
.guest-layout {
  display: grid;
  grid-template-columns: minmax(380px, 44%) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--surface);
}

.welcome-panel {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 44px 52px 32px;
  background: #FAFAFA;
  border-right: 1px solid var(--line);
}

.welcome-copy {
  margin: auto 0;
  padding: 40px 0;
}

.welcome-copy h1 {
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -0.04em;
  margin: 18px 0;
  color: var(--ink);
}

.welcome-copy > p:not(.eyebrow) {
  color: #4A564D;
  font-size: 14px;
  max-width: 360px;
  line-height: 1.6;
}

.welcome-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4A564D;
  font-size: 12px;
  margin-top: 24px;
  font-weight: 500;
}

.welcome-footer {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.court-illustration {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1.8;
  border: 2px solid #8FA693;
  outline: 10px solid #DCE6DA;
  border-radius: 4px;
  background: #DCE6DA;
  margin: 36px 0 24px;
}

.court-illustration::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 2px;
  height: 100%;
  background: #8FA693;
}

.court-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26%;
  aspect-ratio: 1;
  border: 2px solid #8FA693;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.court-box {
  position: absolute;
  top: 22%;
  width: 18%;
  height: 56%;
  border: 2px solid #8FA693;
}

.court-box-left {
  left: -2px;
  border-radius: 0 40% 40% 0;
}

.court-box-right {
  right: -2px;
  border-radius: 40% 0 0 40%;
}

.court-ball {
  position: absolute;
  width: 18px;
  height: 18px;
  top: 32%;
  right: 28%;
  border-radius: 50%;
  background: var(--court-lime);
  border: 2px solid var(--court-lime-dark);
}

.guest-layout .main-content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.guest-layout .content-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  flex: 1;
  padding: 48px clamp(32px, 6vw, 96px);
}

.auth-content {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.auth-content .page-title {
  font-size: 24px;
  margin-bottom: 8px;
}

.auth-content .page-description {
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-content .button {
  min-height: 44px;
}

.form-link-row {
  text-align: right;
  margin-top: -8px;
  font-size: 12px;
}

.auth-divider {
  border-top: 1px solid var(--line);
  margin: 24px 0 20px;
}

.auth-switch {
  font-size: 13px;
  color: var(--muted);
  margin-top: 18px;
}

.auth-secondary {
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}

.guest-footer {
  padding: 20px 32px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}

.guest-footer a {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Mobile Sheet / Drawer Component
   -------------------------------------------------------------------------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 26, 24, 0.45);
  z-index: 990;
  backdrop-filter: none;
}

.mobile-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  z-index: 995;
  box-shadow: var(--shadow-sheet);
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-subtle);
  margin-bottom: 16px;
}

.sheet-title {
  margin: 0;
  font-size: 16px;
}

.sheet-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--canvas);
  border: 0;
  border-radius: 50%;
  color: var(--muted);
}

.sheet-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-subtle);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.sheet-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.sheet-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.sheet-nav-item:hover {
  background: var(--canvas);
  text-decoration: none;
}

/* Shared shell and interaction details. */
.workspace-bar { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 40px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.workspace-bar strong { color: var(--ink); font-weight: 500; }
.workspace-context { display: flex; align-items: center; gap: 10px; }
.workspace-bar a { color: var(--ink-secondary); text-decoration: underline; text-underline-offset: 3px; }
.sidebar .brand { padding: 0 18px; }
.sidebar .brand img { width: 28px; height: 28px; }
.main-nav .icon { color: #787880; width: 16px; height: 16px; }
.main-nav a.active .icon { color: var(--green); }
.sidebar-cta[aria-current="page"] { background: var(--green-dark); border-color: var(--green-dark); }
.inventory-metric-card:last-child { border-right: 0; }
.segmented-control input:focus-visible + label { outline: 2px solid var(--green); outline-offset: -3px; }
.quantity-stepper input.stepper-input { width: 48px; min-height: 34px; border-radius: 0; }
.triage-pill + .triage-pill { border-left: 1px solid var(--line); }
.timeline-tick-label:nth-last-child(2) { transform: translateX(-100%); }
.timeline-slot:focus-visible { outline-offset: -3px; z-index: 6; }
.sheet-user-info small { display: block; overflow-wrap: anywhere; }
.form-field, .op-row-text, .reservation-summary { overflow-wrap: anywhere; }

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .app-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .content-wrap {
    padding: 24px 24px 56px;
  }
  .composer-layout, .detail-layout, .operational-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .composer-summary-panel, .detail-actions {
    position: static;
  }
  .inventory-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  /* Hide desktop sidebar */
  .sidebar {
    display: none;
  }

  .app-layout {
    display: block;
  }

  /* Show mobile header */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .mobile-menu-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
  }

  /* Show mobile bottom nav */
  .mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(56px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface);
    border-top: 1px solid var(--line);
    z-index: 500;
  }

  .mobile-bottom-nav a, .mobile-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    background: transparent;
    border: 0;
    padding: 4px 0;
  }

  .mobile-bottom-nav a.active {
    color: var(--green);
  }

  .mobile-nav-cta {
    position: relative;
    top: -8px;
  }

  .cta-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--green);
    color: #FFFFFF;
    box-shadow: none;
  }

  /* Adjust content wrap for mobile */
  .content-wrap {
    padding: 20px 16px 88px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .triage-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Guest layout mobile */
  .guest-layout {
    display: block;
  }

  .welcome-panel {
    display: none;
  }

  .guest-layout .content-wrap {
    padding: 36px 20px 48px;
  }

  /* Mobile timeline adapt */
  .timeline-container {
    display: none;
  }

  .mobile-facility-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }

  .mobile-facility-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 16px 0;
  }

  .mobile-facility-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
  }

  .mobile-free-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
  }

  .date-time-grid {
    grid-template-columns: 1fr;
  }

  .date-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .date-switcher strong {
    min-width: auto;
  }

  .agenda-filters {
    width: 100%;
  }

  .agenda-filters select, .agenda-filters input[type="date"] {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .op-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .op-row-action {
    width: 100%;
  }
  .op-row-action .button {
    width: 100%;
  }
  .reservation-row {
    flex-wrap: wrap;
  }
  .reservation-state {
    margin-left: 0;
    align-items: flex-start;
    width: 100%;
    margin-top: 6px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .catalog-item-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .quantity-stepper {
    width: 100%;
    justify-content: space-between;
  }
}

/* --------------------------------------------------------------------------
   Accessibility: Reduced Motion & High Contrast
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .sidebar, .mobile-header, .mobile-bottom-nav, .skip-link, .button, .guest-footer, .detail-actions {
    display: none !important;
  }
  .app-layout, .detail-layout, .composer-layout {
    display: block !important;
  }
  body {
    background: #FFFFFF !important;
  }
  .content-wrap {
    padding: 0 !important;
  }
  .panel {
    border: 1px solid #CCC !important;
    break-inside: avoid;
    margin-bottom: 20px;
  }
}

@media (max-width: 840px) {
  .workspace-bar { display: none; }
  .mobile-facility-list { padding: 0; gap: 0; }
  .mobile-bottom-nav a.active { background: var(--green-surface); }
  .triage-pill + .triage-pill { border-left: 0; border-top: 1px solid var(--line); }
  .triage-strip { gap: 0; }
  .next-activity-card, .empty-priority-card { flex-wrap: wrap; }
  .agenda-filters > div { flex: 1 1 140px; min-width: 0; }
  .segmented-control label { font-size: 12px; }
  .button, .icon-button, .stepper-btn { min-height: 40px; }
  .stepper-btn { width: 40px; }
  .data-table { min-width: 640px; }
  .block-item-row { flex-wrap: wrap; }
  .sheet-close-btn { width: 40px; height: 40px; }
}
@media (max-width: 480px) {
  .page-title { font-size: 23px; }
  .next-activity-actions { flex-wrap: wrap; }
  .reservation-row { gap: 12px; }
  .reservation-state { width: auto; flex: 1; }
  .row-action-btn { margin-left: 0; }
  .catalog-item-row { flex-direction: row; align-items: center; }
  .quantity-stepper { width: auto; flex-shrink: 0; }
  .inventory-metric-card { padding: 16px 10px; }
  .inventory-metric-card:nth-child(2) { border-right: 0; }
  .student-stats { width: 100%; }
}

/* Shared template layouts, external for the strict content security policy. */
.mb-24 { margin-bottom: 24px; }
.conflict-description { margin: 4px 0 10px; font-size: 13px; }
.conflict-list { padding-left: 20px; margin: 0 0 8px; }
.mb-6 { margin-bottom: 6px; }
.emphasis-link { font-weight: 600; text-decoration: underline; }
.table-panel { padding: 0; overflow: hidden; }
.gap-8 { gap: 8px; }
.compact-filter { max-width: 200px; font-size: 12px; min-height: 34px; }
.row-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.mt-3 { margin-top: 3px; }
.plain-disclosure { border: 0; background: transparent; }
.unmarked-summary { list-style: none; }
.confirmation-box { padding: 12px; background: var(--surface-subtle); border-radius: var(--radius); border: 1px solid var(--line); margin-top: 6px; }
.mb-8 { margin-bottom: 8px; }
.section-footer { padding: 16px 24px; background: var(--surface-subtle); border-top: 1px solid var(--line); }
.plain-surface { background: transparent; border: 0; }
.subsection-toggle { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; }
.mt-12 { margin-top: 12px; }
.schedule-entry { padding: 10px 0; border-bottom: 1px solid var(--line-subtle); font-size: 12px; color: var(--muted); }
.mb-12 { margin-bottom: 12px; }
.two-column-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.full-grid-width { grid-column: 1 / -1; }
.schedule-footer { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-subtle); }
.free-window-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.simple-form-panel { padding: 28px; max-width: 640px; margin-bottom: 24px; }
.text-success { color: var(--green); }
.text-warning { color: var(--amber); }
.metric-alert { font-size: 11px; vertical-align: middle; margin-left: 6px; }
.table-toolbar { padding: 16px 20px; background: var(--surface-subtle); border-bottom: 1px solid var(--line); }
.full-width-form { gap: 10px; width: 100%; }
.search-field { flex: 1; min-width: 180px; }
.filter-field { min-width: 160px; }
.text-right { text-align: right; }
.status-available { background: var(--court-lime-surface); color: var(--court-lime-dark); border-color: var(--court-lime-border); }
.empty-table { padding: 36px 20px; }
.summary-intro { margin-top: -6px; margin-bottom: 18px; }
.help-divider { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line-subtle); }
.compact-copy { margin: 0; line-height: 1.45; }
.message-content { max-width: 680px; margin: 20px auto; }
.message-description { font-size: 14px; margin: 16px 0 24px; line-height: 1.6; }
.status-filter { max-width: 220px; }
.mt-24 { margin-top: 24px; }
.display-block { display: block; }
.m-0 { margin: 0; }
.detail-divider { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-subtle); }
.section-caption { font-size: 14px; margin-bottom: 12px; }
.error-copy { margin: 0; color: var(--red); }
.mb-14 { margin-bottom: 14px; }
.mt-16 { margin-top: 16px; }
.optional-label { font-size: 13px; font-weight: normal; }
.section-help { font-size: 12px; margin: 2px 0 0; }
.summary-column { flex-direction: column; align-items: stretch; gap: 4px; }
.text-left { text-align: left; }
.student-search-form { width: 100%; max-width: 480px; }
.flex-fill { flex: 1; }
.student-contact-meta { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.wrapping-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.account-confirmation { background: var(--surface-subtle); border-radius: var(--radius); border: 1px solid var(--line); margin-top: 8px; max-width: 480px; }
.confirmation-copy { color: var(--ink-secondary); margin-bottom: 8px; }
.text-error { color: var(--red); }
.text-danger { color: var(--red); }
.inline-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
[hidden] { display: none !important; }

/* Dense data surfaces use text and icons instead of repeated status boxes. */
.data-table .badge { background: transparent; border: 0; padding: 0; }
.table-panel.composer-main { gap: 0; }
.material-catalog { max-height: 360px; overflow-y: auto; padding-right: 8px; }
.sheet-open { overflow: hidden; }
.mobile-header .brand-text { flex-direction: row; gap: 4px; }
@media (max-width: 840px) {
  .student-card-row, .student-contact-meta { flex-wrap: wrap; }
  .student-identity-col { min-width: 0; }
  .student-identity-col p { overflow-wrap: anywhere; }
  .two-column-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-filter { width: auto; }
  .simple-form-panel { padding: 0; }
  .material-catalog { max-height: 340px; }
}

.inline-form > select { width: auto; max-width: 100%; }
@media (max-width: 480px) { .student-contact-item { flex-wrap: wrap; } }

.mobile-free-chips a { min-height: 40px; padding: 8px 12px; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
@media print { .workspace-bar { display: none; } }

/* --------------------------------------------------------------------------
   Product controls
   Progressive enhancement for select, date, time and binary fields.
   -------------------------------------------------------------------------- */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, #71717A 50%),
    linear-gradient(135deg, #71717A 50%, transparent 50%);
  background-position:
    calc(100% - 17px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input[type="date"], input[type="time"] {
  color-scheme: light;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  border: 1px solid #A8A8AF;
  border-radius: 3px;
  background: var(--surface);
  transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

input[type="checkbox"]::before {
  content: "";
  width: 9px;
  height: 5px;
  border: solid #FFFFFF;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) translateY(-1px) scale(0);
  transition: transform 0.1s ease;
}

input[type="checkbox"]:checked {
  border-color: var(--green);
  background: var(--green);
}

input[type="checkbox"]:checked::before {
  transform: rotate(-45deg) translateY(-1px) scale(1);
}

input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

input[type="checkbox"]:disabled {
  border-color: var(--line);
  background: var(--surface-subtle);
}

.product-control {
  position: relative;
  width: 100%;
  min-width: 0;
}

.product-control-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.product-control-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  text-align: left;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.product-control-trigger:hover {
  border-color: #B7B7BD;
  background: #FDFDFD;
}

.product-control-trigger:focus-visible,
.product-control.is-open .product-control-trigger {
  outline: 0;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(31, 104, 72, 0.14);
}

.product-control.is-open .product-control-icon {
  color: var(--green);
}

.product-control.has-placeholder .product-control-value {
  color: #77777F;
  font-weight: 400;
}

.product-control-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-control-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #67676E;
}

.product-control-icon svg {
  width: 100%;
  height: 100%;
}

.product-select.is-open .product-control-icon {
  transform: rotate(180deg);
}

.product-control-trigger:disabled {
  color: #7C7C83;
  background: #F5F5F6;
  border-color: #E3E3E6;
  opacity: 1;
}

.has-error .product-control-trigger,
.product-control.is-invalid .product-control-trigger,
.is-invalid-control {
  border-color: var(--red);
}

.product-control-popover {
  position: absolute;
  z-index: 850;
  top: calc(100% + 6px);
  left: 0;
  width: max-content;
  min-width: 100%;
  max-width: min(380px, calc(100vw - 32px));
  border: 1px solid #D6D6DA;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-dropdown);
}

.product-options {
  max-height: 264px;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.product-option {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 8px 34px 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-secondary);
  font-size: 13px;
  line-height: 18px;
  text-align: left;
}

.product-option:hover,
.product-option:focus-visible {
  outline: 0;
  background: var(--surface-subtle);
  color: var(--ink);
}

.product-option.is-selected {
  background: var(--green-surface);
  color: var(--green-dark);
  font-weight: 600;
}

.product-option.is-selected::after {
  content: "";
  position: absolute;
  right: 12px;
  width: 9px;
  height: 5px;
  border: solid var(--green);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) translateY(-1px);
}

.product-option:disabled {
  color: #A0A0A6;
  background: transparent;
}

.product-date-panel {
  width: 308px;
  padding: 12px;
}

.calendar-header {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.calendar-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-transform: capitalize;
}

.calendar-nav {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-secondary);
  font-size: 22px;
  line-height: 1;
}

.calendar-nav:hover,
.calendar-nav:focus-visible {
  border-color: var(--line);
  background: var(--surface-subtle);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.calendar-weekdays {
  margin-bottom: 4px;
}

.calendar-weekdays span {
  padding: 4px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  display: grid;
  place-items: center;
  width: 36px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.calendar-day:hover:not(:disabled),
.calendar-day:focus-visible {
  outline: 0;
  border-color: var(--green-border);
  background: var(--green-surface);
  color: var(--green-dark);
}

.calendar-day.is-outside {
  color: #A0A0A6;
}

.calendar-day.is-today {
  border-color: var(--green-border);
  color: var(--green);
  font-weight: 600;
}

.calendar-day.is-selected,
.calendar-day.is-selected:hover,
.calendar-day.is-selected:focus-visible {
  border-color: var(--green);
  background: var(--green);
  color: #FFFFFF;
  font-weight: 600;
}

.calendar-day:disabled {
  color: #C4C4C8;
  opacity: 1;
}

.calendar-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-subtle);
}

.product-time-panel {
  width: 300px;
  padding: 16px;
}

.time-panel-title {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.time-fields {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.time-fields input.time-part {
  width: 72px;
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.time-fields input.time-part:focus {
  border-color: var(--green);
  background: var(--surface);
}

.time-separator {
  color: var(--muted);
  font-size: 22px;
  font-weight: 600;
}

.time-quick-values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.time-quick-button {
  min-height: 34px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.time-quick-button:hover,
.time-quick-button:focus-visible,
.time-quick-button.is-selected {
  border-color: var(--green-border);
  background: var(--green-surface);
  color: var(--green-dark);
}

.time-panel-error {
  margin: 10px 0 0;
  color: var(--red);
  font-size: 12px;
  line-height: 1.4;
}

.time-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-subtle);
}

.inline-form > .product-control {
  width: min(220px, 100%);
}

@media (max-width: 840px) {
  .product-control-trigger {
    min-height: 46px;
    padding: 11px 12px;
  }

  .product-control.is-open::before {
    content: "";
    position: fixed;
    z-index: 840;
    inset: 0;
    background: rgba(24, 24, 27, 0.22);
    pointer-events: none;
  }

  .product-control-popover {
    position: fixed;
    z-index: 850;
    top: auto;
    right: 12px;
    bottom: calc(68px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: min(70vh, 560px);
    border-radius: 8px;
    box-shadow: var(--shadow-sheet);
  }

  .product-options {
    max-height: min(62vh, 480px);
    padding: 6px;
  }

  .product-option {
    min-height: 46px;
    padding-block: 11px;
  }

  .product-date-panel,
  .product-time-panel {
    width: auto;
  }

  .calendar-day {
    width: 100%;
    height: 40px;
  }

  .calendar-nav {
    width: 40px;
    height: 40px;
  }

  .time-quick-button {
    min-height: 42px;
  }

  .inline-form > .product-control {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .two-column-fields {
    grid-template-columns: 1fr;
  }
}

.two-column-fields.is-single-field > .form-field:first-child {
  grid-column: 1 / -1;
}

/* Keep overflow controls quiet and consistent with the neutral product chrome. */
.tabs-nav {
  scrollbar-width: none;
}

.tabs-nav::-webkit-scrollbar {
  display: none;
}

.material-catalog,
.data-table-container,
.timeline-container,
.product-options {
  scrollbar-width: thin;
  scrollbar-color: #BFC2C0 transparent;
}

.material-catalog::-webkit-scrollbar,
.data-table-container::-webkit-scrollbar,
.timeline-container::-webkit-scrollbar,
.product-options::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.material-catalog::-webkit-scrollbar-thumb,
.data-table-container::-webkit-scrollbar-thumb,
.timeline-container::-webkit-scrollbar-thumb,
.product-options::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: #BFC2C0;
}
