@font-face {
  font-family: "Guidy";
  src: url("assets/Guidy-Regular.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "UNCAGE";
  src: url("assets/UNCAGE-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "UNCAGE";
  src: url("assets/UNCAGE-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #080808;
  --panel: #101010;
  --panel-raised: #151515;
  --panel-hover: #1a1a1a;
  --line: #292929;
  --line-strong: #3a3a3a;
  --text: #f4f4f2;
  --muted: #8d8d88;
  --soft: #b9b9b4;
  --accent: #ff453a;
  --accent-soft: rgba(255, 69, 58, 0.12);
  --radius: 14px;
  --sidebar-width: 236px;
  font-family: "Guidy", Arial, sans-serif;
  font-synthesis: none;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f0eb;
  --panel: rgba(255, 255, 255, 0.76);
  --panel-raised: rgba(255, 255, 255, 0.94);
  --panel-hover: rgba(25, 23, 20, 0.055);
  --line: rgba(24, 22, 19, 0.13);
  --line-strong: rgba(24, 22, 19, 0.23);
  --text: #181715;
  --muted: #77736d;
  --soft: #4e4b46;
  --accent-soft: rgba(210, 48, 39, 0.1);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 65% -10%, rgba(255, 255, 255, 0.055), transparent 28%),
    var(--bg);
  color: var(--text);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 72% -8%, rgba(255, 181, 112, 0.22), transparent 30%),
    linear-gradient(180deg, #faf9f6 0%, var(--bg) 46%, #ebe8e1 100%);
}

body.is-splashing {
  overflow: hidden;
}

body.auth-locked {
  overflow: hidden;
}

body.auth-locked .app-shell {
  pointer-events: none;
  user-select: none;
  filter: blur(8px);
  opacity: 0.28;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  place-items: center;
  padding: 20px;
  overflow: auto;
  background: rgba(3, 3, 3, 0.88);
  backdrop-filter: blur(18px);
}

.auth-gate.is-visible {
  display: grid;
}

.auth-card {
  width: min(100%, 460px);
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(28, 28, 28, 0.98), rgba(10, 10, 10, 0.98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 151, 64, 0.06) inset;
}

.auth-brand {
  width: 132px;
  height: 116px;
  margin: -8px 0 20px;
}

.auth-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-card h1 {
  margin: 4px 0 8px;
  font-family: "UNCAGE", "Guidy", sans-serif;
  font-size: clamp(27px, 6vw, 38px);
  font-weight: 400;
}

.auth-copy,
.auth-local-note {
  color: var(--muted);
  line-height: 1.45;
}

.auth-local-note {
  margin: 18px 0 0;
  font-size: 12px;
}

.auth-form {
  display: grid;
  gap: 13px;
  margin-top: 22px;
}

.auth-form label,
.access-create-form label,
.access-user-card label {
  display: grid;
  gap: 6px;
}

.auth-form label > span,
.access-create-form label > span,
.access-user-card label > span {
  color: var(--muted);
  font-size: 11px;
}

.auth-form input,
.auth-form select,
.access-create-form input,
.access-create-form select,
.access-user-card input,
.access-user-card select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
}

.auth-message {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 69, 58, 0.42);
  border-radius: 9px;
  background: rgba(255, 69, 58, 0.1);
  color: #ff8c85;
}

.session-control {
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-raised);
}

.session-user,
.session-logout {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--text);
}

.session-user {
  display: flex;
  align-items: center;
  padding: 5px 11px;
  text-align: left;
  cursor: pointer;
}

.session-user:hover,
.session-user:focus-visible {
  background: rgba(230, 119, 41, 0.11);
  outline: none;
}

.session-user-copy {
  display: grid;
  align-content: center;
}

.session-user-copy strong {
  max-width: 130px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-user-copy small {
  color: var(--muted);
  font-size: 9px;
}

.session-user-icon {
  display: none;
  width: 22px;
  height: 22px;
}

.session-user-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.session-logout {
  padding: 0 10px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.session-logout:hover {
  background: var(--accent-soft);
  color: var(--text);
}

html[data-theme="light"] .auth-gate {
  background: rgba(231, 226, 217, 0.86);
}

html[data-theme="light"] .auth-card {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 90px rgba(70, 54, 37, 0.2);
}

html[data-theme="light"] .auth-brand {
  background: transparent;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.035), transparent 32%),
    #020202;
  animation: splash-exit 3s cubic-bezier(0.55, 0, 0.25, 1) forwards;
}

body:not(.is-splashing) .splash-screen { display: none; }

.splash-logo {
  position: relative;
  width: min(46.6667vw, 333.3333px);
  isolation: isolate;
  animation: splash-logo-in 280ms ease-out both;
}

.splash-logo img {
  display: block;
  width: 100%;
}

.splash-logo-base {
  position: relative;
  z-index: 1;
  filter: brightness(0.68) saturate(0.7);
  animation: splash-logo-warm 2.2s ease-out both;
}

.splash-bulb-glow {
  position: absolute;
  z-index: 0;
  top: 58%;
  width: 35%;
  height: 35%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 107, 0.5) 0%, rgba(235, 106, 42, 0.2) 32%, transparent 72%);
  filter: blur(16px);
  opacity: 0;
  pointer-events: none;
}

.splash-bulb-glow--left { left: 25%; animation: splash-bulb-ignite 2s ease-out 0.32s both; }
.splash-bulb-glow--right { left: 46%; animation: splash-bulb-ignite 1.7s ease-out 0.9s both; }

.splash-bulb-lit {
  position: absolute;
  inset: 0;
  z-index: 2;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  filter: brightness(2.2) saturate(1.8);
  pointer-events: none;
}

.splash-bulb-lit--left { clip-path: ellipse(8% 16% at 40% 75%); animation: splash-bulb-ignite 2s ease-out 0.32s both; }
.splash-bulb-lit--right { clip-path: ellipse(8% 16% at 63% 75%); animation: splash-bulb-ignite 1.7s ease-out 0.9s both; }

@keyframes splash-logo-in {
  from { opacity: 0; transform: scale(0.965); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes splash-logo-warm {
  0%, 24% { filter: brightness(0.68) saturate(0.7); }
  75%, 100% { filter: brightness(1) saturate(1); }
}

@keyframes splash-bulb-ignite {
  0%, 8% { opacity: 0; }
  13% { opacity: 0.85; }
  20% { opacity: 0.12; }
  29% { opacity: 0.95; }
  34% { opacity: 0.4; }
  48%, 100% { opacity: 1; }
}

@keyframes splash-exit {
  0%, 84% { opacity: 1; visibility: visible; }
  99% { opacity: 0; visibility: visible; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100dvh;
}

body.is-splashing .app-shell { animation: app-arrive 360ms ease-out 2.68s both; }

.mobile-bottom-nav,
.mobile-booking-bar,
.mobile-more-panel { display: none; }

@keyframes app-arrive {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 11px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(16px);
}

.brand {
  display: block;
  width: 72px;
  height: 62px;
  flex: 0 0 auto;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.main-nav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: visible;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.nav-item {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover {
  border-color: rgba(92, 104, 120, 0.82);
  background: rgba(92, 104, 120, 0.32);
  color: #f0f4f8;
  box-shadow: 0 0 0 2px rgba(92, 104, 120, 0.1), 0 8px 24px rgba(27, 40, 55, 0.22);
}

.nav-item.is-active {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel-raised);
}

.nav-item.is-active:hover {
  border-color: #5c6878;
  background: rgba(92, 104, 120, 0.38);
  color: #f0f4f8;
}

.sidebar-footer {
  display: none;
  gap: 5px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
}

.sidebar-footer strong {
  color: var(--text);
  font-size: 14px;
}

.role-label {
  color: var(--soft);
}

.main-content {
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 42px 60px;
}

.topbar {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.topbar-branding {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.topbar-logo {
  width: 108px;
  height: 54px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  object-fit: cover;
  object-position: center;
}

.topbar h1 {
  margin: 4px 0 0;
  font-family: "UNCAGE", "Guidy", Arial, sans-serif;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.section-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-toggle {
  min-width: 94px;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(15, 15, 15, 0.48);
  color: var(--soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 28px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  transition: 180ms ease;
}

.header-theme-toggle {
  flex: 0 0 auto;
  margin-left: auto;
  margin-right: max(18px, calc((100vw - 1540px) / 2 + 18px));
}

.theme-toggle:hover {
  border-color: rgba(255, 159, 82, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 3px rgba(255, 132, 42, 0.07),
    0 12px 30px rgba(0, 0, 0, 0.23);
  transform: translateY(-1px);
}

.theme-toggle-icon {
  width: 13px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1;
}

.theme-toggle-track {
  width: 37px;
  height: 21px;
  display: block;
  flex: 0 0 auto;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
}

.theme-toggle-thumb {
  width: 15px;
  height: 15px;
  display: block;
  border-radius: 50%;
  background: linear-gradient(145deg, #aaa9a5, #686864);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.42);
  transition: transform 210ms cubic-bezier(0.2, 0.75, 0.2, 1), background 180ms ease;
}

html[data-theme="light"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.76);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.34)),
    rgba(218, 213, 202, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 10px 28px rgba(69, 58, 43, 0.13);
}

html[data-theme="light"] .theme-toggle-track {
  background: rgba(255, 143, 54, 0.22);
}

html[data-theme="light"] .theme-toggle-thumb {
  background: linear-gradient(145deg, #ffb36e, #e97821);
  box-shadow: 0 2px 8px rgba(163, 72, 10, 0.32);
  transform: translateX(16px);
}

.primary-button,
.secondary-button {
  min-height: 43px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.primary-button {
  background: var(--text);
  color: #090909;
  font-weight: 700;
}

.primary-button:hover {
  background: #dcdcd8;
}

.primary-button.booking-cta {
  border-color: rgba(146, 190, 213, 0.7);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 66%),
    #3e6378;
  color: #f7fbff;
  box-shadow:
    0 14px 34px rgba(34, 72, 94, 0.32),
    0 0 0 1px rgba(146, 190, 213, 0.1),
    inset 0 1px 0 rgba(245, 252, 255, 0.3),
    inset 0 -1px 0 rgba(15, 43, 60, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-shadow: 0 1px 1px rgba(12, 37, 52, 0.35);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.primary-button.booking-cta:hover {
  border-color: rgba(177, 211, 228, 0.95);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent 66%),
    #4a7690;
  color: #ffffff;
  box-shadow:
    0 18px 40px rgba(34, 72, 94, 0.4),
    0 0 0 3px rgba(146, 190, 213, 0.12),
    inset 0 1px 0 rgba(245, 252, 255, 0.38),
    inset 0 -1px 0 rgba(15, 43, 60, 0.24);
  transform: translateY(-2px);
}

.secondary-button {
  border-color: var(--line-strong);
  background: var(--panel);
  color: var(--text);
}

.primary-button:active,
.secondary-button:active,
.counter-button:active {
  transform: translateY(1px) scale(0.98);
}

.full-width {
  width: 100%;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--soft);
}

.text-button:hover {
  color: var(--text);
}

.route-panel {
  display: none;
  padding-top: 28px;
}

.route-panel.is-active {
  display: block;
  animation: panel-in 180ms ease both;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  min-height: 124px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--panel-raised), var(--panel));
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  line-height: 1;
}

.metric.is-alert strong {
  color: var(--accent);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 14px;
  margin-top: 14px;
}

.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.surface-heading {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.surface-heading h2,
.catalog-page-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.surface-heading p,
.catalog-page-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stack-list {
  padding: 7px;
}

.stack-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(120px, 0.9fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.stack-row:hover {
  background: var(--panel-hover);
}

.stack-row strong,
.stack-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack-row span {
  color: var(--muted);
  font-size: 13px;
}

.status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--soft);
  font-size: 11px;
}

.status.is-danger {
  border-color: rgba(255, 69, 58, 0.45);
  background: var(--accent-soft);
  color: #ff746b;
}

.status.is-returned {
  border-color: rgba(79, 156, 255, 0.58);
  background: rgba(42, 117, 214, 0.22);
  color: #8dc4ff;
  box-shadow: 0 0 18px rgba(45, 125, 230, 0.1);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.booking-summary {
  position: sticky;
  top: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

label {
  display: grid;
  gap: 7px;
}

label > span {
  color: var(--soft);
  font-size: 12px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #0c0c0c;
  color: var(--text);
}

input::placeholder {
  color: #686864;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 240px);
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.booking-filters {
  display: grid;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.category-tabs {
  display: flex;
  gap: 7px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.category-tab {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #0c0c0c;
  color: var(--muted);
  white-space: nowrap;
  transition: 140ms ease;
}

.category-tab:hover {
  border-color: var(--soft);
  background: var(--panel-hover);
  color: var(--text);
}

.category-tab.is-active {
  border-color: var(--text);
  background: var(--text);
  color: #090909;
  font-weight: 700;
}

.category-tab.is-active:hover {
  border-color: var(--text);
  background: var(--text);
  color: #090909;
}

.catalog-tabs {
  margin: 0 0 18px;
}

.catalog-toolbar.compact {
  width: min(100%, 540px);
  padding: 0;
  border: 0;
}

.booking-filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.booking-name-filter,
.booking-date-filter {
  display: grid;
  gap: 5px;
}

.booking-name-filter span,
.booking-date-filter span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.booking-name-filter input,
.booking-date-filter input,
.booking-filter-controls select {
  min-height: 43px;
}

.booking-name-filter input {
  width: min(220px, 100%);
}

.booking-filter-controls > select {
  width: min(220px, 100%);
}

.booking-date-clear:disabled {
  cursor: default;
  opacity: 0.42;
}

.equipment-picker {
  max-height: calc(100dvh - 350px);
  min-height: 330px;
  overflow: auto;
  padding: 8px;
}

.picker-row,
.catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 130px;
  align-items: center;
  gap: 14px;
  padding: 13px 12px;
  border-radius: 10px;
}

.picker-row:hover,
.catalog-row:hover {
  background: var(--panel-hover);
}

.item-name {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.item-name strong {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-name span,
.availability {
  color: var(--muted);
  font-size: 12px;
}

.availability {
  text-align: right;
}

.availability strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.counter {
  display: grid;
  grid-template-columns: 36px 42px 36px;
  align-items: center;
  justify-content: end;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  overflow: hidden;
}

.counter-button {
  height: 36px;
  border: 0;
  background: #1b1b1b;
  color: var(--text);
  font-size: 19px;
}

.counter-value {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.picker-row.limit-hit {
  animation: limit-flash 440ms ease;
}

.picker-row.limit-hit .counter,
.picker-row.limit-hit .availability strong {
  border-color: var(--accent);
  color: var(--accent);
}

@keyframes limit-flash {
  0%, 100% { background: transparent; transform: translateX(0); }
  20% { background: var(--accent-soft); transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { background: var(--accent-soft); transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.limit-message {
  grid-column: 1 / -1;
  margin-top: -7px;
  color: var(--accent);
  font-size: 12px;
}

.summary-list {
  max-height: 430px;
  overflow: auto;
  padding: 8px;
}

.summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 11px 10px;
  border-radius: 9px;
}

.summary-item:hover {
  background: var(--panel-hover);
}

.summary-item strong {
  font-weight: 500;
}

.summary-item span {
  color: var(--muted);
}

.summary-item-details {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.summary-item-details strong {
  overflow-wrap: anywhere;
}

.summary-item-details span {
  font-size: 11px;
}

.summary-item-side {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 3px;
}

.summary-item-side strong {
  white-space: nowrap;
  font-size: 14px;
}

.summary-counter {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel-raised);
}

.summary-counter button {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 19px;
  cursor: pointer;
}

.summary-counter button:hover {
  background: var(--panel-hover);
}

.summary-counter span {
  color: var(--text);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.summary-item-side .text-button {
  min-height: 28px;
  padding: 0 2px;
  font-size: 11px;
}

.summary-footer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.summary-footer div {
  display: grid;
  gap: 5px;
}

.summary-footer span {
  color: var(--muted);
  font-size: 11px;
}

.summary-footer strong {
  font-size: 20px;
}

.summary-footer .summary-total {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.summary-footer .summary-total span {
  font-size: 12px;
}

.summary-footer .summary-total strong {
  flex: none;
  font-size: 21px;
}

.summary-footer .full-width {
  grid-column: 1 / -1;
}

.catalog-page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.client-filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.client-period-filter {
  min-width: 152px;
}

.client-search-filter {
  min-width: min(230px, 100%);
}

.client-duplicate-warning {
  padding: 10px 12px;
  border: 1px solid rgba(255, 157, 76, 0.45);
  border-radius: 10px;
  background: rgba(255, 144, 43, 0.12);
  color: var(--text);
  font-size: 12px;
}

.client-duplicate-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.client-duplicate-confirm input {
  width: auto;
}

.client-duplicate-warning[hidden],
.client-duplicate-confirm[hidden] {
  display: none;
}

.client-period-filter select {
  min-height: 43px;
}

.equipment-catalog {
  display: grid;
  gap: 18px;
}

.category-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.category-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.category-title span {
  color: var(--muted);
  font-size: 12px;
}

.catalog-row {
  grid-template-columns: minmax(0, 1fr) repeat(3, 90px);
}

.catalog-row + .catalog-row {
  border-top: 1px solid #1d1d1d;
}

.catalog-stat {
  display: grid;
  gap: 3px;
  text-align: right;
}

.catalog-stat span {
  color: var(--muted);
  font-size: 10px;
}

.catalog-stat strong {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.holder-grid,
.bookings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#bookings-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timeline-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(500px, 610px);
  align-items: start;
  gap: 14px;
}

.calendar-card {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  overflow: hidden;
  border-color: rgba(206, 193, 202, 0.3);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.08)),
    #493f45;
  color: #f5f0f3;
  box-shadow: 0 18px 60px rgba(39, 32, 37, 0.26);
  backdrop-filter: blur(16px);
}

.calendar-toolbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.calendar-toolbar > div {
  display: flex;
  gap: 7px;
}

.calendar-toolbar h3 {
  margin: 0;
  color: #f5f0f3;
  font-size: 19px;
  font-weight: 500;
  text-align: center;
}

.calendar-toolbar .secondary-button {
  justify-self: end;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.16);
  color: #f5f0f3;
}

.calendar-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  color: #f5f0f3;
  font-size: 18px;
}

.calendar-arrow:hover {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.32);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.calendar-weekdays {
  padding: 16px 16px 4px;
}

.calendar-weekdays span {
  color: #d8cbd4;
  font-size: 11px;
  text-align: center;
  text-transform: uppercase;
}

.calendar-grid {
  padding: 8px 16px 16px;
}

.calendar-empty,
.calendar-day {
  min-height: 0;
  aspect-ratio: 1;
}

.calendar-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5f0f3;
  transition: 140ms ease;
}

.calendar-day:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.17);
  transform: translateY(-1px);
}

.calendar-day > span {
  font-size: 18px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.calendar-day > i {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 4px;
  min-height: 5px;
}

.calendar-day > i em {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #eac0a7;
}

.calendar-day.is-today {
  border-color: rgba(255, 255, 255, 0.72);
}

.calendar-day.is-selected {
  border-color: #d7becd;
  background: #c4aebb;
  color: #241d22;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 8px 22px rgba(25, 21, 24, 0.22);
}

.calendar-day.is-selected > i em {
  background: #493f45;
}

.equipment-disclosure {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
}

.equipment-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding: 0 13px;
  color: var(--soft);
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  transition: background-color 140ms ease, color 140ms ease;
}

.equipment-disclosure summary::-webkit-details-marker {
  display: none;
}

.equipment-disclosure summary::after {
  content: "+";
  width: 20px;
  height: 20px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}

.equipment-disclosure summary:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.equipment-disclosure summary b {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.equipment-disclosure[open] summary::after {
  content: "−";
}

.equipment-disclosure-list {
  display: grid;
  gap: 0;
  padding: 0 13px 10px;
  border-top: 1px solid var(--line);
}

.equipment-disclosure-list > div {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  color: var(--soft);
  font-size: 12px;
}

.equipment-disclosure-list > div + div {
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.equipment-disclosure-list strong {
  flex: 0 0 auto;
  color: var(--text);
  font-weight: 500;
}

.equipment-disclosure-empty {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.calendar-details {
  grid-column: 1;
  grid-row: 1;
  overflow: hidden;
}

.calendar-details .timeline-row {
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
}

.calendar-details .timeline-units {
  display: none;
}

.calendar-details .timeline-row > .status {
  grid-column: 2;
  justify-self: start;
}

.calendar-details .timeline-equipment {
  grid-column: 1 / -1;
}

.timeline-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 90px auto;
  align-items: center;
  gap: 18px;
  min-height: 86px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.timeline-equipment {
  grid-column: 2 / -1;
  width: 100%;
  margin-top: 0;
}

.timeline-date,
.timeline-units {
  display: grid;
  gap: 4px;
}

.timeline-date span,
.timeline-units span,
.timeline-main p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.booking-date-list {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.timeline-main h3 {
  margin: 0 0 5px;
  font-size: 17px;
  font-weight: 500;
}

.timeline-units strong {
  font-size: 20px;
  font-weight: 500;
}

.directory-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.directory-form {
  position: sticky;
  top: 104px;
}

.directory-fields {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.directory-column {
  min-width: 0;
}

.directory-form[hidden] + .directory-column {
  grid-column: 1 / -1;
}

.directory-grid {
  display: grid;
  gap: 8px;
}

.directory-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 84px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.client-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.client-finance,
.client-shoots {
  grid-column: 1 / -1;
}

.client-shoots {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  font-size: 12px;
}

.client-shoots summary {
  cursor: pointer;
}

.client-shoots ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.client-shoots li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.client-shoots li span {
  color: var(--muted);
}

.project-directory-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.project-equipment {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0;
}

.directory-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
}

.directory-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.directory-number {
  display: grid;
  flex: 0 0 auto;
  gap: 3px;
  text-align: right;
}

.directory-number strong {
  font-size: 22px;
  font-weight: 500;
}

.directory-number span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.estimate-total {
  color: var(--text);
  font-size: 22px;
  font-weight: 500;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-card:first-child {
  grid-column: 1 / -1;
}

.report-card.report-wide {
  grid-column: 1 / -1;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 18px;
}

.report-business-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-business-metrics strong {
  font-size: clamp(18px, 2vw, 27px);
  overflow-wrap: anywhere;
}

.report-crew-list {
  display: grid;
  gap: 4px;
  padding: 14px 18px 18px;
}

.report-crew-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 14px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}

.report-crew-row > span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-crew-row b {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
}

.report-crew-row small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.report-metrics div {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 10px;
  background: var(--panel-raised);
}

.report-metrics strong {
  font-size: 32px;
  font-weight: 500;
}

.report-metrics span,
.ranking-list span {
  color: var(--muted);
  font-size: 12px;
}

.ranking-list {
  padding: 8px;
}

.ranking-list > div:not(.empty-state) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border-radius: 9px;
}

.ranking-list > div:not(.empty-state):hover {
  background: var(--panel-hover);
}

.ranking-list span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ranking-list b {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--soft);
  font-weight: 500;
}

.ranking-list strong {
  flex: 0 0 auto;
  font-weight: 500;
}

.holder-card,
.booking-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.booking-card {
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.booking-card.is-returned {
  border-color: rgba(116, 163, 188, 0.68);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.1)),
    #22485e;
  color: #f7fbff;
  box-shadow:
    0 0 0 1px rgba(116, 163, 188, 0.1),
    0 16px 36px rgba(16, 54, 75, 0.18);
}

.booking-card.is-returned .card-actions {
  border-top-color: rgba(224, 241, 250, 0.2);
}

.booking-card.is-returned .card-topline p,
.booking-card.is-returned .card-stats span {
  color: #cbdce5;
}

.booking-card.is-returned .status.is-returned {
  border-color: rgba(204, 230, 244, 0.55);
  background: rgba(232, 247, 255, 0.12);
  color: #e7f6ff;
}

.card-main {
  padding: 18px;
}

.card-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.card-topline h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.card-topline p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.estimate-card {
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.estimate-mobile-preview {
  display: none;
}

.draft-status {
  min-height: 1.2em;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.notifications-surface {
  margin: 18px 0;
}

.notifications-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 10px;
  padding: 14px;
}

.notification-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-raised);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.notification-item:hover {
  border-color: rgba(255, 153, 79, 0.68);
}

.notification-item span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.notification-item strong {
  overflow-wrap: anywhere;
}

.notification-item small {
  color: var(--muted);
}

.notification-item.is-overdue {
  border-color: rgba(224, 76, 70, 0.55);
}

.notification-item.is-return {
  border-color: rgba(255, 153, 79, 0.55);
}

.estimate-card.is-paid {
  border-color: #258b5b;
  background: linear-gradient(135deg, rgba(22, 82, 55, 0.28), rgba(18, 44, 33, 0.18));
  box-shadow: 0 0 0 1px rgba(48, 190, 124, 0.12), 0 0 28px rgba(29, 149, 91, 0.13);
}

.estimate-heading-total {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.estimate-detail-dialog {
  width: min(700px, calc(100vw - 32px));
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

.estimate-detail-client {
  color: var(--muted);
  font-size: 13px;
}

.estimate-detail-body {
  max-height: calc(100dvh - 140px);
}

.estimate-detail-total {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel-raised);
}

.estimate-detail-total > span,
.estimate-detail-facts dt {
  color: var(--muted);
  font-size: 11px;
}

.estimate-detail-total > strong {
  font-size: clamp(27px, 5vw, 38px);
  font-weight: 500;
}

.estimate-detail-statuses {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
}

.estimate-detail-statuses .estimate-sent-status {
  text-align: left;
}

.estimate-detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.estimate-detail-facts > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}

.estimate-detail-facts dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.estimate-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.estimate-detail-actions button {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.estimate-detail-actions button:hover {
  border-color: var(--soft);
}

.estimate-detail-actions .document-link {
  grid-column: 1 / -1;
  border-color: #f0f0ed;
  background: #f0f0ed;
  color: #090909;
  font-weight: 700;
}

.estimate-detail-actions .estimate-edit-button {
  border-color: rgba(255, 155, 74, 0.55);
}

.estimate-detail-actions .payment-button {
  border-color: rgba(70, 191, 132, 0.55);
}

.estimate-detail-actions .payment-button.is-active {
  background: #17613f;
  color: #d7ffeb;
}

html[data-theme="light"] .estimate-detail-actions .document-link {
  border-color: #25231f;
  background: #25231f;
  color: #fff;
}

.payment-status {
  padding: 5px 9px;
  border: 1px solid rgba(66, 202, 137, 0.34);
  border-radius: 999px;
  background: rgba(28, 139, 86, 0.22);
  color: #72dca8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.payment-status.needs-reconciliation {
  border-color: rgba(255, 155, 74, 0.48);
  background: rgba(255, 132, 42, 0.17);
  color: #ffb375;
}

.estimate-versions {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
}

.estimate-versions summary {
  cursor: pointer;
  color: var(--text);
}

.estimate-versions ol {
  margin: 12px 0 0;
  padding-left: 20px;
}

.estimate-versions li + li {
  margin-top: 10px;
}

.estimate-versions p {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.estimate-versions small {
  display: block;
  margin-top: 5px;
  color: #72dca8;
}

html[data-theme="light"] .estimate-versions small {
  color: #17613f;
}

.estimate-versions button {
  display: block;
  margin-top: 6px;
  padding: 2px 0;
}

.estimate-sent-status {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.estimate-reason {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.estimate-reason span {
  color: var(--muted);
  font-size: 12px;
}

.estimate-edited-status {
  padding: 5px 9px;
  border: 1px solid rgba(255, 155, 74, 0.42);
  border-radius: 999px;
  background: rgba(255, 132, 42, 0.15);
  color: #ffb375;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.estimate-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}

.estimate-context > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.estimate-context span {
  color: var(--muted);
  font-size: 10px;
}

.estimate-context strong {
  overflow: visible;
  font-size: 14px;
  font-weight: 500;
  text-overflow: clip;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
}

.card-stats div {
  display: grid;
  gap: 5px;
}

.card-stats span {
  color: var(--muted);
  font-size: 10px;
}

.card-stats strong {
  font-size: 14px;
  font-weight: 500;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

.card-actions.is-compact {
  justify-content: flex-end;
  padding-block: 10px;
}

.card-actions button.open-booking-button {
  min-width: 112px;
  border-color: rgba(255, 152, 70, 0.42);
  color: var(--text);
}

.card-actions button.open-booking-button:hover {
  border-color: rgba(255, 152, 70, 0.82);
  background: rgba(255, 132, 42, 0.12);
}

.card-actions button.return-equipment-button {
  border-color: rgba(68, 150, 255, 0.5);
  background: rgba(31, 104, 202, 0.13);
  color: #91c4ff;
}

.card-actions button.return-equipment-button:hover {
  border-color: rgba(83, 161, 255, 0.88);
  background: rgba(31, 104, 202, 0.24);
  color: #d7ebff;
}

.card-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #171717;
  color: var(--soft);
}

.card-actions button:hover {
  color: var(--text);
  border-color: #555;
}

.card-actions button.danger-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.card-actions button.document-link {
  border-color: #f0f0ed;
  background: #f0f0ed;
  color: #090909;
  font-weight: 700;
}

.card-actions button.document-link:hover {
  border-color: #fff;
  background: #fff;
  color: #090909;
}

.card-actions button.payment-button {
  border-color: rgba(70, 191, 132, 0.55);
  color: #76d9a9;
}

.card-actions button.estimate-edit-button {
  border-color: rgba(255, 155, 74, 0.44);
  color: #ffb375;
}

.card-actions button.estimate-edit-button:hover {
  border-color: rgba(255, 171, 104, 0.76);
  background: rgba(255, 132, 42, 0.13);
  color: #ffd2ad;
}

.card-actions button.booking-add-button {
  border-color: rgba(74, 158, 255, 0.52);
  color: #93c5ff;
}

.card-actions button.booking-add-button:hover {
  border-color: rgba(94, 173, 255, 0.9);
  background: rgba(38, 119, 224, 0.16);
  color: #d8ebff;
}

.card-actions button.payment-button:hover,
.card-actions button.payment-button.is-active {
  border-color: #39a976;
  background: #17613f;
  color: #d7ffeb;
}

.card-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(380px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #ededeb;
  color: #090909;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  border-color: var(--accent);
  background: #2a1010;
  color: #ff8b84;
}

.booking-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}

.booking-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.profile-dialog {
  width: min(600px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 32px));
  overflow: hidden;
}

.profile-header,
.profile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
}

.profile-header {
  border-bottom: 1px solid var(--line);
  background: var(--panel-raised);
}

.profile-header .section-kicker {
  margin: 0 0 5px;
}

.profile-header h2 {
  margin: 0;
  font-size: clamp(23px, 4vw, 32px);
  font-weight: 500;
  line-height: 1.12;
}

.profile-role {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.profile-close {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 27px;
  cursor: pointer;
}

.profile-close:hover {
  background: var(--panel-hover);
}

.profile-body {
  max-height: calc(100dvh - 230px);
  overflow-y: auto;
  padding: 24px 26px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-stat {
  display: grid;
  align-content: space-between;
  gap: 14px;
  min-height: 106px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-raised);
}

.profile-stat strong {
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.profile-stat span {
  color: var(--muted);
  font-size: 12px;
}

.profile-next-section,
.profile-history-section {
  margin-top: 28px;
}

.profile-body h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 500;
}

.profile-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-history-heading h3 {
  margin: 0;
}

.profile-history-heading select {
  width: auto;
  min-height: 38px;
  padding: 6px 32px 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background-color: var(--panel-raised);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.profile-next,
.profile-history {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-raised);
}

.profile-next {
  display: grid;
  gap: 5px;
  padding: 18px;
}

.profile-next time {
  font-size: 17px;
}

.profile-next span,
.profile-next p,
.profile-history-row span,
.profile-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-history-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1fr);
  gap: 12px;
  padding: 14px 18px;
}

.profile-history-row + .profile-history-row {
  border-top: 1px solid var(--line);
}

.profile-empty {
  padding: 18px;
}

.profile-footer {
  justify-content: flex-end;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}

.dialog-body {
  padding: 22px;
}

.dialog-body h2 {
  margin: 0 0 6px;
}

.dialog-body > p {
  margin: 0 0 20px;
  color: var(--muted);
}

.dialog-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.booking-dialog form {
  padding: 14px 22px 22px;
}

.booking-detail-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

.booking-detail-dialog form {
  display: block;
  padding: 0;
}

.booking-detail-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(16px);
}

.booking-detail-header > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.booking-detail-header h2 {
  flex-basis: 100%;
  margin: 1px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
}

.booking-detail-kicker {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.booking-detail-close {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel-raised);
  color: var(--soft);
  font-size: 24px;
  line-height: 1;
}

.booking-detail-close:hover {
  border-color: var(--accent);
  color: var(--text);
}

.booking-detail-body {
  display: grid;
  gap: 16px;
  max-height: calc(100dvh - 210px);
  padding: 18px 22px 24px;
  overflow: auto;
}

.booking-detail-notice {
  padding: 12px 14px;
  border: 1px solid rgba(62, 139, 238, 0.38);
  border-radius: 10px;
  background: rgba(28, 93, 179, 0.13);
  color: var(--soft);
}

.booking-detail-section {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-raised);
}

.booking-detail-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.booking-detail-section-heading h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
}

.booking-detail-section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.booking-detail-section-heading > strong {
  flex: 0 0 auto;
  color: var(--soft);
  font-size: 13px;
  font-weight: 500;
}

.booking-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.booking-detail-fields label,
.booking-detail-date-pair label {
  display: grid;
  gap: 6px;
}

.booking-detail-fields label > span,
.booking-detail-date-pair label > span {
  color: var(--muted);
  font-size: 11px;
}

.booking-detail-fields input,
.booking-detail-fields select,
.booking-detail-toolbar input,
.booking-detail-toolbar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
}

.booking-detail-fields input:focus,
.booking-detail-fields select:focus,
.booking-detail-toolbar input:focus,
.booking-detail-toolbar select:focus {
  border-color: rgba(255, 152, 70, 0.78);
  outline: 2px solid rgba(255, 132, 42, 0.12);
}

.booking-detail-fields :disabled {
  cursor: default;
  opacity: 0.68;
}

.booking-detail-date-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.booking-detail-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 10px;
  margin-bottom: 12px;
}

.booking-detail-equipment-list,
.booking-detail-readonly-list {
  display: grid;
  max-height: min(43vh, 420px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.booking-detail-readonly-list > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
}

.booking-detail-readonly-list > div:last-child {
  border-bottom: 0;
}

.booking-detail-readonly-list strong {
  flex: 0 0 auto;
  font-weight: 500;
}

.booking-detail-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(16px);
}

.booking-detail-status-actions,
.booking-detail-save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.danger-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(225, 75, 69, 0.42);
  border-radius: 9px;
  background: transparent;
  color: #f08a86;
}

.danger-button:hover {
  border-color: rgba(225, 75, 69, 0.8);
  background: rgba(225, 75, 69, 0.1);
  color: #ffaaa6;
}

.estimate-edit-dialog {
  width: min(920px, calc(100vw - 32px));
}

.estimate-edit-dialog form {
  padding: 0;
}

.estimate-edit-lines {
  display: grid;
  gap: 9px;
}

.estimate-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 140px;
  align-items: end;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-raised);
}

.estimate-edit-name,
.estimate-edit-line-total {
  display: grid;
  gap: 5px;
}

.estimate-edit-name strong {
  font-size: 14px;
  font-weight: 500;
}

.estimate-edit-name span,
.estimate-edit-line-total span {
  color: var(--muted);
  font-size: 11px;
}

.estimate-edit-line-total {
  align-self: center;
  justify-items: end;
}

.estimate-edit-line-total strong {
  font-size: 15px;
  font-weight: 500;
}

.estimate-edit-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.estimate-edit-summary span {
  color: var(--muted);
}

.estimate-edit-summary strong {
  font-size: 24px;
}

.estimate-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px 22px;
  border-top: 1px solid var(--line);
}

.booking-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 118px;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}

.booking-add-row:last-child {
  border-bottom: 0;
}

.booking-add-row.is-unavailable {
  opacity: 0.48;
}

.booking-add-row.limit-hit {
  animation: limit-flash 440ms ease;
}

.booking-add-row.limit-hit .counter,
.booking-add-row.limit-hit .booking-add-availability strong {
  border-color: var(--accent);
  color: var(--accent);
}

.booking-add-row .limit-message {
  grid-column: 1 / -1;
  margin: -7px 0 0;
}

.booking-add-name {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.booking-add-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-add-name span,
.booking-add-availability {
  color: var(--muted);
  font-size: 12px;
}

.booking-add-availability {
  text-align: right;
}

.booking-add-availability strong {
  color: var(--text);
  font-size: 15px;
}

.booking-add-row .counter-button:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

.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;
}

html[data-theme="light"] .sidebar {
  background: rgba(248, 247, 243, 0.88);
  box-shadow: 0 10px 34px rgba(58, 49, 38, 0.06);
}

html[data-theme="light"] .brand {
  background: transparent;
}

html[data-theme="light"] .nav-item:hover,
html[data-theme="light"] .nav-item.is-active:hover {
  border-color: #5c6878;
  background: rgba(92, 104, 120, 0.18);
  color: #273240;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] .category-tab {
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] input::placeholder {
  color: #9a968f;
}

html[data-theme="light"] .primary-button:not(.booking-cta) {
  color: #ffffff;
}

html[data-theme="light"] .primary-button:not(.booking-cta):hover {
  background: #34312d;
}

html[data-theme="light"] .category-tab.is-active,
html[data-theme="light"] .category-tab.is-active:hover {
  border-color: rgba(213, 58, 49, 0.48);
  background: rgba(232, 69, 58, 0.12);
  color: #9f302a;
  box-shadow:
    0 0 0 2px rgba(232, 69, 58, 0.045),
    0 8px 22px rgba(171, 48, 39, 0.08);
}

html[data-theme="light"] .category-tab.is-active:hover {
  border-color: rgba(213, 58, 49, 0.62);
  background: rgba(232, 69, 58, 0.17);
}

html[data-theme="light"] .counter-button,
html[data-theme="light"] .card-actions button {
  background: rgba(235, 232, 225, 0.9);
}

html[data-theme="light"] .calendar-card {
  border-color: rgba(50, 41, 47, 0.5);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.08)),
    #493f45;
  color: #f5f0f3;
  box-shadow:
    0 22px 58px rgba(39, 32, 37, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

html[data-theme="light"] .calendar-toolbar {
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

html[data-theme="light"] .calendar-toolbar h3,
html[data-theme="light"] .calendar-weekdays span {
  color: #f5f0f3;
}

html[data-theme="light"] .calendar-toolbar .secondary-button,
html[data-theme="light"] .calendar-arrow {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.16);
  color: #f5f0f3;
}

html[data-theme="light"] .calendar-toolbar .secondary-button:hover,
html[data-theme="light"] .calendar-arrow:hover {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.32);
}

html[data-theme="light"] .calendar-day {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f5f0f3;
}

html[data-theme="light"] .calendar-day:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.17);
}

html[data-theme="light"] .calendar-day > i em {
  background: #eac0a7;
}

html[data-theme="light"] .calendar-day.is-today {
  border-color: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .calendar-day.is-selected {
  border-color: #d7becd;
  background: #c4aebb;
  color: #241d22;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    0 8px 20px rgba(25, 21, 24, 0.22);
}

html[data-theme="light"] .calendar-day.is-selected > i em {
  background: #493f45;
}

html[data-theme="light"] .equipment-disclosure,
html[data-theme="light"] .estimate-context {
  background: rgba(24, 22, 19, 0.035);
}

html[data-theme="light"] .equipment-disclosure summary:hover {
  background: rgba(24, 22, 19, 0.045);
}

html[data-theme="light"] .estimate-card.is-paid {
  background: linear-gradient(135deg, rgba(63, 173, 116, 0.13), rgba(255, 255, 255, 0.68));
}

html[data-theme="light"] .booking-card.is-returned {
  border-color: rgba(116, 163, 188, 0.68);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.1)),
    #22485e;
  color: #f7fbff;
  box-shadow:
    0 0 0 1px rgba(116, 163, 188, 0.1),
    0 16px 36px rgba(16, 54, 75, 0.18);
}

html[data-theme="light"] .status.is-returned {
  border-color: rgba(38, 112, 209, 0.48);
  background: rgba(54, 128, 224, 0.14);
  color: #175aaa;
}

html[data-theme="light"] .booking-card.is-returned .status.is-returned {
  border-color: rgba(204, 230, 244, 0.55);
  background: rgba(232, 247, 255, 0.12);
  color: #e7f6ff;
}

html[data-theme="light"] .card-actions button.document-link,
html[data-theme="light"] .card-actions button.document-link:hover {
  border-color: #25231f;
  background: #25231f;
  color: #ffffff;
}

html[data-theme="light"] .card-actions button.payment-button.is-active,
html[data-theme="light"] .card-actions button.payment-button:hover {
  color: #ffffff;
}

html[data-theme="light"] .card-actions button.return-equipment-button {
  border-color: rgba(38, 112, 209, 0.48);
  background: rgba(54, 128, 224, 0.1);
  color: #175aaa;
}

html[data-theme="light"] .card-actions button.return-equipment-button:hover {
  border-color: rgba(38, 112, 209, 0.76);
  background: rgba(54, 128, 224, 0.18);
  color: #0f4584;
}

html[data-theme="light"] .booking-dialog::backdrop {
  background: rgba(46, 42, 37, 0.46);
}

@media (max-width: 1100px) {
  #bookings-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid,
  .booking-layout {
    grid-template-columns: 1fr;
  }

  .booking-summary {
    position: static;
  }

  .equipment-picker {
    max-height: 560px;
  }
}

@media (max-width: 960px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .calendar-card {
    grid-column: 1;
    grid-row: 1;
    width: min(100%, 610px);
    justify-self: end;
  }

  .calendar-details {
    grid-column: 1;
    grid-row: 2;
  }
}

@media (max-width: 780px) {
  .mobile-bottom-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: 8px;
    align-items: end;
    min-height: 72px;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(20px);
  }

  .mobile-bottom-nav button {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 54px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
  }

  .mobile-bottom-nav button.is-active {
    color: var(--text);
    border-color: rgba(255, 145, 48, .45);
    background: rgba(255, 145, 48, .13);
  }

  .mobile-bottom-nav button > span { font-size: 26px; line-height: 1; }
  .mobile-bottom-nav button[data-mobile-route="dashboard"] > span { transform: scale(1.28); }
  .mobile-bottom-nav button > small { font-size: 11px; line-height: 1.2; }
  .mobile-bottom-nav button[hidden] { display: none; }
  .mobile-bottom-nav .mobile-new-booking,
  .mobile-bottom-nav .mobile-new-booking.is-active {
    color: #fff;
    background: linear-gradient(145deg, #567f95, #3e6378);
    box-shadow: 0 5px 22px rgba(34, 72, 94, .38);
  }
  .mobile-bottom-nav .mobile-new-booking > span { font-size: 31px; }

  .mobile-booking-bar.is-active {
    position: fixed;
    inset: auto 8px calc(78px + env(safe-area-inset-bottom));
    z-index: 34;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 54px;
    padding: 6px 8px 6px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: #151515;
    box-shadow: 0 -4px 22px rgba(0, 0, 0, .22);
  }

  html[data-theme="light"] .mobile-booking-bar.is-active {
    background: #fff;
  }

  body.auth-locked .mobile-booking-bar {
    display: none;
  }

  .mobile-booking-amount {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .mobile-booking-amount small {
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
  }

  .mobile-booking-amount strong {
    font-size: clamp(16px, 5vw, 19px);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .mobile-booking-bar .primary-button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 13px;
  }

  .booking-summary .summary-footer .full-width,
  .booking-summary .summary-footer .summary-total {
    display: none;
  }

  .mobile-more-panel:not([hidden]) {
    position: fixed;
    right: 8px;
    bottom: calc(79px + env(safe-area-inset-bottom));
    z-index: 36;
    display: grid;
    gap: 4px;
    width: min(280px, calc(100vw - 16px));
    max-height: 65dvh;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: #101010;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .35);
  }
  html[data-theme="light"] .mobile-more-panel:not([hidden]) {
    background: #fff;
  }
  .mobile-more-panel button {
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    text-align: left;
  }
  .mobile-more-panel button:hover { border-color: rgba(255, 145, 48, .5); }
  body.auth-locked .mobile-bottom-nav,
  body.auth-locked .mobile-more-panel { display: none; }

  #bookings-list {
    grid-template-columns: 1fr;
  }

  .estimate-card > .card-main,
  .estimate-card > .card-actions {
    display: none;
  }

  .estimate-mobile-preview {
    display: grid;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
  }

  .estimate-mobile-preview:focus-visible {
    outline: 2px solid rgba(255, 155, 74, 0.8);
    outline-offset: -3px;
  }

  .estimate-preview-top,
  .estimate-preview-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
  }

  .estimate-preview-identity {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .estimate-preview-identity strong {
    overflow-wrap: anywhere;
    font-size: 17px;
    font-weight: 500;
  }

  .estimate-preview-identity small,
  .estimate-preview-date {
    color: var(--muted);
    font-size: 12px;
  }

  .estimate-preview-arrow {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 27px;
    line-height: 1;
  }

  .estimate-preview-bottom strong {
    flex: 0 0 auto;
    font-size: 19px;
    font-weight: 500;
    white-space: nowrap;
  }

  .estimate-preview-date {
    overflow-wrap: anywhere;
  }

  .estimate-preview-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .estimate-detail-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .estimate-detail-header {
    padding: 16px;
  }

  .estimate-detail-body {
    max-height: calc(100dvh - 105px);
    padding: 14px 15px 20px;
  }

  .booking-detail-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .booking-detail-header,
  .booking-detail-footer {
    padding-inline: 15px;
  }

  .booking-detail-body {
    max-height: calc(100dvh - 190px);
    padding: 14px 15px 20px;
  }

  .booking-detail-fields,
  .booking-detail-toolbar {
    grid-template-columns: 1fr;
  }

  .booking-detail-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .booking-detail-status-actions,
  .booking-detail-save-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-detail-save-actions .primary-button {
    width: auto;
  }

  .app-shell {
    display: block;
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  body[data-route="booking"] .app-shell {
    padding-bottom: calc(142px + env(safe-area-inset-bottom));
  }

  .sidebar {
    position: sticky;
    inset: 0 0 auto;
    width: 100%;
    min-height: 72px;
    padding: 8px 10px;
    gap: 8px;
    border-bottom: 1px solid var(--line);
  }

  .header-theme-toggle {
    margin-right: 4px;
  }

  .sidebar-footer {
    display: none;
  }

  .brand {
    display: block;
    width: 65px;
    height: 54px;
    padding: 2px;
    background: transparent;
  }

  .main-nav {
    display: none;
  }

  .nav-item {
    min-height: 38px;
    padding: 0 10px;
    overflow: visible;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
  }

  .nav-item::after {
    content: none;
  }

  .main-content {
    padding: 0 14px 28px;
  }

  .booking-cta { display: none !important; }

  .topbar {
    min-height: 84px;
  }

  .topbar-branding {
    gap: 10px;
  }

  .topbar-logo {
    width: 70px;
    height: 42px;
  }

  .section-kicker {
    display: none;
  }

  .topbar h1 {
    margin-top: 0;
    font-size: 24px;
  }

  .topbar .primary-button {
    min-height: 39px;
    padding: 0 13px;
  }

  .theme-toggle {
    min-height: 39px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    min-height: 105px;
  }

  .dashboard-grid,
  .holder-grid,
  .bookings-grid,
  .reports-grid,
  .directory-layout {
    grid-template-columns: 1fr;
  }

  .report-card:first-child {
    grid-column: auto;
  }

  .directory-form {
    position: static;
  }

  .timeline-row {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .calendar-empty,
  .calendar-day {
    min-height: 0;
  }

  .calendar-toolbar {
    grid-template-columns: auto 1fr auto;
  }

  .calendar-toolbar h3 {
    font-size: 16px;
  }

  .timeline-units {
    display: none;
  }

  .form-grid,
  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .booking-filters {
    padding-inline: 14px;
  }

  .booking-filter-controls {
    width: 100%;
    justify-content: stretch;
  }

  .booking-name-filter,
  .booking-name-filter input,
  .booking-date-filter,
  .booking-date-filter input,
  .booking-filter-controls select,
  .booking-date-clear {
    width: 100%;
  }

  .client-filter-controls,
  .client-period-filter,
  .client-period-filter select {
    width: 100%;
  }

  .client-filter-controls {
    justify-content: stretch;
  }

  .catalog-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .estimate-edit-row {
    grid-template-columns: minmax(0, 1fr) 150px;
  }

  .booking-add-row {
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 8px;
  }

  .booking-add-availability {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
  }

  .booking-add-row .counter {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .estimate-edit-name {
    grid-column: 1 / -1;
  }

  .picker-row {
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 8px;
  }

  .picker-row .availability {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
  }

  .picker-row .counter {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .catalog-row {
    grid-template-columns: minmax(0, 1fr) repeat(2, 58px);
  }

  .catalog-row .catalog-stat:nth-of-type(3) {
    display: none;
  }

  .stack-row {
    grid-template-columns: 1fr auto;
  }

  .stack-row span:nth-child(2) {
    display: none;
  }
}

@media (max-width: 480px) {
  .booking-detail-header h2 {
    font-size: 23px;
  }

  .booking-detail-section {
    padding: 13px;
  }

  .booking-detail-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .booking-detail-date-pair,
  .booking-detail-status-actions,
  .booking-detail-save-actions {
    grid-template-columns: 1fr;
  }

  .booking-detail-equipment-list,
  .booking-detail-readonly-list {
    max-height: 38vh;
  }

  .booking-detail-footer button {
    width: 100%;
  }

  .splash-logo {
    width: min(26vw, 130px);
  }

  .sidebar {
    min-height: 66px;
    padding: 6px 8px;
  }

  .header-theme-toggle {
    margin-right: 2px;
  }

  .brand {
    width: 62px;
    height: 52px;
    flex-basis: 62px;
    border-radius: 9px;
  }

  .main-content {
    padding-inline: 10px;
  }

  .topbar h1 {
    font-size: 21px;
  }

  .topbar {
    gap: 10px;
  }

  .topbar .primary-button {
    padding-inline: 10px;
    font-size: 12px;
  }

  .theme-toggle {
    min-width: 48px;
    width: 48px;
    padding-inline: 5px;
  }

  .theme-toggle-icon {
    display: none;
  }

  .report-metrics {
    grid-template-columns: 1fr;
  }

  .estimate-context {
    grid-template-columns: 1fr;
  }

  .estimate-heading-total {
    justify-items: start;
  }

  .estimate-card .card-topline {
    align-items: start;
    flex-direction: column;
  }

  .estimate-detail-actions {
    grid-template-columns: 1fr;
  }

  .estimate-edit-row {
    grid-template-columns: 1fr;
  }

  .estimate-edit-name,
  .estimate-edit-line-total {
    grid-column: 1;
  }

  .estimate-edit-line-total {
    justify-items: start;
  }

  .estimate-edit-summary,
  .estimate-edit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .timeline-row .status {
    grid-column: 2;
  }

  .timeline-equipment {
    grid-column: 1 / -1;
  }

  .calendar-toolbar {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .calendar-toolbar > div {
    grid-column: 1;
  }

  .calendar-toolbar h3 {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .calendar-toolbar .secondary-button {
    grid-column: 2;
    grid-row: 1;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 4px;
    padding-inline: 8px;
  }

  .calendar-empty,
  .calendar-day {
    min-height: 0;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0;
    padding: 8px 7px;
  }

  .calendar-day > span {
    font-size: 15px;
    line-height: 1;
  }

  .calendar-day > i {
    right: 7px;
    bottom: 7px;
  }

  .equipment-disclosure summary {
    min-height: 44px;
  }
}

.access-management {
  margin-top: 18px;
  padding-bottom: 18px;
}

.catalog-management {
  margin-bottom: 18px;
}

.catalog-management-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(520px, 1.5fr);
  gap: 14px;
  padding: 18px 20px 20px;
}

.catalog-category-form,
.catalog-create-form {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-raised);
}

.catalog-category-form h3,
.catalog-create-form h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.catalog-category-form p,
.catalog-create-form p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.catalog-category-form label,
.catalog-create-form label,
.catalog-edit-fields label {
  display: grid;
  gap: 6px;
}

.catalog-category-form label > span,
.catalog-create-form label > span,
.catalog-edit-fields label > span {
  color: var(--muted);
  font-size: 11px;
}

.catalog-category-form input,
.catalog-create-form input,
.catalog-create-form select,
.catalog-edit-fields input,
.catalog-edit-fields select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
}

.catalog-create-form {
  grid-template-columns: minmax(210px, 1.5fr) minmax(170px, 1fr) 120px 150px auto;
  align-items: end;
}

.catalog-create-heading {
  grid-column: 1 / -1;
}

.catalog-create-form .primary-button,
.catalog-category-form .secondary-button {
  min-height: 44px;
}

.catalog-row.is-owner-view {
  grid-template-columns: minmax(250px, 1fr) repeat(3, 74px) 130px 132px;
}

.catalog-row.is-simple {
  grid-template-columns: minmax(0, 1fr) 120px;
}

.catalog-price strong {
  white-space: nowrap;
}

.catalog-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid #c93f3b;
  border-radius: 9px;
  background: #b6322f;
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.catalog-edit-button:hover {
  border-color: #e05a53;
  background: #c93f3b;
  color: #fff;
}

.catalog-edit-dialog {
  width: min(680px, calc(100vw - 32px));
}

.catalog-edit-dialog form {
  padding: 0;
}

.catalog-edit-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.catalog-edit-note {
  padding: 10px 12px;
  border: 1px solid rgba(255, 151, 64, 0.28);
  border-radius: 9px;
  background: rgba(255, 132, 42, 0.07);
}

.access-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 0.7fr) minmax(170px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.access-create-form .primary-button {
  min-height: 46px;
}

.access-list {
  display: grid;
  gap: 10px;
  padding: 18px 20px 0;
}

.access-user-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.55fr) minmax(300px, 1.2fr);
  gap: 14px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-raised);
}

.access-user-identity {
  display: grid;
  align-self: center;
  gap: 4px;
}

.access-user-identity span {
  color: var(--muted);
  font-size: 11px;
}

.access-pin-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.access-pin-form .secondary-button {
  min-height: 46px;
}

.booking-history-list {
  display: grid;
}

.booking-history-entry {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  padding: 0 0 16px;
}

.booking-history-entry:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: -2px;
  left: 5px;
  width: 1px;
  background: var(--line-strong);
}

.booking-history-entry:last-child {
  padding-bottom: 0;
}

.booking-history-dot {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 4px;
  border: 2px solid rgba(255, 151, 64, 0.9);
  border-radius: 50%;
  background: var(--panel-raised);
  box-shadow: 0 0 0 3px rgba(255, 132, 42, 0.1);
}

.booking-history-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.booking-history-heading strong {
  font-size: 13px;
  font-weight: 500;
}

.booking-history-heading time,
.booking-history-entry p,
.booking-history-empty {
  color: var(--muted);
  font-size: 11px;
}

.booking-history-entry p {
  margin: 4px 0 0;
  line-height: 1.45;
}

.booking-history-empty {
  padding: 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  text-align: center;
}

.history-page-header {
  align-items: end;
}

.history-filter-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.history-filter-controls label {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.history-filter-controls label:first-child {
  min-width: min(320px, 32vw);
}

.history-filter-controls span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-filter-controls input,
.history-filter-controls select {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: var(--panel-raised);
  font: inherit;
}

.history-filter-controls input:focus,
.history-filter-controls select:focus {
  border-color: rgba(255, 139, 47, 0.75);
  outline: 3px solid rgba(255, 139, 47, 0.12);
}

.audit-surface {
  overflow: hidden;
  padding: 0;
}

.audit-list {
  display: grid;
}

.audit-entry {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.audit-entry:last-child {
  border-bottom: 0;
}

.audit-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 139, 47, 0.38);
  border-radius: 13px;
  color: #ff9c4f;
  background: rgba(255, 139, 47, 0.1);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.audit-entry-main {
  min-width: 0;
}

.audit-entry-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.audit-entry-heading strong {
  font-size: 14px;
  font-weight: 600;
}

.audit-type {
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.audit-entry p {
  margin: 0;
}

.audit-subject {
  margin-top: 6px !important;
  color: var(--text);
  font-size: 13px;
}

.audit-details,
.audit-actor,
.audit-entry time {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.audit-details {
  margin-top: 3px !important;
}

.audit-actor {
  margin-top: 7px !important;
}

.audit-entry time {
  padding-top: 2px;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .access-create-form,
  .access-user-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .access-pin-form {
    grid-column: 1 / -1;
  }

  .catalog-management-grid,
  .catalog-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-category-form {
    grid-column: 1 / -1;
  }

  .catalog-create-heading,
  .catalog-create-form .primary-button {
    grid-column: 1 / -1;
  }

  .catalog-row.is-owner-view {
    grid-template-columns: minmax(180px, 1fr) repeat(2, 74px) 125px 110px;
  }

  .catalog-row.is-owner-view .catalog-stat:nth-of-type(3) {
    display: none;
  }
}

@media (max-width: 780px) {
  .session-user-copy,
  .session-logout {
    display: none;
  }

  .session-control {
    border: 0;
    background: transparent;
  }

  .session-user {
    width: 44px;
    height: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
  }

  .session-user-icon {
    display: block;
  }

  .access-create-form,
  .access-user-card,
  .access-pin-form {
    grid-template-columns: 1fr;
  }

  .access-pin-form {
    grid-column: auto;
  }

  .catalog-management-grid,
  .catalog-create-form,
  .catalog-edit-fields {
    grid-template-columns: 1fr;
  }

  .catalog-category-form {
    grid-column: auto;
  }

  .catalog-row.is-owner-view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .catalog-row.is-owner-view .item-name,
  .catalog-row.is-owner-view .catalog-edit-button {
    grid-column: 1 / -1;
  }

  .catalog-row.is-owner-view .catalog-edit-button {
    width: 100%;
    max-width: none;
    min-height: 42px;
    margin-top: 3px;
    padding: 0 14px;
    justify-self: stretch;
    font-size: 13px;
  }

  .catalog-row.is-owner-view .catalog-stat {
    display: grid;
    text-align: left;
  }

  .catalog-row.is-simple {
    grid-template-columns: minmax(0, 1fr) 82px;
  }

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

  .history-filter-controls {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .history-filter-controls label,
  .history-filter-controls label:first-child {
    min-width: 0;
  }

  .audit-entry {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    padding: 16px;
  }

  .audit-avatar {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .audit-entry time {
    grid-column: 2;
    grid-row: 2;
    margin-top: -7px;
  }
}

@media (max-width: 480px) {
  .profile-header,
  .profile-footer {
    padding-inline: 18px;
  }

  .profile-body {
    padding: 20px 18px;
  }

  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-history-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .profile-history-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-toggle,
  .theme-toggle:hover,
  html[data-theme="light"] .theme-toggle,
  html[data-theme="light"] .theme-toggle:hover {
    min-width: 44px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: none;
  }

  .theme-toggle-track {
    width: 40px;
    height: 24px;
    padding: 3px;
    border: 0;
    background: #252525;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.38);
  }

  html[data-theme="light"] .theme-toggle-track {
    background: rgba(232, 120, 32, 0.25);
  }

  .theme-toggle-thumb {
    width: 18px;
    height: 18px;
  }

  .theme-toggle:focus-visible {
    outline: 2px solid #e97821;
    outline-offset: 1px;
  }

  .auth-gate {
    padding: 10px;
  }

  .auth-card {
    padding: 22px 18px;
    border-radius: 17px;
  }

  .auth-brand {
    width: 112px;
    height: 98px;
  }

  .booking-history-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

@media (max-width: 360px) {
  .mobile-bottom-nav { column-gap: 4px; }
  .mobile-bottom-nav button > small { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body:not([data-storage="online"]) .online-only { display: none; }
