:root {
  --bg: #F4F6F8;
  --surface: #FFFFFF;
  --text: #16202B;
  --accent: #2C5C74;
  --accent-dark: #1E4356;
  --neutral: #5B6773;
  --amber: #E8A317;
  --success: #2F7D5B;
  --error: #B23A3A;
  --line: #DDE3E8;
  --line-strong: #C7D0D8;
  --tint: #EDF2F5;
  --tint-warm: #FBF3E2;
  --tint-success: #E9F3EE;
  --tint-error: #F7EAEA;
  --shadow-sm: 0 1px 2px rgba(22, 32, 43, .08);
  --shadow-md: 0 12px 32px rgba(22, 32, 43, .12);
  --radius: 14px;
  --radius-sm: 9px;
  --fast: 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --base: 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --slow: 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --lift: 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --counter: 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.18; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: clamp(24px, 2.6vw, 34px); }
h3 { font-size: clamp(18px, 1.8vw, 20px); }
p { margin: 0 0 1em; }
ul, ol { margin-top: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.small { font-size: 13px; line-height: 1.45; }
.muted { color: var(--neutral); }
.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--neutral);
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  transition: top var(--fast);
}
.skip-link:focus { top: 10px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
  padding: 10px clamp(16px, 4vw, 48px);
  background: rgba(244, 246, 248, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); flex: 0 0 auto; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand img { width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 19px; letter-spacing: .02em; }
.brand-text small { font-size: 11px; color: var(--neutral); letter-spacing: .02em; }
.public-nav { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 24px); margin-left: auto; }
.public-nav a {
  padding: 8px 2px;
  color: var(--text);
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: color var(--fast), border-color var(--fast);
}
.public-nav a:hover, .public-nav a.active { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--neutral);
  font-size: 12px;
  white-space: nowrap;
}
.connection-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neutral);
}
.connection-badge.online { background: var(--tint-success); color: var(--success); }
.connection-badge.online::before { background: var(--success); }
.connection-badge.offline { background: var(--tint-warm); color: var(--text); }
.connection-badge.offline::before { background: var(--amber); }

.demo-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: var(--tint-warm);
  border-bottom: 1px solid #EAD6A9;
  font-size: 14px;
}
.demo-banner strong { color: var(--text); }
.demo-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); flex: 0 0 auto; }

.view { animation: viewIn var(--base) both; }
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }
.section { max-width: 1240px; margin: 0 auto; padding: clamp(38px, 5vw, 68px) clamp(16px, 4vw, 48px); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.section-head h2 { margin-bottom: 6px; }
.section-head p:last-child { margin-bottom: 0; }

.hero {
  position: relative;
  min-height: clamp(480px, 68vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--text);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 32, 43, .18) 0%, rgba(22, 32, 43, .55) 52%, rgba(22, 32, 43, .86) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 72px) clamp(18px, 4vw, 48px);
  color: #fff;
}
.hero .eyebrow { color: #E8EFF3; }
.hero h1 { max-width: 720px; margin-bottom: 14px; color: #fff; text-shadow: 0 2px 18px rgba(22, 32, 43, .4); }
.hero-lead { max-width: 620px; font-size: clamp(16px, 1.5vw, 19px); color: #EDF2F5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 30px; }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px, 3vw, 44px);
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .24);
  max-width: 680px;
}
.hero-facts div { min-width: 74px; }
.hero-facts dt { margin: 0 0 2px; font-size: 12px; color: #D7E2E8; }
.hero-facts dd { margin: 0; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.2;
  text-decoration: none;
  transition: background var(--fast), border-color var(--fast), color var(--fast), transform var(--fast), box-shadow var(--fast);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--tint); color: var(--accent-dark); border-color: var(--accent); }
.btn-outline-light { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .62); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #8F2C2C; color: #fff; }
.btn-warn { background: var(--amber); color: var(--text); }
.btn-warn:hover { background: #D3920F; color: var(--text); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn-xs { min-height: 28px; padding: 4px 9px; font-size: 12px; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.day-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  transition: border-color var(--fast), background var(--fast), transform var(--fast);
}
.day-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.day-chip.active { border-color: var(--accent); background: var(--tint); box-shadow: inset 0 0 0 1px var(--accent); }
.day-chip strong { font-size: 14px; }
.day-chip small { font-size: 12px; color: var(--neutral); }
.day-chip .day-free { margin-top: auto; font-size: 12px; font-weight: 600; color: var(--success); }
.day-chip.closed { background: #F0F2F4; color: var(--neutral); }
.day-chip.closed .day-free { color: var(--neutral); }

.slot-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
  transition: border-color var(--fast), background var(--fast);
}
.slot:hover { border-color: var(--accent); background: var(--tint); }
.slot.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.slot small { font-size: 11px; color: var(--success); }
.slot.selected small { color: #E8EFF3; }
.slot.busy { background: #F0F2F4; color: var(--neutral); cursor: not-allowed; }
.slot.busy small { color: var(--error); }

.how-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
.how-art { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.how-art img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.how-art figcaption { padding: 14px 18px; font-size: 13px; color: var(--neutral); border-top: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tint);
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.steps h3 { margin-bottom: 2px; }
.steps p { margin: 0; color: var(--neutral); }

.cards { display: grid; gap: 16px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--fast), transform var(--fast), box-shadow var(--fast);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.card img { width: 28px; height: 28px; margin-bottom: 12px; }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--neutral); }

.module-strip { padding-top: 0; }
.module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.module {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  min-width: 0;
  transition: border-color var(--fast), background var(--fast);
}
.module:hover { border-color: var(--accent); background: var(--tint); text-decoration: none; }
.module img { width: 24px; height: 24px; flex: 0 0 auto; }
.module span { font-size: 14px; font-weight: 500; }

.staff-promo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.staff-promo > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.staff-promo h2 { margin-bottom: 10px; }

.contacts { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; }
.contact-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.contact-list li { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; overflow-wrap: anywhere; }
.contact-art { padding: 26px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--neutral); background: var(--surface); }
.contact-art img { margin: 0 auto 12px; opacity: .8; }

.page-head {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 54px) clamp(16px, 4vw, 48px) 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.page-head h1 { margin-bottom: 6px; }
.page-head p:last-child { margin-bottom: 0; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 24px) 60px; }
.prose { max-width: 780px; }
.prose li { margin-bottom: 8px; }

.calendar-toolbar { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 14px; display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.calendar-toolbar .btn { margin-bottom: 2px; }
.calendar-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.calendar-day-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.calendar-day-group h3 { font-size: 16px; margin-bottom: 4px; }
.calendar-day-group .day-note { font-size: 12px; color: var(--neutral); margin-bottom: 10px; }
.calendar-slot { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.calendar-slot:first-of-type { border-top: 0; }
.calendar-slot b { font-variant-numeric: tabular-nums; }
.calendar-slot span { color: var(--neutral); }
.calendar-slot .free { color: var(--success); font-weight: 600; }
.calendar-slot .hot { color: var(--text); background: var(--amber); border-radius: 4px; padding: 0 5px; }

.booking-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, .75fr);
  gap: 24px;
  align-items: start;
}
.booking-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 30px); min-width: 0; }
.booking-aside { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: sticky; top: calc(var(--header-h) + 16px); }
.booking-aside img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 1px solid var(--line); }
.booking-aside h2 { font-size: 19px; padding: 18px 20px 0; }
.small-list { padding: 0 20px 18px 36px; margin: 8px 0 0; color: var(--neutral); font-size: 14px; }
.small-list li { margin-bottom: 8px; }
.form-progress { display: flex; list-style: none; padding: 0; margin: 0 0 24px; gap: 8px; flex-wrap: wrap; }
.form-progress li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--neutral);
  font-size: 13px;
  background: var(--bg);
}
.form-progress li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-strong); font-size: 12px; font-weight: 600; }
.form-progress li.active { border-color: var(--accent); color: var(--accent-dark); background: var(--tint); }
.form-progress li.active span { background: var(--accent); color: #fff; border-color: var(--accent); }
.form-progress li.done { color: var(--success); border-color: #B9D8C8; background: var(--tint-success); }
.form-progress li.done span { background: var(--success); color: #fff; border-color: var(--success); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > span { font-size: 13px; font-weight: 500; color: var(--text); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  transition: border-color var(--fast), box-shadow var(--fast);
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(44, 92, 116, .14); outline: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); background: #FDF7F7; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.field.inline input { width: auto; min-height: 38px; }
.field.inline > span { white-space: nowrap; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--neutral); margin: 8px 0 4px; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); flex: 0 0 auto; }
.password-wrap { display: flex; gap: 8px; align-items: center; }
.password-wrap input { flex: 1; }
.hint { font-size: 13px; color: var(--neutral); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin: 4px 0 14px; }
.field-error { color: var(--error); background: var(--tint-error); border: 1px solid #E7C2C2; border-radius: 9px; padding: 10px 12px; font-size: 14px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.booking-success { border: 1px solid #B9D8C8; background: var(--tint-success); border-radius: var(--radius); padding: 22px; }
.booking-success h2 { margin-bottom: 6px; }
.success-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.success-grid div { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px; }
.success-grid dt { font-size: 12px; color: var(--neutral); }
.success-grid dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel h2, .panel h3 { margin-bottom: 8px; }
.status-card { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.status-grid div { border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: var(--bg); }
.status-grid dt { font-size: 12px; color: var(--neutral); }
.status-grid dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.auth-layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 52px) clamp(16px, 4vw, 48px) 64px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 28px;
  align-items: stretch;
}
.auth-art { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 420px; background: var(--text); }
.auth-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-art-text { position: absolute; inset: auto 0 0 0; padding: 26px; color: #fff; background: linear-gradient(180deg, rgba(22,32,43,0) 0%, rgba(22,32,43,.82) 100%); }
.auth-art-text .eyebrow { color: #E8EFF3; }
.auth-art-text p:last-child { margin-bottom: 0; color: #EDF2F5; }
.auth-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 34px); min-width: 0; }
.auth-panel h1 { font-size: clamp(26px, 3vw, 34px); }
.demo-creds { margin: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
.demo-creds summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 500; }
.demo-accounts { display: grid; gap: 8px; margin: 12px 0 6px; }
.demo-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  text-align: left;
  transition: border-color var(--fast), background var(--fast);
}
.demo-account:hover { border-color: var(--accent); background: var(--tint); }
.demo-account img { width: 32px; height: 32px; border-radius: 50%; }
.demo-account span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.demo-account strong { font-size: 13px; }
.demo-account small { font-size: 11px; color: var(--neutral); overflow-wrap: anywhere; }

.app-view { background: var(--bg); }
.app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.sidebar {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 14px;
  background: var(--text);
  color: #F4F6F8;
  overflow-y: auto;
  min-width: 0;
}
.sidebar-head { display: flex; align-items: center; gap: 10px; padding: 0 6px 12px; border-bottom: 1px solid rgba(244, 246, 248, .16); }
.sidebar-head img { width: 30px; height: 30px; }
.sidebar-head span { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.sidebar-head strong { font-size: 16px; letter-spacing: .02em; }
.sidebar-head small { font-size: 11px; color: #AEBBC5; overflow-wrap: anywhere; }
.app-tabs { display: flex; flex-direction: column; gap: 3px; }
.app-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #D7E2E8;
  font-size: 14px;
  text-align: left;
  transition: background var(--fast), color var(--fast);
}
.app-tab img { width: 20px; height: 20px; flex: 0 0 auto; filter: brightness(0) invert(1); opacity: .78; }
.app-tab:hover { background: rgba(244, 246, 248, .10); color: #fff; }
.app-tab.active { background: var(--accent); color: #fff; }
.app-tab.active img { opacity: 1; }
.app-tab .tab-count { margin-left: auto; font-size: 11px; background: rgba(244, 246, 248, .16); padding: 1px 6px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid rgba(244, 246, 248, .16); }
.user-chip { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-chip img { width: 34px; height: 34px; border-radius: 50%; }
.user-chip span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-chip strong { font-size: 13px; overflow-wrap: anywhere; }
.user-chip small { font-size: 11px; color: #AEBBC5; }
.sidebar .btn-ghost { color: #D7E2E8; border-color: rgba(244, 246, 248, .28); }
.sidebar .btn-ghost:hover { background: rgba(244, 246, 248, .12); color: #fff; border-color: #fff; }

.app-main { min-width: 0; }
.app-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 3vw, 32px) 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.app-topbar h1 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 0; }
.app-topbar .eyebrow { margin-bottom: 4px; }
.topbar-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.role-badge { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; background: var(--tint); color: var(--accent-dark); font-size: 12px; font-weight: 500; }
.app-content { padding: 20px clamp(14px, 3vw, 32px) 56px; min-width: 0; }
.app-content > .tab-section { animation: viewIn var(--base) both; }
.app-content h2 { font-size: 22px; }
.app-content h3 { font-size: 17px; }

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.kpi {
  min-width: 0;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.kpi-label { font-size: 12px; color: var(--neutral); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { margin-top: 3px; font-size: 28px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 13px; font-weight: 500; color: var(--neutral); }
.kpi.amber { border-color: #EAD6A9; background: var(--tint-warm); }
.kpi.success { border-color: #B9D8C8; }
.kpi.error { border-color: #E7C2C2; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 16px; align-items: start; }
.dash-grid + .dash-grid { margin-top: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin-bottom: 0; }
.gate-strip { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.gate-pill {
  min-width: 0;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  text-align: center;
  font-size: 11px;
  line-height: 1.2;
  transition: border-color var(--fast), background var(--fast);
}
.gate-pill b { display: block; font-size: 13px; font-variant-numeric: tabular-nums; }
.gate-pill small { display: block; color: var(--neutral); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gate-pill.busy { background: var(--tint-warm); border-color: #EAD6A9; }
.gate-pill.repair { background: var(--tint-error); border-color: #E7C2C2; }
.gate-pill.retired { background: #F0F2F4; color: var(--neutral); }
.gate-pill:hover { border-color: var(--accent); }
.slot-bars { display: grid; gap: 7px; }
.slot-bar { display: grid; grid-template-columns: 56px minmax(0, 1fr) 44px; gap: 8px; align-items: center; font-size: 12px; }
.slot-bar .track { height: 8px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.slot-bar .fill { height: 100%; background: var(--accent); border-radius: 999px; }
.slot-bar .fill.hot { background: var(--amber); }
.slot-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.chart-wrap { min-width: 0; overflow: hidden; }
.chart-wrap svg { width: 100%; height: auto; display: block; max-height: 190px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.badge.new { background: var(--tint-warm); color: var(--text); }
.badge.confirmed { background: #E3EFF5; color: var(--accent-dark); }
.badge.checked_in { background: #E6F1F6; color: var(--accent-dark); }
.badge.admitted { background: var(--tint-success); color: var(--success); }
.badge.loading { background: var(--tint-warm); color: var(--text); }
.badge.completed { background: var(--tint-success); color: var(--success); }
.badge.cancelled, .badge.rejected, .badge.no_show { background: var(--tint-error); color: var(--error); }
.badge.amber { background: var(--amber); color: var(--text); }
.badge.vip { background: var(--text); color: #fff; }
.badge.err { background: var(--tint-error); color: var(--error); }
.badge.ok { background: var(--tint-success); color: var(--success); }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; font-weight: 600; color: var(--neutral); background: #F7F9FA; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background var(--fast); }
tbody tr:hover { background: #F7F9FA; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .sub { display: block; font-size: 12px; color: var(--neutral); }
.row-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.clickable { cursor: pointer; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filters .field { margin: 0; min-width: 140px; }
.filters .field.grow { flex: 1 1 220px; }
.filters input, .filters select { min-height: 38px; padding: 7px 10px; font-size: 14px; }
.filter-count { font-size: 12px; color: var(--neutral); margin-left: auto; align-self: center; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--tint); border-radius: 9px; }
.segmented button { border: 0; background: transparent; border-radius: 7px; padding: 6px 10px; font-size: 13px; color: var(--neutral); }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(226px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; min-height: 220px; }
.kanban-col { min-width: 0; background: #EEF1F4; border: 1px solid var(--line); border-radius: 11px; display: flex; flex-direction: column; }
.kanban-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.kanban-head b { font-size: 14px; }
.kanban-head .count { font-size: 11px; color: var(--neutral); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.kanban-cards { display: flex; flex-direction: column; gap: 8px; padding: 8px; min-height: 90px; flex: 1; }
.kanban-col.drag-over { background: var(--tint); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.kanban-col.invalid-drop { background: var(--tint-error); border-color: var(--error); }
.kcard {
  min-width: 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 9px;
  cursor: grab;
  transition: transform var(--fast), box-shadow var(--fast), border-color var(--fast);
}
.kcard:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .55; transform: rotate(.4deg) scale(.99); box-shadow: var(--shadow-md); transition: transform var(--lift); }
.kcard.urgent { border-left-color: var(--amber); background: #FFFDF7; }
.kcard.vip { border-left-color: var(--text); }
.kcard-top { display: flex; justify-content: space-between; gap: 6px; align-items: flex-start; }
.kcard-num { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kcard-title { margin: 4px 0 3px; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.kcard-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 11px; color: var(--neutral); }
.kcard-meta b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.kcard-actions { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 4px; }
.terminal-zone { margin-top: 14px; }
.terminal-zone summary { cursor: pointer; color: var(--neutral); font-size: 13px; padding: 8px 0; }
.terminal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 8px; }

.stage-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin: 10px 0 3px; }
.stage-bar span { height: 5px; border-radius: 999px; background: var(--line); }
.stage-bar span.done { background: var(--success); }
.stage-bar span.current { background: var(--accent); }
.stage-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--neutral); gap: 2px; }
.stage-labels span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline time { display: block; font-size: 11px; color: var(--neutral); }
.timeline p { margin: 2px 0 0; font-size: 13px; overflow-wrap: anywhere; }

.production-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.gate-card { min-width: 0; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.gate-card.busy { border-color: #EAD6A9; background: #FFFDF7; }
.gate-card.repair { border-color: #E7C2C2; background: var(--tint-error); }
.gate-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.gate-card-head strong { font-size: 14px; }
.gate-card p { margin: 0 0 4px; font-size: 12px; color: var(--neutral); overflow-wrap: anywhere; }
.gate-card .btn-row { margin-top: 8px; }
.flow-list { display: grid; gap: 8px; }
.flow-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.flow-row time { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.flow-row .meta { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.flow-row .meta small { display: block; color: var(--neutral); font-size: 11px; }
.flow-row .actions { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }

.doc-list, .notify-list { display: grid; gap: 8px; }
.doc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.doc-row .doc-name { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.doc-row .doc-meta { font-size: 11px; color: var(--neutral); }
.doc-row.decided-approved { border-left: 3px solid var(--success); }
.doc-row.decided-rejected { border-left: 3px solid var(--error); }
.doc-row.pending { border-left: 3px solid var(--amber); }
.upload-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.upload-row input[type="file"] { font-size: 13px; max-width: 100%; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-card { margin: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.photo-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-card figcaption { padding: 7px 9px; font-size: 12px; color: var(--neutral); overflow-wrap: anywhere; }

.notify-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.notify-row .n-meta { font-size: 12px; color: var(--neutral); overflow-wrap: anywhere; }
.notify-row .n-title { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background var(--fast); flex: 0 0 auto; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--fast); }
.switch input:checked + .track { background: var(--success); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.setting-card { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); min-width: 0; }
.setting-card h3 { margin-bottom: 4px; }
.setting-card p { margin-bottom: 10px; font-size: 13px; color: var(--neutral); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { border: 0; background: transparent; padding: 9px 12px; font-size: 14px; color: var(--neutral); border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--accent-dark); border-bottom-color: var(--accent); }
.subpanel { margin-top: 12px; }
.empty-state { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; align-items: center; padding: 18px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-state > img { border-radius: var(--radius-sm); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.empty-state h3 { margin-bottom: 4px; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.notice { padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; background: var(--surface); font-size: 13px; color: var(--neutral); }
.notice.warn { border-left-color: var(--amber); background: var(--tint-warm); color: var(--text); }
.notice.err { border-left-color: var(--error); background: var(--tint-error); color: var(--error); }
.notice.ok { border-left-color: var(--success); background: var(--tint-success); color: var(--success); }

.modal-root { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(22, 32, 43, .55); }
.modal { width: min(720px, 100%); max-height: 88vh; overflow-y: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 22px; animation: modalIn var(--slow) both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { margin-bottom: 2px; font-size: 22px; }
.modal-close { border: 0; background: var(--tint); border-radius: 50%; width: 34px; height: 34px; font-size: 18px; line-height: 1; }
.modal-section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.modal-section h3 { margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0 0 12px; }
.kv div { min-width: 0; }
.kv dt { font-size: 11px; color: var(--neutral); }
.kv dd { margin: 1px 0 0; font-size: 13px; overflow-wrap: anywhere; }

.toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 10px; background: var(--text); color: #fff; box-shadow: var(--shadow-md); font-size: 14px; animation: toastIn var(--base) both; }
.toast.ok { border-left: 3px solid var(--success); }
.toast.err { border-left: 3px solid var(--error); }
.toast.warn { border-left: 3px solid var(--amber); }
.toast button { margin-left: auto; border: 0; background: transparent; color: inherit; font-size: 16px; opacity: .8; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.counter { transition: none; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin 800ms linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--tint) 0%, #F7F9FA 50%, var(--tint) 100%); background-size: 200% 100%; border-radius: 6px; min-height: 14px; animation: shimmer 1200ms linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.stagger > * { animation: cardIn var(--base) both; }
.stagger > *:nth-child(2) { animation-delay: 40ms; }
.stagger > *:nth-child(3) { animation-delay: 80ms; }
.stagger > *:nth-child(4) { animation-delay: 120ms; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.notfound { max-width: 1100px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px); display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.notfound > img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.empty-mark { display: flex; align-items: center; gap: 10px; margin-top: 24px; color: var(--neutral); font-size: 13px; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 48px); display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: start; }
.footer-inner nav { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.footer-inner p { margin: 4px 0 0; }
.footer-inner > p:last-child { text-align: right; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gate-strip { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .public-nav { gap: 12px; }
  .public-nav a { font-size: 13px; }
}
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .how-grid, .staff-promo, .contacts, .booking-layout, .auth-layout { grid-template-columns: 1fr; }
  .booking-aside { position: static; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .cards.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > p:last-child { grid-column: 1 / -1; text-align: left; }
  .notfound { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .public-nav { display: none; }
  .site-header { gap: 10px; }
  .header-actions { margin-left: auto; }
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; width: 100%; max-width: 100%; overflow: visible; padding: 12px; }
  .app-tabs { flex-direction: row; overflow-x: auto; max-width: 100%; padding-bottom: 4px; }
  .app-main { min-width: 0; width: 100%; }
  .app-tab { flex: 0 0 auto; min-height: 40px; }
  .app-tab .tab-count { display: none; }
  .sidebar-foot { display: flex; align-items: center; justify-content: space-between; }
  .sidebar-foot .btn { flex: 0 0 auto; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .day-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .success-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { align-items: flex-start; }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .site-header { padding: 8px 14px; }
  .brand-text small { display: none; }
  .header-actions .connection-badge { display: none; }
  .hero { min-height: 520px; }
  .hero-content { padding: 30px 16px 34px; }
  .hero-facts { gap: 16px 22px; }
  .hero-facts dd { font-size: 17px; }
  .section { padding: 32px 14px; }
  .page-head, .calendar-toolbar, .calendar-grid, .booking-layout, .auth-layout { padding-left: 14px; padding-right: 14px; }
  .day-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-grid { grid-template-columns: 1fr 1fr; }
  .module { padding: 10px; }
  .module span { font-size: 12px; }
  .cards.three { grid-template-columns: 1fr; }
  .empty-state { grid-template-columns: 1fr; }
  .empty-state > img { max-width: 100%; }
  .app-content { padding: 14px 12px 44px; }
  .app-topbar { padding: 14px 12px 10px; }
  .gate-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kanban { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); overflow-x: visible; }
  .kanban-cards { min-height: 52px; }
  .form-progress { gap: 4px; }
  .form-progress li { padding: 6px 9px; font-size: 12px; }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { flex: 1 1 100%; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters .field, .filters .field.grow { width: 100%; }
  .filter-count { margin-left: 0; }
  .flow-row { grid-template-columns: 64px minmax(0, 1fr); }
  .flow-row .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .doc-row { grid-template-columns: 1fr; }
  .table-wrap { border-radius: 9px; }
  table { min-width: 560px; font-size: 13px; }
  .footer-inner { grid-template-columns: 1fr; }
  .notfound { padding: 24px 14px 44px; }
  .modal { padding: 16px; }
}
@media (max-width: 380px) {
  .header-actions .btn { display: none; }
  .gate-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-value { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .stagger > * { animation-delay: 0ms !important; }
  .view, .modal, .toast { animation: none !important; }
  .kcard.dragging { transform: none; }
  .btn:hover, .card:hover, .day-chip:hover { transform: none; }
}
