:root {
  --bg-app: #0b1011;
  --bg-header: #0e1415;
  --bg-surface: #111819;
  --bg-surface-raised: #161e20;
  --bg-control: #141c1e;
  --bg-hover: #192326;
  --border-subtle: #273235;
  --border-strong: #344247;
  --text-primary: #f1f5f3;
  --text-secondary: #aeb9b6;
  --text-muted: #84918e;
  --accent: #65c5b8;
  --accent-strong: #83d8cc;
  --accent-ink: #071412;
  --success: #58cc82;
  --warning: #e1b75f;
  --danger: #f0777e;
  --info: #79aaf2;
  --focus: #94ded4;
  --radius-sm: 6px;
  --radius-md: 10px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --header-height: 60px;
}

html {
  background: var(--bg-app);
}

body {
  min-width: 320px;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

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

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 1000;
  padding: var(--space-2) var(--space-3);
  color: var(--accent-ink);
  background: var(--accent-strong);
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.control-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Compact application shell */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  min-height: var(--header-height);
  margin: 0;
  padding: 0;
  color: var(--text-secondary);
  background: rgba(14, 20, 21, 0.97);
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.app-header-inner {
  width: min(100% - 48px, 1480px);
  min-height: var(--header-height);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
}

.app-brand,
.app-brand:visited {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
}

.app-brand:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.app-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-brand-copy {
  display: grid;
  gap: 1px;
}

.app-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.app-context {
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.2;
}

.main-navigation {
  min-width: 0;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.main-navigation li {
  display: block;
  padding: 0;
  background: transparent;
  font-size: inherit;
}

.main-navigation .operations-link {
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--border-subtle);
}

.main-navigation a,
.main-navigation a:visited {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 520;
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease;
}

.main-navigation a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  text-decoration: none;
}

.main-navigation a.active,
.main-navigation a.active:hover {
  color: var(--text-primary);
  background: var(--bg-surface-raised);
  border: 0;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.global-search {
  position: relative;
  width: 210px;
  height: 34px;
  color: var(--text-muted);
}

.global-search > .control-icon {
  position: absolute;
  top: 9px;
  left: 10px;
  pointer-events: none;
}

.global-search input,
.bookings-search input {
  width: 100%;
  height: 100%;
  color: var(--text-primary);
  background: var(--bg-control);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.global-search input {
  padding: 0 34px 0 34px;
  appearance: textfield;
}

.global-search input::-webkit-inner-spin-button,
.global-search input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.global-search input::placeholder,
.bookings-search input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.global-search input:hover,
.bookings-search input:hover {
  border-color: var(--border-strong);
}

.global-search input:focus,
.bookings-search input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: transparent;
  background: var(--bg-surface-raised);
  box-shadow: none;
}

.search-shortcut {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  color: var(--text-muted);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-family: inherit;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.data-freshness-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: none;
  font-size: 11px;
  font-weight: 560;
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: currentColor;
  border-radius: 999px;
}

.data-freshness-pill.data-fresh {
  color: var(--success);
  background: transparent;
  border-color: var(--border-subtle);
}

.data-freshness-pill.data-outdated {
  color: var(--warning);
  background: transparent;
  border-color: var(--border-subtle);
}

.data-freshness-pill.data-old {
  color: var(--danger);
  background: transparent;
  border-color: var(--border-subtle);
}

.data-freshness-pill.data-unavailable {
  color: var(--text-muted);
  background: transparent;
  border-color: var(--border-subtle);
}

.freshness-age {
  color: var(--text-muted);
  font-weight: 450;
}

.user-menu {
  position: relative;
}

.user-menu summary {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  list-style: none;
  transition: color 150ms ease, background-color 150ms ease;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu summary:hover,
.user-menu[open] summary {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.menu-chevron {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.user-menu[open] .menu-chevron {
  transform: rotate(180deg);
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 190px;
  gap: 10px;
  padding: 12px;
  color: var(--text-secondary);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
  font-size: 12px;
}

.user-menu-panel a,
.user-menu-panel a:visited {
  color: var(--accent-strong);
}

/* Existing pages retain their current content surface until migrated. */
.app-main {
  width: min(100% - 48px, 1480px);
  margin-right: auto;
  margin-left: auto;
}

.app-main.legacy-surface {
  margin-top: var(--space-6);
  margin-bottom: var(--space-8);
  color: #2e3a44;
}

.legacy-surface :where(h1, h2, h3, h4) {
  color: #1e2a32;
}

/* Ticket Bookings */
.app-main.bookings-workspace {
  min-height: 0;
  margin: 0 auto;
  padding: 30px 0 56px;
  color: var(--text-primary);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.bookings-content {
  width: 100%;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.page-header h1 {
  max-width: 720px;
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: clamp(24px, 2.2vw, 28px);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.page-header p {
  max-width: 70ch;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.bookings-search {
  position: relative;
  display: block;
  width: min(280px, 100%);
  height: 36px;
  color: var(--text-muted);
}

.bookings-search > .control-icon {
  position: absolute;
  top: 10px;
  left: 11px;
  z-index: 1;
  pointer-events: none;
}

.bookings-search input {
  padding: 0 12px 0 35px;
}

.booking-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 var(--space-5);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.booking-summary > div {
  display: grid;
  gap: 5px;
  padding: 15px 18px;
}

.booking-summary > div + div {
  border-left: 1px solid var(--border-subtle);
}

.booking-summary dt {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 540;
}

.booking-summary dd {
  margin: 0;
  color: var(--text-primary);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.booking-summary .summary-danger {
  color: var(--danger);
}

.booking-summary .summary-warning {
  color: var(--warning);
}

.bookings-toolbar {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.filter-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  box-shadow: none;
  font-size: 12px;
  font-weight: 540;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.filter-button:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--border-subtle);
  box-shadow: none;
  transform: none;
}

.filter-button.active {
  color: var(--text-primary);
  background: var(--bg-surface-raised);
  border-color: var(--border-strong);
}

.filter-button span {
  min-width: 17px;
  padding: 1px 5px;
  color: var(--text-muted);
  background: var(--bg-app);
  border-radius: 999px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.result-count {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.mobile-sort-control {
  display: none;
}

.booking-table-surface {
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  animation: bookings-surface-in 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.table-scroll {
  overflow-x: auto;
}

.bookings-table {
  width: 100%;
  margin: 0;
  overflow: visible;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  border-radius: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.bookings-table th {
  height: 40px;
  padding: 0 14px;
  color: var(--text-muted);
  background: var(--bg-surface-raised);
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 10.5px;
  font-weight: 620;
  letter-spacing: 0.035em;
  text-align: left;
  text-transform: uppercase;
  cursor: default;
}

.bookings-table th:nth-child(1) {
  width: 96px;
}

.bookings-table th:nth-child(3),
.bookings-table th:nth-child(4) {
  width: 108px;
}

.bookings-table th:nth-child(5) {
  width: 210px;
}

.bookings-table th:nth-child(6) {
  width: 152px;
}

.bookings-table th:hover {
  background: var(--bg-surface-raised);
}

.sort-button {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.numeric .sort-button {
  justify-content: flex-end;
}

.sort-button:hover {
  color: var(--text-primary);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.sort-button svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
  opacity: 0.45;
}

.bookings-table th[aria-sort="ascending"] .sort-arrow-down,
.bookings-table th[aria-sort="descending"] .sort-arrow-up {
  display: none;
}

.bookings-table th[aria-sort="ascending"] .sort-button svg,
.bookings-table th[aria-sort="descending"] .sort-button svg {
  color: var(--accent);
  opacity: 1;
}

.bookings-table td {
  height: 52px;
  padding: 8px 14px;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12.5px;
  vertical-align: middle;
}

.bookings-table tbody tr {
  background: transparent;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.bookings-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.012);
}

.bookings-table tbody tr:hover,
.bookings-table tbody tr:nth-child(even):hover {
  background: var(--bg-hover);
  box-shadow: none;
  transform: none;
}

.bookings-table tbody tr:last-child td {
  border-bottom: 0;
}

.bookings-table .numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ticket-link,
.ticket-link:visited {
  color: var(--accent-strong);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.ticket-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ticket-title-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.ticket-title,
.ticket-title:visited {
  min-width: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-weight: 510;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-title:hover {
  color: var(--accent-strong);
  text-decoration: none;
}

.external-link,
.external-link:visited {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  margin: 0;
  color: var(--text-muted);
  opacity: 0;
  border-radius: 5px;
  transition: color 140ms ease, background-color 140ms ease, opacity 140ms ease;
}

.booking-row:hover .external-link,
.external-link:focus-visible {
  opacity: 1;
}

.external-link:hover {
  color: var(--text-primary);
  background: var(--bg-control);
}

.external-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.effort-cell {
  color: var(--text-primary) !important;
  font-weight: 610;
}

.usage-meter {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) 42px;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.usage-meter progress {
  width: 100%;
  height: 5px;
  overflow: hidden;
  appearance: none;
  background: var(--bg-app);
  border: 0;
  border-radius: 999px;
}

.usage-meter progress::-webkit-progress-bar {
  background: var(--bg-app);
  border-radius: 999px;
}

.usage-meter progress::-webkit-progress-value {
  background: var(--success);
  border-radius: 999px;
}

.usage-meter progress::-moz-progress-bar {
  background: var(--success);
  border-radius: 999px;
}

.status-near .usage-meter progress::-webkit-progress-value,
.status-missing .usage-meter progress::-webkit-progress-value {
  background: var(--warning);
}

.status-near .usage-meter progress::-moz-progress-bar,
.status-missing .usage-meter progress::-moz-progress-bar {
  background: var(--warning);
}

.status-over .usage-meter progress::-webkit-progress-value {
  background: var(--danger);
}

.status-over .usage-meter progress::-moz-progress-bar {
  background: var(--danger);
}

.muted-value {
  color: var(--text-muted);
}

.status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 7px;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 590;
  line-height: 1;
  white-space: nowrap;
}

.status-badge .status-dot {
  width: 5px;
  height: 5px;
}

.status-badge.status-healthy {
  color: var(--success);
  background: rgba(88, 204, 130, 0.08);
}

.status-badge.status-near,
.status-badge.status-missing {
  color: var(--warning);
  background: rgba(225, 183, 95, 0.08);
}

.status-badge.status-over {
  color: var(--danger);
  background: rgba(240, 119, 126, 0.08);
}

.mobile-ticket-meta {
  display: none;
}

.table-empty-filter,
.bookings-empty-state {
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-align: center;
}

.table-empty-filter {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border-subtle);
}

.table-empty-filter[hidden] {
  display: none;
}

.table-empty-filter strong {
  color: var(--text-primary);
  font-size: 13px;
}

.table-empty-filter span {
  color: var(--text-muted);
  font-size: 12px;
}

.bookings-empty-state {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  padding: var(--space-8);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.bookings-empty-state svg {
  width: 28px;
  height: 28px;
  margin-bottom: var(--space-4);
  fill: none;
  stroke: var(--text-muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;
}

.bookings-empty-state h2 {
  margin: 0 0 var(--space-2);
  color: var(--text-primary);
  font-size: 16px;
}

.bookings-empty-state p {
  max-width: 52ch;
  margin: 0;
  color: var(--text-muted);
  font-size: 12.5px;
}

[hidden] {
  display: none !important;
}

@keyframes bookings-surface-in {
  from {
    opacity: 0.88;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .app-header-inner {
    gap: 16px;
  }

  .app-context,
  .search-shortcut,
  .user-name {
    display: none;
  }

  .global-search {
    width: 172px;
  }

  .main-navigation a,
  .main-navigation a:visited {
    padding: 0 8px;
  }

  .bookings-table th:nth-child(5) {
    width: 178px;
  }
}

@media (max-width: 800px) {
  .app-header-inner {
    width: calc(100% - 32px);
    min-height: 0;
    padding: 9px 0 8px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .app-brand {
    grid-row: 1;
  }

  .header-tools {
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
  }

  .global-search {
    width: auto;
  }

  .main-navigation {
    grid-row: 3;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .main-navigation::-webkit-scrollbar {
    display: none;
  }

  .main-navigation ul {
    width: max-content;
  }

  .main-navigation .operations-link {
    margin-left: 4px;
    padding-left: 6px;
  }

  .app-main,
  .app-main.legacy-surface {
    width: calc(100% - 32px);
  }

  .app-main.bookings-workspace {
    padding-top: 22px;
  }

  .page-header {
    align-items: stretch;
  }

  .booking-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .booking-summary > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--border-subtle);
  }

  .booking-summary > div:nth-child(4) {
    border-top: 1px solid var(--border-subtle);
  }

  .bookings-toolbar {
    align-items: flex-start;
  }

  .filter-group {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .filter-group::-webkit-scrollbar {
    display: none;
  }

  .filter-button {
    flex: 0 0 auto;
  }

  .bookings-table th:nth-child(1) {
    width: 78px;
  }

  .bookings-table th:nth-child(3) {
    width: 76px;
  }

  .bookings-table th:nth-child(6) {
    width: 126px;
  }

  .bookings-table th,
  .bookings-table td {
    padding-right: 10px;
    padding-left: 10px;
  }

  .column-estimate,
  .column-usage {
    display: none;
  }

  .mobile-ticket-meta {
    display: block;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ticket-title-cell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 4px;
  }

  .mobile-ticket-meta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .freshness-age,
  .menu-chevron {
    display: none;
  }

  .data-freshness-pill,
  .user-menu summary {
    padding-right: 8px;
    padding-left: 8px;
  }

  .page-header {
    flex-direction: column;
    gap: var(--space-4);
  }

  .bookings-search {
    width: 100%;
  }

  .booking-summary > div {
    padding: 13px 14px;
  }

  .booking-summary dd {
    font-size: 18px;
  }

  .bookings-toolbar {
    display: block;
  }

  .filter-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-1);
    overflow: visible;
    padding-bottom: 0;
  }

  .filter-button {
    justify-content: space-between;
    border-color: var(--border-subtle);
  }

  .result-count {
    margin-top: var(--space-2);
  }

  .mobile-sort-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin: 0 0 var(--space-2);
    color: var(--text-muted);
    font-size: 11px;
  }

  .mobile-sort-control select {
    min-width: 0;
    height: 32px;
    padding: 0 28px 0 9px;
    color: var(--text-secondary);
    background-color: var(--bg-control);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    box-shadow: none;
    font-size: 11px;
  }

  .table-scroll {
    overflow: visible;
  }

  .bookings-table,
  .bookings-table tbody {
    display: block;
    width: 100%;
  }

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

  .bookings-table tbody tr {
    display: grid;
    min-height: 76px;
    grid-template-areas:
      "ticket title effort"
      "ticket title status";
    grid-template-columns: 58px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    align-items: start;
    padding: 11px 10px;
  }

  .bookings-table tbody tr + tr {
    border-top: 1px solid var(--border-subtle);
  }

  .bookings-table td {
    display: block;
    height: auto;
    padding: 0;
    border: 0;
    font-size: 11.5px;
  }

  .bookings-table td.column-estimate,
  .bookings-table td.column-usage {
    display: none;
  }

  .bookings-table td:nth-child(1) {
    grid-area: ticket;
    padding-top: 2px;
  }

  .bookings-table td:nth-child(2) {
    grid-area: title;
    min-width: 0;
  }

  .bookings-table td:nth-child(3) {
    grid-area: effort;
    padding-top: 2px;
  }

  .bookings-table td:nth-child(6) {
    grid-area: status;
    justify-self: end;
  }

  .ticket-title {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.35;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mobile-ticket-meta {
    margin-top: 2px;
  }

  .external-link {
    display: none;
  }

  .status-badge {
    max-width: none;
    min-height: 0;
    align-items: center;
    padding: 2px 0;
    background: transparent !important;
    border: 0;
    border-radius: 0;
    line-height: 1.25;
    white-space: nowrap;
  }

  .status-badge .status-dot {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .booking-table-surface {
    animation: none;
  }

  .skip-link,
  .main-navigation a,
  .global-search input,
  .bookings-search input,
  .filter-button,
  .booking-row,
  .external-link {
    transition-duration: 0.01ms;
  }
}
