:root {
  --bg: #F4F6F8;
  --surface: #FFFFFF;
  --ink: #12232E;
  --accent: #E8A317;
  --accent-dark: #B26A00;
  --neutral: #1F5C7A;
  --success: #2E7D32;
  --danger: #C62828;
  --warning: #B26A00;
  --line: rgba(18,35,46,0.14);
  --line-soft: rgba(18,35,46,0.08);
  --shadow: 0 8px 24px rgba(18, 35, 46, 0.08);
  --shadow-soft: 0 2px 8px rgba(18, 35, 46, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-move: cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
h1, h2, h3, h4, p { margin: 0 0 0.6em; overflow-wrap: anywhere; }
h1 { font-size: 44px; line-height: 52px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 22px; line-height: 30px; font-weight: 600; }
a { color: var(--neutral); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#main-public { display: block; }
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--accent); color: var(--ink); padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }
.noscript { padding: 16px; background: rgba(232,163,23,0.16); border: 1px solid var(--accent); margin: 16px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -0.01em; text-decoration: none; color: inherit;
  white-space: nowrap;
}
.brand img { display: block; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  max-width: 1200px; margin: 0 auto; padding: 14px 24px;
  background: rgba(244, 246, 248, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.site-nav a:hover { color: var(--accent-dark); }
.header-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 18px; border-radius: 999px;
  border: 1px solid transparent; text-decoration: none; font-weight: 600; font-size: 15px;
  background: var(--surface); color: var(--ink);
  transition: background-color 150ms var(--ease-move), color 150ms var(--ease-move), border-color 150ms var(--ease-move), transform 150ms var(--ease-move), box-shadow 150ms var(--ease-move);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-accent { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent); border-color: var(--accent-dark); color: var(--ink); box-shadow: 0 4px 14px rgba(18,35,46,0.14); }
.btn-neutral { background: var(--neutral); color: #FFFFFF; border-color: var(--neutral); }
.btn-neutral:hover { background: #12232E; border-color: #12232E; color: #FFFFFF; }
.btn-outline { background: transparent; border-color: var(--neutral); color: var(--neutral); }
.btn-outline:hover { background: var(--neutral); color: #FFFFFF; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--neutral); color: var(--neutral); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #FFFFFF; }
.btn-sm { min-height: 34px; padding: 5px 12px; font-size: 14px; }
.btn-icon { min-height: 34px; width: 34px; padding: 0; border-radius: 8px; }

.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center;
  max-width: 1200px; margin: 0 auto; padding: 56px 24px 40px;
}
.hero h1 { color: var(--ink); }
.hero-copy .lead { font-size: 18px; line-height: 28px; color: rgba(18,35,46,0.78); max-width: 60ch; }
.hero-media { position: relative; }
.hero-media img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 18px; box-shadow: var(--shadow); background: var(--surface);
}
.eyebrow {
  font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--neutral); font-weight: 700; margin-bottom: 10px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 28px; }
.hero-facts { list-style: none; display: flex; gap: 28px; padding: 0; margin: 0; flex-wrap: wrap; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-size: 28px; line-height: 32px; font-variant-numeric: tabular-nums; }
.hero-facts span { font-size: 13px; color: rgba(18,35,46,0.68); }

.section { max-width: 1200px; margin: 0 auto; padding: 56px 24px; }
.section-alt { background: var(--surface); max-width: none; }
.section-alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section-head { max-width: 760px; margin-bottom: 24px; }
.section-head .muted { color: rgba(18,35,46,0.68); }
.muted { color: rgba(18,35,46,0.68); }
.small { font-size: 14px; }
.hint { font-size: 13px; color: rgba(18,35,46,0.68); }
.price { font-weight: 700; color: var(--accent-dark); margin-top: auto; }

.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); padding: 20px;
}
.service-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.service-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 0; }
.step { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--neutral); color: #FFFFFF;
  font-weight: 700; margin-bottom: 10px;
}
.step p { margin: 0; color: rgba(18,35,46,0.68); font-size: 15px; }

.date-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; }
.date-chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface);
  border-radius: 10px; padding: 8px 12px; min-width: 78px; text-align: center;
  transition: background-color 150ms var(--ease-move), border-color 150ms var(--ease-move), color 150ms var(--ease-move);
}
.date-chip strong { display: block; font-size: 15px; }
.date-chip span { font-size: 12px; color: rgba(18,35,46,0.68); }
.date-chip[aria-selected="true"] { background: var(--neutral); border-color: var(--neutral); color: #FFFFFF; }
.date-chip[aria-selected="true"] span { color: rgba(255,255,255,0.82); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.slot-chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px;
  padding: 10px 8px; font-size: 14px; font-variant-numeric: tabular-nums; text-align: center;
  transition: background-color 150ms var(--ease-move), border-color 150ms var(--ease-move);
}
.slot-chip:hover:not(:disabled) { border-color: var(--accent-dark); background: rgba(232,163,23,0.12); }
.slot-chip:disabled { background: var(--line-soft); color: rgba(18,35,46,0.52); cursor: not-allowed; text-decoration: line-through; }
.slot-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 700; }

.booking-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.form-card { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field-wide { grid-column: 1 / -1; }
.optional { font-weight: 400; color: rgba(18,35,46,0.58); font-size: 12px; }
input, select, textarea {
  width: 100%; min-height: 42px; padding: 9px 11px;
  border: 1px solid rgba(18,35,46,0.28); border-radius: 8px; background: var(--surface);
  font-size: 15px; font-weight: 400;
  transition: border-color 150ms var(--ease-move), box-shadow 150ms var(--ease-move);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--neutral); box-shadow: 0 0 0 3px rgba(31, 92, 122, 0.16); outline: none; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; font-size: 14px; font-weight: 400; }
.consent input { width: 18px; min-height: 18px; margin-top: 2px; accent-color: var(--neutral); }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-status { min-height: 20px; margin-top: 10px; font-size: 14px; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--danger); }
.form-errors { margin: 8px 0 0; padding-left: 20px; color: var(--danger); font-size: 14px; }
.booking-aside { display: grid; gap: 16px; }
.booking-aside > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.success-card { border-left: 4px solid var(--success); }
.alt-list { display: grid; gap: 8px; }
.alt-item { display: flex; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; }

.inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.inline-form .field { min-width: 180px; flex: 1; }
.inline-form .form-status { flex-basis: 100%; }

.contacts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.contacts-grid p { margin: 0; color: rgba(18,35,46,0.76); }

.site-footer { background: var(--ink); color: rgba(255,255,255,0.88); padding: 34px 24px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.site-footer .brand { color: #FFFFFF; }
.footer-links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.88); }

.auth-view { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.auth-card { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 28px; }
.auth-card .brand { margin-bottom: 16px; }
.role-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.role-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 10px 6px;
  font-size: 13px; font-weight: 600;
  transition: border-color 150ms var(--ease-move), transform 150ms var(--ease-move), box-shadow 150ms var(--ease-move);
}
.role-card:hover { border-color: var(--accent-dark); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.role-card img { width: 48px; height: 48px; }
.demo-note { font-size: 12px; color: rgba(18,35,46,0.60); margin-top: 14px; overflow-wrap: anywhere; }

.staff-view { min-height: 100vh; background: var(--bg); }
.app-bar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 22px; background: var(--ink); color: rgba(255,255,255,0.88); position: sticky; top: 0; z-index: 25;
}
.app-bar .brand { color: #FFFFFF; }
.app-bar-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-bar-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.app-bar .btn-outline { border-color: rgba(255,255,255,0.60); color: rgba(255,255,255,0.88); }
.app-bar .btn-outline:hover { background: rgba(255,255,255,0.88); color: var(--ink); }
.app-bar .btn-ghost { border-color: rgba(255,255,255,0.28); color: rgba(255,255,255,0.88); }
.app-bar .btn-ghost:hover { border-color: rgba(255,255,255,0.60); color: #FFFFFF; }
.app-bar .brand img, .site-footer .brand img { background: var(--bg); border-radius: 8px; padding: 2px; }
.role-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; background: var(--accent); color: var(--ink);
}
.user-name { font-size: 14px; color: rgba(255,255,255,0.78); overflow-wrap: anywhere; }

.panel-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 0; min-height: calc(100vh - 58px); }
.side-nav {
  padding: 18px 12px; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; position: sticky; top: 58px; align-self: start;
  max-height: calc(100vh - 58px); overflow-y: auto;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: 1px solid transparent; background: transparent;
  border-radius: 10px; text-align: left; font-size: 15px; font-weight: 600; color: rgba(18,35,46,0.78);
  transition: background-color 150ms var(--ease-move), color 150ms var(--ease-move), transform 150ms var(--ease-move);
}
.nav-item img { flex: 0 0 auto; }
.nav-item:hover { background: var(--bg); color: var(--neutral); }
.nav-item.active { background: rgba(232,163,23,0.16); border-color: rgba(232,163,23,0.55); color: var(--ink); }
.nav-item.active::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-dark); margin-left: auto; }
.screen-root { padding: 26px 28px 48px; min-width: 0; }
.screen-root:focus { outline: none; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 30px; line-height: 38px; margin: 0; }
.page-head .page-sub { margin: 4px 0 0; color: rgba(18,35,46,0.68); font-size: 15px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; box-shadow: var(--shadow-soft);
}
.stat-card strong { display: block; font-size: 30px; line-height: 34px; font-variant-numeric: tabular-nums; }
.stat-card span { font-size: 13px; color: rgba(18,35,46,0.68); }
.stat-card.accent strong { color: var(--accent-dark); }
.stat-card.clickable { cursor: pointer; transition: transform 150ms var(--ease-move), box-shadow 150ms var(--ease-move); }
.stat-card.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-2 > *, .grid-3 > *, .stat-grid > *, .booking-layout > *, .screen-root > * { min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 18px; line-height: 26px; }
.panel-body { padding: 16px; }
.panel-body.flush { padding: 0; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .field { min-width: 160px; }
.toolbar input, .toolbar select { min-height: 38px; }
.search-field { flex: 1 1 220px; max-width: 340px; }

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.data-table th { background: var(--bg); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(18,35,46,0.68); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #F4F6F8; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-link { background: none; border: none; padding: 0; color: var(--neutral); font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
  border: 1px solid transparent;
}
.badge-new { background: rgba(232,163,23,0.16); color: var(--ink); border-color: rgba(232,163,23,0.55); }
.badge-confirmed { background: rgba(31,92,122,0.12); color: #1F5C7A; border-color: rgba(31,92,122,0.36); }
.badge-arrived { background: rgba(46,125,50,0.12); color: #2E7D32; border-color: rgba(46,125,50,0.32); }
.badge-loading { background: rgba(232,163,23,0.16); color: var(--ink); border-color: rgba(178,106,0,0.42); }
.badge-completed { background: rgba(46,125,50,0.12); color: #2E7D32; border-color: rgba(46,125,50,0.35); }
.badge-rejected { background: rgba(198,40,40,0.10); color: #C62828; border-color: rgba(198,40,40,0.32); }
.badge-cancelled { background: rgba(18,35,46,0.07); color: rgba(18,35,46,0.72); border-color: rgba(18,35,46,0.20); }
.badge-no_show { background: rgba(198,40,40,0.10); color: #C62828; border-color: rgba(198,40,40,0.32); }
.badge-success { background: rgba(46,125,50,0.12); color: #2E7D32; border-color: rgba(46,125,50,0.35); }
.badge-danger { background: rgba(198,40,40,0.10); color: #C62828; border-color: rgba(198,40,40,0.32); }
.badge-warn { background: rgba(232,163,23,0.16); color: var(--ink); border-color: rgba(232,163,23,0.55); }
.badge-info { background: rgba(31,92,122,0.12); color: #1F5C7A; border-color: rgba(31,92,122,0.36); }
.badge-neutral { background: rgba(18,35,46,0.07); color: rgba(18,35,46,0.72); border-color: rgba(18,35,46,0.20); }

.seg { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line-soft); }
.seg-part { display: block; height: 100%; }
.seg-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: rgba(18,35,46,0.68); margin-top: 8px; }
.seg-legend span { display: inline-flex; align-items: center; gap: 5px; }
.seg-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kanban-col {
  flex: 0 0 264px; background: rgba(31,92,122,0.06); border: 1px solid var(--line); border-radius: var(--radius-sm);
  display: flex; flex-direction: column; max-height: 68vh;
}
.kanban-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.kanban-count { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.kanban-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 90px; }
.kanban-body.drag-over { background: rgba(232,163,23,0.16); outline: 2px dashed var(--accent-dark); outline-offset: -4px; }
.kanban-card {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--neutral);
  border-radius: 10px; padding: 10px 11px; box-shadow: 0 1px 4px rgba(18,35,46,0.05);
  cursor: grab; text-align: left; width: 100%;
  transition: transform 180ms var(--ease-move), box-shadow 180ms var(--ease-move), opacity 180ms var(--ease-move);
}
.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.kanban-card.dragging { opacity: 0.55; transform: rotate(0.5deg); }
.kanban-card.urgent { border-left-color: var(--danger); }
.kanban-card.vip { border-left-color: var(--accent); }
.kanban-card h4 { margin: 0 0 4px; font-size: 14px; line-height: 20px; }
.kanban-card p { margin: 0; font-size: 12px; color: rgba(18,35,46,0.68); }
.kanban-card .meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: rgba(18,35,46,0.68); flex-wrap: wrap; }
.kanban-empty { padding: 12px; color: rgba(18,35,46,0.52); font-size: 13px; text-align: center; border: 1px dashed var(--line); border-radius: 8px; }
.drag-hint { font-size: 12px; color: rgba(18,35,46,0.68); margin-bottom: 10px; }
.drag-hint .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 3px 0 8px; vertical-align: middle; }
.drag-hint .dot.urgent { background: var(--danger); }
.drag-hint .dot.vip { background: var(--accent); }

.board-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; max-width: none; flex-wrap: wrap; }
.board-head > div:first-child { max-width: 760px; }
.board-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.public-kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; overflow: visible; }
.public-kanban .kanban-col { flex: initial; min-width: 0; max-height: none; }
.public-kanban .kanban-body { min-height: 190px; }
.public-kanban .kanban-card { touch-action: manipulation; }
.public-kanban .kanban-card:active { cursor: grabbing; }

@media (max-width: 700px) {
  .public-kanban { grid-template-columns: 1fr; }
  .public-kanban .kanban-body { min-height: 96px; }
}

.gate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gate-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.gate-card.off { opacity: 0.65; }
.gate-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.gate-head h3 { margin: 0; font-size: 17px; }
.gate-params { font-size: 13px; color: rgba(18,35,46,0.68); display: grid; gap: 3px; }
.gate-params strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.gate-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.gate-types { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.type-dot { width: 22px; height: 22px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; font-size: 10px; font-weight: 700; }

.cal { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.cal-grid { display: grid; grid-template-columns: 92px repeat(24, minmax(68px, 1fr)); min-width: 1724px; }
.cal-cell { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 6px; font-size: 11px; min-height: 44px; }
.cal-head { background: var(--bg); font-weight: 700; color: rgba(18,35,46,0.68); position: sticky; top: 0; }
.cal-corner { background: var(--bg); }
.cal-row-head { background: var(--bg); font-weight: 700; font-size: 12px; }
.cal-booked { background: rgba(31,92,122,0.12); border-left: 3px solid var(--neutral); border-radius: 5px; padding: 3px 4px; font-size: 10px; line-height: 13px; margin-bottom: 2px; overflow: hidden; }
.cal-booked.new { background: rgba(232,163,23,0.16); border-left-color: var(--accent-dark); }
.cal-booked.blocked { background: repeating-linear-gradient(135deg, rgba(18,35,46,0.06), rgba(18,35,46,0.06) 5px, rgba(18,35,46,0.14) 5px, rgba(18,35,46,0.14) 10px); border-left-color: rgba(18,35,46,0.52); }
.cal-booked.done { background: rgba(46,125,50,0.12); border-left-color: var(--success); }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.timeline li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; font-size: 13px; }
.timeline .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--neutral); margin-top: 5px; }
.timeline time { color: rgba(18,35,46,0.68); font-size: 12px; }

.empty-state { text-align: center; padding: 28px 18px; }
.empty-state img { width: min(320px, 100%); aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid var(--line); }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { color: rgba(18,35,46,0.68); max-width: 54ch; margin: 0 auto 14px; }

.doc-list { display: grid; gap: 10px; }
.doc-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; flex-wrap: wrap; }
.doc-main { display: flex; gap: 10px; align-items: center; min-width: 0; }
.doc-main img { width: 28px; height: 28px; }
.doc-main strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.doc-main span { font-size: 12px; color: rgba(18,35,46,0.68); }
.doc-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.upload-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.upload-row input[type="file"] { width: auto; max-width: 100%; padding: 6px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-thumb { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.photo-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo-thumb figcaption { padding: 6px 8px; font-size: 12px; color: rgba(18,35,46,0.68); }

.channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.channel-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: var(--surface); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.switch input { width: 20px; min-height: 20px; accent-color: var(--neutral); }

.modal-root {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(18, 35, 46, 0.52); padding: 18px;
}
.modal-card {
  width: min(680px, 100%); max-height: calc(100vh - 36px); overflow: auto;
  background: var(--surface); border-radius: 16px; box-shadow: 0 20px 60px rgba(18,35,46,0.3);
  animation: modalIn 200ms var(--ease-out);
}
.modal-card.wide { width: min(900px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-head h2 { margin: 0; font-size: 22px; line-height: 28px; }
.modal-body { padding: 18px; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal-close { border: none; background: transparent; font-size: 24px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.modal-close:hover { background: var(--bg); }

.toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 100;
  max-width: min(420px, calc(100vw - 36px)); padding: 12px 16px; border-radius: 12px;
  background: var(--ink); color: #FFFFFF; box-shadow: var(--shadow); font-size: 14px;
  animation: toastIn 200ms var(--ease-out);
}
.toast.err { background: var(--danger); }
.toast.ok { background: var(--success); }

.notice { border: 1px solid rgba(232,163,23,0.55); background: rgba(232,163,23,0.12); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.notice.err { border-color: rgba(198,40,40,0.32); background: rgba(198,40,40,0.08); }
.notice.ok { border-color: rgba(46,125,50,0.35); background: rgba(46,125,50,0.10); }
.kpi-row { display: flex; gap: 18px; flex-wrap: wrap; }
.kpi-row div { min-width: 100px; }
.kpi-row strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.kpi-row span { font-size: 12px; color: rgba(18,35,46,0.68); }
.chart-wrap { position: relative; width: 100%; min-height: 190px; }
.chart-wrap canvas { width: 100%; height: 200px; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: rgba(18,35,46,0.68); margin-top: 8px; }

.section-title { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(18,35,46,0.68); margin: 18px 0 8px; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 6px 12px; font-size: 14px; }
.kv dt { color: rgba(18,35,46,0.68); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.check-list li::before { content: "—"; color: var(--neutral); margin-right: 8px; }
.check-list li.done::before { content: "✓"; color: var(--success); }
.check-list li.todo::before { content: "○"; color: var(--accent-dark); }
.file-input-note { font-size: 12px; color: rgba(18,35,46,0.68); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.hero-copy, .section-head, .service-grid, .steps, .booking-layout { animation: fadeUp 220ms var(--ease-out) both; }
.screen-root > * { animation: fadeIn 200ms var(--ease-out) both; }
.stat-card, .gate-card, .kanban-card, .doc-row, .photo-thumb { animation: fadeUp 180ms var(--ease-out) both; }
.stat-card:nth-child(2), .gate-card:nth-child(2), .kanban-card:nth-child(2), .doc-row:nth-child(2) { animation-delay: 40ms; }
.stat-card:nth-child(3), .gate-card:nth-child(3), .kanban-card:nth-child(3), .doc-row:nth-child(3) { animation-delay: 80ms; }
.stat-card:nth-child(4), .gate-card:nth-child(4), .kanban-card:nth-child(4), .doc-row:nth-child(4) { animation-delay: 120ms; }
.stat-card:nth-child(5), .gate-card:nth-child(5), .kanban-card:nth-child(5), .doc-row:nth-child(5) { animation-delay: 160ms; }
.stat-card:nth-child(6), .gate-card:nth-child(6), .kanban-card:nth-child(6), .doc-row:nth-child(6) { animation-delay: 200ms; }
.btn, .nav-item, .date-chip, .slot-chip, .kanban-card, .role-card, input, select, textarea {
  transition-duration: 150ms; transition-timing-function: var(--ease-move);
}

@media (max-width: 1100px) {
  .panel-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .screen-root { padding: 22px 20px 40px; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  h1 { font-size: 36px; line-height: 44px; }
  h2 { font-size: 28px; line-height: 36px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 34px; }
  .hero-media { order: -1; }
  .site-nav { display: none; }
  .booking-layout { grid-template-columns: 1fr; }
  .panel-layout { grid-template-columns: 1fr; }
  .side-nav {
    flex-direction: row; overflow-x: auto; overflow-y: hidden; position: static; max-height: none;
    border-right: none; border-bottom: 1px solid var(--line); padding: 8px 10px; gap: 6px;
  }
  .nav-item { flex: 0 0 auto; width: auto; padding: 8px 10px; font-size: 14px; }
  .nav-item.active::after { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: 1fr; }
  .app-bar { padding: 10px 14px; gap: 10px; }
  .app-bar-actions { width: 100%; margin-left: 0; }
}

@media (max-width: 620px) {
  h1 { font-size: 32px; line-height: 40px; }
  h2 { font-size: 26px; line-height: 34px; }
  h3 { font-size: 20px; line-height: 28px; }
  .section { padding: 40px 16px; }
  .site-header { padding: 10px 16px; gap: 12px; }
  .header-actions { margin-left: 0; width: 100%; }
  .header-actions .btn { flex: 1; }
  .hero { padding: 24px 16px 30px; }
  .hero-facts { gap: 16px; }
  .service-grid, .steps { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .role-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-root { padding: 16px 12px 36px; }
  .page-head h1 { font-size: 26px; line-height: 32px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card strong { font-size: 24px; line-height: 28px; }
  .kanban-col { flex-basis: 240px; }
  .kv { grid-template-columns: 1fr; }
  .modal-root { padding: 8px; }
  .modal-card { max-height: calc(100vh - 16px); }
  .inline-form { display: grid; }
  .inline-form .field { min-width: 0; }
  .toast { left: 12px; right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-copy, .section-head, .service-grid, .steps, .booking-layout,
  .screen-root > *, .stat-card, .gate-card, .kanban-card, .doc-row, .photo-thumb,
  .modal-card, .toast { animation: none !important; }
  .btn:hover, .stat-card.clickable:hover, .kanban-card:hover, .role-card:hover { transform: none; }
}
