@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/manrope-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/manrope-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/manrope-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/manrope-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/manrope-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/manrope-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #202028;
  --text: #282d3c;
  --muted: #8b8da5;
  --line: #e2e4ea;
  --paper: #fff;
  --canvas: #f6f6f9;
  --field: #f4f6fb;
  --blue: #007bfc;
  --blue-press: #006bdb;
  --blue-soft: #daecff;
  --danger: #ff2f13;
  --ok: #2ca94c;
  --ok-soft: #e1f7e6;
  --shadow: 0 0 1px #0000000a, 0 2px 6px #0000000a, 0 16px 24px #00000014;
  --font: Manrope, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: -0.16px;
}
button, input, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }

.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(880px 420px at 50% -8%, rgba(0, 123, 252, 0.2), transparent 68%),
    #eef3f9;
}
.gate-inner {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 28px;
  padding: 36px 32px 32px;
  box-shadow: 0 0 0 1px rgba(0, 123, 252, 0.08), 0 18px 48px rgba(32, 40, 64, 0.1);
}
.gate-mark {
  width: 44px;
  height: 4px;
  margin-bottom: 18px;
  border-radius: 4px;
  background: var(--blue);
}
.gate h1 {
  font-size: 34px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.6px;
  color: var(--ink);
  margin-bottom: 24px;
}
.stack { display: grid; gap: 12px; }
.field, .select {
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 8px;
  background: var(--field);
  padding: 0 24px;
  font-weight: 500;
  color: var(--text);
}
.field:focus, .select:focus { outline: 2px solid var(--blue); }
textarea.field {
  height: auto;
  min-height: 96px;
  padding: 16px 24px;
  resize: vertical;
  font: inherit;
  font-weight: 500;
}
select.field { appearance: none; }
.field:disabled { color: var(--muted); }
.field.code {
  letter-spacing: 0.4em;
  font-size: 22px;
  text-align: center;
  padding-left: 24px;
}
.btn {
  height: 48px;
  border: 0;
  border-radius: 48px;
  padding: 0 24px;
  background: var(--blue);
  color: #fff;
  font-weight: 500;
  letter-spacing: -0.16px;
}
.btn:hover { background: var(--blue-press); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.block { width: 100%; margin-top: 4px; }
.btn.ghost {
  background: var(--field);
  color: var(--blue);
}
.btn.ghost:hover { background: var(--blue-soft); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #e0220c; }
.btn.icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.btn.icon .btn-icon,
.btn.icon svg { width: 18px; height: 18px; display: block; }
.btn.small { height: 40px; padding: 0 18px; font-size: 14px; }
.btn.outline {
  height: 56px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  white-space: nowrap;
}
.btn.outline:hover { background: var(--blue-soft); color: var(--blue-press); border-color: var(--blue-press); }
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
}
.link {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-weight: 500;
}
.link:disabled { opacity: 0.55; cursor: default; }
.note { color: var(--danger); font-size: 14px; line-height: 1.35; }
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px 14px 16px;
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow), 0 0 0 1px rgba(32, 32, 40, 0.06);
  border-left: 4px solid var(--danger);
  animation: toast-in 0.18s ease;
}
.toast.ok { border-left-color: var(--ok); }
.toast p { margin: 0; flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; font-weight: 500; }
.toast-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--field);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.toast-x:hover { background: var(--blue-soft); color: var(--blue-press); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.hint { color: var(--muted); font-size: 14px; line-height: 1.4; }
.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.choice button {
  height: 64px;
  border: 0;
  border-radius: 16px;
  background: var(--field);
  color: var(--ink);
  font-weight: 500;
}
.choice button.on { background: var(--blue); color: #fff; }
.choice small { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; opacity: 0.8; }

.shell { min-height: 100dvh; background: var(--canvas); }
.side {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  width: 248px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 16px 0;
  overflow: auto;
  background: #fff;
  box-shadow: var(--shadow);
}
.side-top { display: grid; gap: 28px; align-content: start; }
.side-nav { display: grid; gap: 8px; align-content: start; }
.side-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  background: transparent;
  color: var(--text);
  font-weight: 500;
  text-align: left;
}
.side-nav button.on { background: var(--blue); color: #fff; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.nav-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--blue);
}
.nav-icon svg { display: block; width: 20px; height: 20px; }
.side-nav button.on .nav-icon { color: #fff; }
.scrim {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 248px;
  z-index: 25;
  border: 0;
  background: rgba(32, 32, 40, 0.4);
}
.main {
  margin-left: 248px;
  min-width: 0;
  min-height: 100dvh;
  padding: 30px 32px 64px 30px;
}
.tabbar,
.more-scrim,
.more-sheet { display: none; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.4px;
  line-height: 1.25;
  color: var(--ink);
}
.brand img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 8px;
}
.who {
  margin-top: auto;
  margin-left: -16px;
  margin-right: -16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 32px 20px;
  border-top: 1px solid var(--line);
  background: var(--canvas);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.who span {
  min-width: 0;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.who .link { flex: 0 0 auto; }
.complex-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-top: 6px;
  padding-bottom: 10px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}
.complex-tabs:not(.view-tabs) {
  min-height: 52px;
}
.complex-tabs:not(.view-tabs) .tab {
  min-height: 44px;
  height: auto;
}
.panel > .complex-tabs {
  margin-right: -32px;
  padding-right: 32px;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 20px;
  padding: 0 16px;
  background: #fff;
  color: var(--text);
  font: inherit;
  white-space: nowrap;
  box-shadow: 0 0 1px #00000014;
  cursor: pointer;
  user-select: none;
  touch-action: pan-x pan-y;
  -webkit-touch-callout: none;
}
.tab.on { background: var(--blue); color: #fff; }
.tab.dragging { opacity: 0.72; cursor: grabbing; }
.tab-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: -4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}
.tab-edit svg { display: block; }
@media (hover: hover) and (pointer: fine) {
  .tab-edit { opacity: 0; }
  .tab:hover .tab-edit,
  .tab:focus-within .tab-edit { opacity: 1; }
}
@media (hover: none), (pointer: coarse) {
  .tab-edit { display: none; }
  .tab.on .tab-edit { display: inline-flex; }
}
.tab.on .tab-edit {
  display: inline-flex;
  opacity: 1;
  color: #fff;
}
.tab.on .tab-edit:hover,
.tab.on .tab-edit:focus-visible {
  background: #fff;
  color: var(--blue);
}
.page { width: 100%; max-width: none; min-width: 0; margin: 0; padding: 0; }
.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.page h1 {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.6px;
  line-height: 1.15;
  color: var(--ink);
}
.lead { color: var(--muted); max-width: 52ch; line-height: 1.45; }
.panel { display: grid; gap: 20px; align-content: start; min-width: 0; }
.panel h1, .panel .lead { margin: 0; }
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 12px; align-items: start; }
.toolbar.has-add { grid-template-columns: minmax(0, 1fr) 240px auto; }
.field.search {
  background: #fff;
  border: 1px solid var(--line);
  -webkit-appearance: none;
  appearance: none;
}
.field.search:focus { border-color: transparent; }
.field.search::-webkit-search-decoration,
.field.search::-webkit-search-cancel-button,
.field.search::-webkit-search-results-button,
.field.search::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.drop { position: relative; }
.drop-btn {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 24px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
}
.drop-btn:focus { outline: 2px solid var(--blue); }
.chev {
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  transition: transform 0.18s ease;
}
.drop.open .chev { transform: rotate(180deg); }
.drop-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 12;
  display: grid;
  gap: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transform-origin: top center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.drop.open .drop-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.drop-menu button {
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0 16px;
  color: var(--text);
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.drop-menu button:hover { background: var(--field); }
.drop-menu button.on { background: var(--blue-soft); color: var(--blue-press); }
.list { display: grid; gap: 12px; }
.card {
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px 24px;
  display: grid;
  gap: 12px;
  align-content: start;
}
.card.wide {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px 24px;
  align-items: center;
}
.card.out { box-shadow: 0 0 0 2px var(--blue-soft), var(--shadow); }
.card-main, .card-side { display: grid; gap: 8px; }
.card-status { justify-self: center; }
.card-side { justify-self: end; justify-items: end; align-content: center; }
.form-card h2 { font-size: 22px; font-weight: 500; letter-spacing: -0.3px; color: var(--ink); }
.flat-no { font-size: 22px; font-weight: 500; letter-spacing: -0.4px; color: var(--ink); }
.meta { color: var(--muted); font-size: 14px; }
.keyset { font-size: 16px; font-weight: 500; color: var(--text); }
.key-edit { justify-self: start; font-size: 14px; }
.holders { display: grid; gap: 8px; justify-items: end; }
.holder { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 0;
  border-radius: 48px;
  background: var(--blue-soft);
  color: var(--blue-press);
  padding: 8px 12px;
  font-weight: 500;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 48px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 14px;
  font-weight: 500;
  width: fit-content;
}
.pill.out, .pill.planned, .pill.preliminary, .pill.countdown { background: var(--blue-soft); color: var(--blue-press); }
.pill.out { max-width: 100%; flex-wrap: wrap; white-space: normal; }
.timer { white-space: normal; }
.pill.done, .pill.full { background: var(--ok-soft); color: var(--ok); }
.pill.cancelled { background: var(--field); color: var(--muted); }
.pill.occupied { background: #fff4d6; color: #7a5600; }
.pill.stay-free { background: var(--ok-soft); color: var(--ok); }
.pill.stay-occupied { background: #fff4d6; color: #7a5600; }
.pill.stay-repair { background: #fff1e6; color: #9a5416; }
.pill.stay-reserved { background: var(--blue-soft); color: var(--blue-press); }
.pill.expired { background: #fff1e6; color: #9a5416; }
.choice.kinds { grid-template-columns: 1fr 1fr; }
.choice.kinds button { min-height: 56px; font-size: 14px; line-height: 1.25; }
.picker { display: grid; gap: 8px; }
.picker-btn {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 18px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
}
.picker-btn:disabled { opacity: 0.55; }
.picker-btn span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker.open .chev { transform: rotate(180deg); }
.picker-menu {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.picker-list { display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.picker-list button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  padding: 8px 12px;
  text-align: left;
  font-weight: 500;
  color: var(--text);
}
.picker-list button:hover { background: var(--field); }
.picker-list button.on { background: var(--blue-soft); color: var(--blue-press); }
.photo-slots { display: grid; gap: 16px; }
.photo-slot { display: grid; gap: 8px; }
.slot-label { margin: 0; font-weight: 500; }
.slot-preview { max-height: 140px; }
.registry-list { display: grid; gap: 28px; }
.registry-complex { display: grid; gap: 12px; }
.registry-complex h2, .registry-complex h3 { margin: 0; font-weight: 500; letter-spacing: -0.3px; }
.registry-complex h2 { font-size: 22px; }
.registry-complex h3 { color: var(--muted); font-size: 16px; }
.stay-drop { width: min(100%, 220px); }
.card.status-open { position: relative; z-index: 4; }
.registry-history { display: grid; gap: 12px; }
.registry-day {
  display: grid;
  gap: 12px;
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.registry-day-main { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.registry-photos { display: grid; gap: 12px; }
.registry-shot { display: grid; gap: 8px; margin: 0; }
.registry-shot .btn { width: 100%; }
.registry-photo-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 16px;
  cursor: zoom-in;
}
.support-panel { display: grid; gap: 16px; }
.support-form, .support-card, .support-reply { display: grid; gap: 10px; }
.support-panel .field {
  background: #fff;
  border: 1px solid #d5d9e4;
}
.support-panel .field::placeholder { color: var(--muted); }
.support-panel .field:focus {
  border-color: var(--blue);
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.help-section { display: grid; gap: 12px; }
.help-section h2 { margin: 8px 0 0; font-size: 18px; }
.help-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.help-head strong { min-width: 0; }
.support-list { display: grid; gap: 12px; }
.support-card {
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.support-preview, .support-shot {
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: var(--field);
}
.support-preview {
  max-height: 280px;
  object-fit: contain;
  object-position: left center;
}
.support-reply {
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--field);
}

.registry-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: var(--field);
}
.registry-photo-card { width: min(920px, 100%); }
.registry-photo-card .modal-head { align-items: center; }
.registry-photo-full {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: var(--field);
}
a.registry-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: 36px;
  margin-left: auto;
  padding: 0 14px;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.registry-paste-card { width: min(420px, 100%); }
.registry-paste-preview {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 16px;
  background: var(--field);
}
.registry-paste-card .actions .btn { flex: 1 1 140px; }
.row.booking-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  width: 100%;
}
.booking-card.waiting-manager {
  background: #fff4df;
  box-shadow: inset 6px 0 0 #f5a524, 0 0 0 2px #f5a524, var(--shadow);
}
.booking-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 16px;
}
.booking-place { display: grid; gap: 4px; min-width: 0; flex: 1 1 220px; }
.booking-place strong,
.booking-client { overflow-wrap: anywhere; }
.booking-client { color: var(--text); }
.booking-status { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.booking-marks { display: flex; flex-wrap: wrap; gap: 8px; }
.mark {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.mark.bot { background: var(--blue-soft); color: var(--blue-press); }
.mark.wait { background: #f5a524; color: #3d2600; }
.mark.sb-sent { background: var(--blue-soft); color: var(--blue-press); }
.mark.sb-passed { background: #e5f6ea; color: #146c2e; }
.mark.sb-failed { background: #ffe8e4; color: var(--danger); }
.mark.contrada { background: #e7f3ff; color: #0b4f8a; }
.booking-people { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.booking-people .meta { margin-right: 6px; }
.booking-comment { margin: 0; }
.booking-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.booking-actions .btn { max-width: 100%; }
.owner-choices { display: grid; gap: 8px; }
.owner-choice {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  background: var(--field);
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  padding: 0 16px;
}
.owner-choice:hover { background: var(--blue-soft); color: var(--blue-press); }
.booking-main { display: grid; gap: 12px; min-width: 0; flex: 1; }
.bot-note { color: var(--blue-press); font-size: 14px; font-weight: 600; }
.contract {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.contract h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.2px; }
.contract-field { display: grid; gap: 6px; }
.contract-field > span:first-child { font-size: 13px; color: var(--muted); }
.contract-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.contract .field { min-height: 44px; }
.contract-entry { padding-top: 4px; }
.contract-line { margin: 0; line-height: 1.4; }
.booking-side { display: grid; justify-items: end; gap: 10px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions.split {
  flex-wrap: nowrap;
  gap: 12px;
  width: 100%;
}
.actions.split .btn {
  flex: 1 1 0;
  width: calc(50% - 6px);
  min-width: 0;
  height: 48px;
  border-radius: 48px;
  padding: 0 16px;
}
.actions.trio {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
}
.actions.trio .btn {
  width: calc((100% - 16px) / 3);
  flex: 0 0 calc((100% - 16px) / 3);
  min-width: 0;
  padding: 0 8px;
}
.due {
  display: grid;
  gap: 12px;
  background: #fff;
  border-radius: 24px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.due h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.3px; color: var(--ink); }
.due-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.due-row strong { display: block; font-weight: 500; color: var(--ink); }
.due-row .meta { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }
.history-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.9fr) minmax(168px, 200px) minmax(168px, 200px);
  gap: 12px;
  align-items: end;
}
.history-filters .picker.overlay { position: relative; }
.history-filters .picker-menu {
  position: absolute;
  z-index: 25;
  top: calc(100% + 8px);
  left: 0;
  width: max(100%, 280px);
}
.date-filter { display: grid; gap: 6px; min-width: 0; }
.date-filter > span { color: var(--muted); font-size: 13px; }
.cal { position: relative; }
.cal-field { position: relative; }
.cal-field .picker-btn { padding-right: 42px; }
.cal-field .picker-btn span.muted { color: var(--muted); font-weight: 400; }
.cal-chev {
  position: absolute;
  right: 18px;
  top: 50%;
  margin-top: -3px;
  pointer-events: none;
}
.cal-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}
.cal-clear:hover { background: var(--field); color: var(--text); }
.cal-pop {
  position: absolute;
  z-index: 25;
  top: calc(100% + 8px);
  left: 0;
  width: 292px;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.history-filters .date-filter:last-child .cal-pop { left: auto; right: 0; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-head strong { font-weight: 500; color: var(--ink); }
.cal-nav {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}
.cal-nav:hover { background: var(--blue-soft); }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-week span { color: var(--muted); font-size: 12px; text-align: center; }
.cal-grid button {
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-weight: 500;
}
.cal-grid button:hover { background: var(--field); }
.cal-grid button.today { box-shadow: inset 0 0 0 1px var(--blue); }
.cal-grid button.in-range { background: var(--blue-soft); }
.cal-grid button.on { background: var(--blue); color: #fff; box-shadow: none; }
.cal-reset { justify-self: start; height: 32px; }
.add-row, .inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.inline-form .field { width: auto; flex: 1 1 140px; }
.history, .people { display: grid; gap: 12px; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(32, 32, 40, 0);
  transition: background 0.22s ease;
}
.modal.open { background: rgba(32, 32, 40, 0.48); }
.modal-card {
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px 24px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  max-height: calc(100dvh - 48px);
  overflow: auto;
}
.modal.open .modal-card { opacity: 1; transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { font-size: 22px; font-weight: 500; letter-spacing: -0.3px; color: var(--ink); }
.modal-x {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: var(--field);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}
.modal-x:hover { background: var(--blue-soft); }
.row {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.row.booking-card { align-items: flex-start; }
.row strong { font-weight: 500; color: var(--ink); }
.person { display: grid; gap: 4px; }
.shot {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--field);
}
.modal-card.wide-photo {
  width: min(920px, 100%);
  max-height: calc(100dvh - 48px);
}
.history-photo {
  display: block;
  width: 100%;
  height: min(72vh, calc(100dvh - 220px));
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  background: var(--field);
}
.channels { display: grid; gap: 12px; max-width: 560px; }
.people-channels { display: grid; gap: 12px; margin-top: 28px; max-width: 640px; }
.people-channels h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.3px; }
.staff-channels { display: grid; gap: 8px; }
.staff-channel { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.staff-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.staff-actions .btn { height: 36px; padding: 0 14px; }
.bind-link { color: var(--blue); font-weight: 600; }
.channel {
  display: grid;
  gap: 12px;
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.channel-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 14px;
  background: #e4e6ee;
  padding: 0;
}
.switch .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}
.switch.on { background: var(--blue); }
.switch.on .knob { transform: translateX(20px); }
.shift-control { display: grid; gap: 8px; }
.shift-control .switch:disabled { opacity: 0.6; cursor: default; }
.shift-control .switch:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.shift-side { margin-top: auto; padding: 0 16px; }
.shift-side + .who { margin-top: 0; }
.shift-mobile { padding: 0 14px; }
.shift-settings { width: min(100%, 560px); }
.sheet {
  position: fixed;
  inset: 0;
  background: rgba(32, 32, 40, 0.48);
  display: grid;
  align-items: end;
  z-index: 20;
  padding: 0;
}
.sheet-card {
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 28px 24px calc(24px + env(safe-area-inset-bottom));
  display: grid;
  gap: 16px;
}
.sheet-card h2 { font-size: 28px; font-weight: 500; letter-spacing: -0.4px; color: var(--ink); }
.preview {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 16px;
  background: var(--field);
}
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-actions .btn { flex: 1 1 140px; }
.btn.file-pick {
  height: auto;
  min-height: 52px;
  padding: 12px 18px;
  border: 3px dashed #007bfc;
  border-radius: 16px;
  background: #e8f3ff;
  color: #16324f;
  font-weight: 500;
}
.btn.file-pick:hover,
.btn.file-pick.over {
  background: #d4e9ff;
  color: #16324f;
}
.empty {
  background: #fff;
  border-radius: 24px;
  padding: 28px;
  color: var(--muted);
  box-shadow: var(--shadow);
}
.notice-form, .template-list, .feed, .defect-form { display: grid; gap: 12px; }
.notice-form {
  background: #fff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.template-save { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.template-save .field { flex: 1 1 220px; }
.template-list h2, .checkin-card h2 { margin: 8px 0 0; font-size: 22px; font-weight: 500; letter-spacing: -0.3px; }
.notice-text { margin: 0; white-space: pre-wrap; color: var(--text); }
.feed { margin-top: 8px; }
.calendar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.calendar-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.calendar-tools > .cal-nav {
  flex: 0 0 auto;
  background: #fff;
  box-shadow: var(--shadow);
}
.calendar-tools .picker { position: relative; flex: 1 1 auto; min-width: 0; max-width: 280px; }
.calendar-tools .picker-btn { min-width: 0; }
.calendar-tools .picker-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  width: min(320px, calc(100vw - 80px));
}
.view-tabs { flex: 0 0 auto; width: auto; max-width: none; margin-left: auto; overflow: visible; padding-bottom: 0; }
.month-list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; }
.month-list button { text-align: center; background: var(--field); }
.month-list button.on,
.month-list button.on:hover { background: var(--blue); color: #fff; }
.month-board, .week-wrap { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 12px; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month-day {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 6px;
  border-radius: 12px;
  background: var(--field);
  cursor: pointer;
}
.month-day.today { box-shadow: inset 0 0 0 1px var(--blue); }
.day-num { font-weight: 500; color: var(--ink); }
.chip {
  border: 0;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-press);
  text-align: left;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
}
.week-wrap { overflow-x: auto; }
.week { display: grid; grid-template-columns: 56px repeat(7, minmax(96px, 1fr)); min-width: 760px; }
.week.day { grid-template-columns: 56px minmax(0, 1fr); min-width: 0; }
.week-corner, .hour-label { color: var(--muted); font-size: 12px; align-self: center; }
.week-day, .slot {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 4px;
  min-height: 36px;
}
.week-day { font-weight: 500; color: var(--ink); border-radius: 8px; }
.week-day.today { box-shadow: inset 0 0 0 1px var(--blue); }
.slot { border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.when-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.time-pop {
  position: absolute;
  z-index: 25;
  top: calc(100% + 8px);
  left: 0;
  width: min(220px, 80vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.time-col { display: grid; align-content: start; max-height: 220px; overflow: auto; gap: 2px; }
.time-col button {
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-weight: 500;
  color: var(--text);
}
.time-col button.on { background: var(--blue); color: #fff; }
.event-card { width: min(560px, 100%); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.shots img, .shots video {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--field);
}
.shots a.shot-file {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.media-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.media-tile { display: grid; gap: 8px; min-width: 0; }
.media-open {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--field);
  cursor: pointer;
}
.media-open img,
.media-open video {
  width: 100%;
  height: 148px;
  object-fit: cover;
  display: block;
  pointer-events: none;
  background: #dfe3ec;
}
.media-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(22, 24, 32, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}
.media-tile a.btn { width: 100%; }
.file-add { position: relative; overflow: hidden; cursor: pointer; }
.file-add input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.btn.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  width: fit-content;
  height: 40px;
  padding: 0 16px 0 12px;
}
.btn.back .back-icon,
.btn.back svg { width: 18px; height: 18px; display: block; }
.checkin-picker .picker-menu { box-shadow: none; padding: 0; border: 0; }
.checkin-card form {
  background: #fff;
  border: 1px solid #d5d9e4;
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.checkin-card input.field,
.checkin-card textarea,
.checkin-card textarea.field {
  background: #fff;
  border: 1px solid #d5d9e4;
  color: var(--text);
}
.checkin-card input.field::placeholder,
.checkin-card textarea::placeholder { color: var(--muted); }
.checkin-card input.field:focus,
.checkin-card textarea:focus {
  border-color: var(--blue);
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.checkin-card .btn {
  background: var(--blue);
  color: #fff;
  border: 0;
}
.checkin-card .btn:hover { background: var(--blue-press); }
.checkin-card .btn.ghost {
  background: #fff;
  color: var(--blue);
  border: 1px solid #c5cad6;
}
.checkin-card .btn.ghost:hover {
  background: var(--blue-soft);
  color: var(--blue-press);
  border-color: var(--blue);
}
.checkin-card .btn.danger { background: var(--danger); color: #fff; border: 0; }
.checkin-card .btn.danger:hover { background: #e0220c; }
.checkin-card .btn.file-pick {
  height: auto;
  min-height: 112px;
  width: 100%;
  border: 3px dashed var(--blue);
  border-radius: 16px;
  background: #e8f3ff;
  color: #16324f;
}
.checkin-card .btn.file-pick:hover { background: #d4e9ff; color: #16324f; }
.checkin-card .btn.file-pick.wide-pick {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  flex: 1 1 100%;
  height: auto;
  min-height: 56px;
  padding: clamp(16px, 4.2vw, 22px) clamp(18px, 5vw, 28px);
}
.checkin-card .doc-files,
.checkin-card form .settle-files { display: grid; grid-template-columns: minmax(0, 1fr); }
.checkin-card .media-add {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 56px;
  min-height: 56px;
  padding: 0 24px;
  border: 1px solid #d5d9e4;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
}
.checkin-card .media-add:hover { border-color: var(--blue); }
.client-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-card.client-photo-card {
  width: min(1100px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  padding: 16px 16px 20px;
}
.client-photo-view {
  display: block;
  width: 100%;
  height: min(78vh, calc(100dvh - 148px));
  max-height: calc(100dvh - 148px);
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  border-radius: 12px;
  background: #f3f5f8;
}
@media (max-width: 860px) {
  .checkin-card form .settle-submit { display: grid; grid-template-columns: minmax(0, 1fr); }
  .checkin-card form .settle-submit .btn { width: 100%; }
}

@media (max-width: 860px) {
  .side, .scrim { display: none; }
  .main { margin-left: 0; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .sheet { z-index: 36; }
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 32;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    margin: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -1px 0 var(--line);
  }
  .tabbar button {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    padding: 4px 2px 6px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: -0.2px;
    line-height: 1.1;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar button span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tabbar button { position: relative; }
  .tabbar button.on { color: var(--blue); background: var(--blue-soft); }
  .tabbar .nav-badge {
    position: absolute;
    top: 2px;
    left: calc(50% + 6px);
    min-width: 16px;
    height: 16px;
    margin-left: 0;
    padding: 0 4px;
    font-size: 10px;
  }
  .tabbar .nav-icon,
  .tabbar .nav-icon svg { width: 22px; height: 22px; color: currentColor; }
  .more-scrim {
    position: fixed;
    inset: 0;
    z-index: 38;
    display: block;
    background: rgba(32, 32, 40, 0);
    transition: background 0.28s ease;
  }
  .more-scrim.open { background: rgba(32, 32, 40, 0.48); }
  .more-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    gap: 4px;
    max-height: min(78dvh, 640px);
    overflow: auto;
    padding: 8px 12px calc(16px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    background: #fff;
    box-shadow: var(--shadow);
    transform: translateY(110%);
    transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.24, 1);
  }
  .more-scrim.open .more-sheet,
  .more-sheet.open { transform: none; }
  .more-grab {
    width: 40px;
    height: 4px;
    margin: 4px auto 8px;
    border-radius: 999px;
    background: #d5d9e4;
  }
  .more-list { display: grid; gap: 4px; }
  .more-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    padding: 0 14px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 500;
    text-align: left;
  }
  .more-item.on { background: var(--blue-soft); color: var(--blue-press); }
  .more-item.on .nav-icon { color: var(--blue-press); }
  .more-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 12px 14px 4px;
    border-top: 1px solid var(--line);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
  }
  .more-foot span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  @media (max-width: 390px) {
    .tabbar { gap: 0; padding-left: 2px; padding-right: 2px; }
    .tabbar button { font-size: 10px; letter-spacing: -0.3px; padding-left: 0; padding-right: 0; }
  }
  @media (prefers-reduced-motion: reduce) {
    .more-scrim, .more-sheet { transition: none; }
  }
  .page { max-width: none; }
  .panel > .complex-tabs {
    margin-right: -16px;
    padding-right: 16px;
  }
  .complex-tabs:not(.view-tabs) {
    min-height: 72px;
    padding-top: 10px;
    padding-bottom: 14px;
  }
  .complex-tabs:not(.view-tabs) .tab {
    min-height: 48px;
  }
  .toolbar, .toolbar.has-add, .history-filters { grid-template-columns: 1fr; }
  .due-row { align-items: flex-start; flex-wrap: wrap; }
  .due-row .btn { width: 100%; }
  .toolbar .btn.outline { width: 100%; }
  .card.wide { grid-template-columns: 1fr; }
  .card-status { justify-self: center; }
  .card-side { justify-self: stretch; justify-items: stretch; }
  .card-side .btn { width: 100%; }
  .title-row { flex-wrap: nowrap; align-items: center; gap: 12px; }
  .title-row h1 { font-size: 28px; }
  .title-row .btn { height: 40px; margin-left: auto; padding: 0 14px; font-size: 13px; white-space: nowrap; }
  .calendar-bar { gap: 8px; }
  .calendar-tools { gap: 6px; }
  .calendar-tools > .cal-nav { width: 32px; height: 32px; }
  .calendar-tools .picker { flex: 0 0 auto; max-width: none; min-width: 0; }
  .calendar-tools .picker-btn { width: auto; min-height: 36px; padding: 0 10px; font-size: 14px; }
  .calendar-tools .cal-year { display: none; }
  .view-tabs { gap: 4px; min-width: 0; }
  .view-tabs .tab { height: 36px; padding: 0 8px; font-size: 13px; }
  .week-wrap { max-width: 100%; }
  .when-grid { grid-template-columns: 1fr; }
  .month-day { min-height: 64px; padding: 4px; }
  .chip { font-size: 11px; }
  .agenda-nav strong { font-size: 16px; }
  .cal-pop { width: min(292px, calc(100vw - 64px)); }
}
@media (max-width: 720px) {
  .gate h1, .page h1 { font-size: 32px; }
  .row { flex-direction: column; align-items: flex-start; }
  .booking-side, .holders, .holder { justify-items: start; justify-content: flex-start; }
  .title-row { align-items: flex-start; }
}
@media (max-width: 860px) {
  .row.booking-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    width: 100%;
    min-width: 0;
  }
  .booking-status { justify-content: flex-start; }
  .booking-actions .btn { white-space: normal; }
}
@media (min-width: 720px) {
  .sheet { align-items: center; justify-items: center; padding: 24px; }
  .sheet-card { width: min(440px, 100%); border-radius: 28px; }
}
.modal-card { min-width: 0; max-width: calc(100vw - 32px); }
.booking-form { min-width: 0; max-width: 100%; }
.booking-form .picker,
.booking-form .picker-btn,
.booking-form .picker-menu,
.booking-form .picker-list { min-width: 0; max-width: 100%; }
.booking-form .picker-btn {
  height: auto;
  min-height: 56px;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 10px;
}
.booking-form .picker-btn span:first-child,
.booking-form .picker-option {
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.3;
  overflow: hidden;
}
.booking-form .picker-list { gap: 8px; }
.booking-form .picker-list button {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
}
.sheet-grab { display: none; }
@media (max-width: 860px) {
  .modal.booking-sheet {
    place-items: end stretch;
    padding: 0;
  }
  .modal.booking-sheet .modal-card {
    width: 100%;
    max-width: 100%;
    max-height: min(92dvh, 100%);
    border-radius: 24px 24px 0 0;
    padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
  }
  .modal.booking-sheet.open .modal-card { transform: none; }
  .booking-sheet .sheet-grab {
    display: block;
    width: 40px;
    height: 4px;
    margin: 4px auto 8px;
    border-radius: 999px;
    background: #d5d9e4;
  }
}

.security-panel { grid-template-columns: minmax(0, 1fr); }
.security-panel > .security-views { width: 100%; margin: 0; padding: 4px 0 8px; overflow-x: auto; }
.security-panel .stack { gap: 4px; }
.security-panel .meta, .security-panel .hint { margin: 0; }
.security-toolbar { align-items: flex-start; }
.security-toolbar h2 { font-size: 24px; line-height: 32px; }
.security-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
  gap: 12px;
  align-items: end;
}
.security-filters label, .security-form-fields label { font-size: 14px; line-height: 20px; min-width: 0; }
.security-filters .field { min-width: 0; width: 100%; background: #fff; border: 1px solid var(--line); }
.security-filters > .security-filter-toggle { display: none; }
.security-filter-extras { display: contents; }
.security-query { grid-column: span 2; }
.security-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.security-totals { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.security-totals div, .security-empty, .security-table-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.security-totals div { min-width: min(100%, 176px); padding: 8px 16px; }
.security-totals dt { color: var(--muted); font-size: 14px; line-height: 20px; }
.security-totals dd { margin: 4px 0 0; font-size: 18px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.security-empty { padding: 24px; display: grid; gap: 8px; justify-items: start; }
.security-empty p { margin: 0; }
.security-table-scroll { width: 100%; max-height: min(65dvh, 640px); overflow: auto; overscroll-behavior-x: contain; border-radius: 12px 12px 0 0; }
.security-table-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.security-table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 14px; line-height: 20px; }
.security-table th, .security-table td { padding: 12px 16px; vertical-align: middle; white-space: nowrap; border-bottom: 1px solid var(--line); }
.security-table thead th { position: sticky; top: 0; z-index: 1; background: var(--field); color: var(--muted); font-weight: 700; }
.security-table thead .security-action { z-index: 2; }
.security-table tbody th { font-weight: 500; }
.security-table .security-number { text-align: right; font-variant-numeric: tabular-nums; }
.security-table .security-comment { min-width: 176px; max-width: 280px; white-space: normal; overflow-wrap: anywhere; }
.security-table .security-action { position: sticky; right: 0; }
.security-table td.security-action { background: #fff; }
.security-table tbody tr:hover { background: var(--canvas); }
.security-table .security-record-link { text-align: left; }
.security-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; }
.security-form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.security-form-wide { grid-column: 1 / -1; }
.security-control { min-width: 0; }
.security-control > span { font-size: 14px; line-height: 20px; }
.security-control .picker-btn { min-height: 48px; }
.security-control .picker-btn .muted { color: var(--muted); }
.security-control .picker-btn:focus-visible, .security-popover button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.security-suggestion, .security-date-entry { display: flex; gap: 8px; align-items: stretch; }
.security-suggestion > input, .security-date-entry > input { min-width: 0; flex: 1; }
.security-suggestion .picker-btn { min-height: 48px; padding: 0 8px; font-size: 12px; gap: 8px; }
.security-popover { position: fixed; inset: auto; margin: 0; overflow: auto; color: var(--text); }
.security-popover .picker-detail { display: block; margin-top: 4px; white-space: normal; }
.security-date-menu { padding: 0; border: 0; background: transparent; }
.security-date-menu .cal-pop { position: static; width: 100%; }
.security-date-entry + p:empty { display: none; }
.security-form-fields input[hidden] { display: none; }
.security-form-feedback:empty { display: none; }
.security-delete { color: var(--danger, #b92133); }
.modal-card.security-modal { width: min(100%, 640px); max-height: calc(100dvh - 32px); overflow-y: auto; }

@media (max-width: 860px) {
  .security-toolbar { flex-wrap: wrap; }
  .security-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .security-filters > .security-filter-toggle { display: inline-flex; justify-self: start; }
  .security-filter-extras[data-expanded="false"] { display: none; }
  .security-totals div { flex: 1 1 0; min-width: 0; padding: 8px 12px; }
  .security-totals dd { font-size: 16px; }
  .security-table .security-action { right: auto; }
  .security-table th, .security-table td { padding: 8px 12px; }
}
@media (max-width: 375px) {
  .security-query { grid-column: 1 / -1; }
  .security-form-fields { grid-template-columns: minmax(0, 1fr); }
}
