:root {
  --forest: #1F4D3A;
  --green: #2E7D5B;
  --sun: #F2B705;
  --coral: #E4572E;
  --sky: #2C7DA0;
  --sand: #F7F3E8;
  --ink: #1D2B26;
  --muted: #6B7A72;
  --line: #DCE3DE;
  --white: #FFFFFF;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(29, 43, 38, .08);
  --shadow-hover: 0 16px 38px rgba(29, 43, 38, .14);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --topbar-h: 74px;
  --sidebar-w: 248px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--sand);
  color: var(--ink);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: Manrope, "Segoe UI", system-ui, Arial, sans-serif; color: var(--ink); margin: 0 0 .4em; line-height: 1.18; letter-spacing: -.01em; }
h1 { font-size: 42px; font-weight: 800; }
h2 { font-size: 28px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
h4 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 1em; }
small { font-size: 13px; }
::selection { background: var(--sun); color: var(--ink); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--forest);
  color: var(--white);
  border-radius: 10px;
  transition: top 150ms var(--ease);
}
.skip-link:focus { top: 12px; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 22px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 44px; height: 44px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-family: Manrope, system-ui, sans-serif; font-size: 18px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.brand-text span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.topbar-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; min-width: 0; }
.mode-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--sand);
  font-size: 12px;
  white-space: nowrap;
  max-width: 250px;
  overflow: hidden;
}
.mode-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); flex: none; }
.mode-pill.is-demo .dot { background: var(--coral); }
.mode-pill.is-server .dot { background: var(--green); }
.mode-pill.is-server { background: #EDF6F1; }
.mode-pill span:last-child { overflow: hidden; text-overflow: ellipsis; }
.role-switch { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.role-switch select {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236B7A72' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  padding: 8px 30px 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  max-width: 170px;
}
.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  text-align: left;
  transition: background 150ms var(--ease);
}
.user-chip:hover { background: var(--sand); border-color: var(--line); }
.user-chip img { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-meta strong { font-size: 13px; line-height: 1.2; white-space: nowrap; }
.user-meta small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.icon-btn {
  position: relative;
  width: 42px; height: 42px;
  display: inline-grid; place-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: background 150ms var(--ease), transform 150ms var(--ease);
}
.icon-btn:hover { background: var(--sand); transform: translateY(-1px); }
.badge-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: var(--coral);
  color: var(--white);
  font-size: 11px; font-style: normal; font-weight: 600;
  line-height: 1;
}
.only-mobile { display: none; }
.burger, .burger::before, .burger::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--forest);
}
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  align-items: start;
  max-width: 1600px;
  margin: 0 auto;
}
.sidebar {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 20px 14px 24px;
  border-right: 1px solid var(--line);
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 35;
}
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-caption {
  margin: 16px 10px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-caption:first-child { margin-top: 0; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 11px;
  border-radius: 11px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}
.nav-item img { width: 22px; height: 22px; flex: none; }
.nav-item span { flex: 1; min-width: 0; }
.nav-item:hover { background: var(--sand); }
.nav-item.active { background: var(--forest); color: var(--white); }
.nav-item.active img { filter: brightness(0) invert(1); opacity: .95; }
.nav-item.active .nav-badge { background: var(--sun); color: var(--ink); }
.nav-item[hidden] { display: none; }
.nav-badge {
  min-width: 20px; height: 20px;
  display: inline-grid; place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--sand);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px; font-style: normal; font-weight: 600;
}
.nav-badge.warn:not(:empty) { background: #FDF2E8; border-color: #F6D3BE; color: var(--coral); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.sos-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border-radius: 14px;
  background: var(--forest);
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sos-pattern { position: absolute; right: -30px; bottom: -8px; width: 180px; opacity: .28; }
.sos-card strong { position: relative; font-size: 14px; }
.sos-card span { position: relative; font-size: 12px; opacity: .8; }
.link-arrow { position: relative; color: var(--sun); text-decoration: none; font-size: 12px; font-weight: 600; margin-top: 6px; }
.sidebar-note { font-size: 11px; line-height: 1.45; color: var(--muted); margin: 0 4px; }

.main { min-width: 0; padding: 26px 30px 40px; }
.screen { min-width: 0; }
.screen-body { min-width: 0; opacity: 0; transform: translateY(12px); }
.screen-body.is-in { animation: rise 260ms var(--ease) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; margin-bottom: 22px;
}
.page-head-text { min-width: 0; }
.page-title { font-size: 40px; margin: 0 0 4px; }
.page-sub { margin: 0; color: var(--muted); max-width: 75ch; font-size: 15px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 14px; font-weight: 600;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 150ms var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(242, 183, 5, .75);
  outline-offset: 2px;
}
.btn-primary { background: var(--sun); color: var(--ink); border-color: #E2AC04; }
.btn-ghost { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--sand); }
.btn-light { background: var(--white); color: var(--forest); border-color: var(--white); }
.btn-danger { background: #FBEDE8; border-color: #F3C9BC; color: var(--coral); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn-xs { min-height: 30px; padding: 4px 9px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.link { color: var(--green); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.link:hover { text-decoration: underline; }
.link-btn { border: 0; background: none; padding: 0; color: var(--green); font-size: 12px; text-decoration: underline; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  border-top: 4px solid var(--line);
  min-width: 0;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-green { border-top-color: var(--green); }
.kpi-sun { border-top-color: var(--sun); }
.kpi-coral { border-top-color: var(--coral); }
.kpi-sky { border-top-color: var(--sky); }
.kpi-muted { border-top-color: var(--muted); }
.kpi-label { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.kpi-value { margin: 0; font-size: 27px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; word-break: break-word; }
.kpi-hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  min-width: 0;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 20px; }
.panel-head h4 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-2 > .panel { margin-bottom: 0; }
.grid-2 { margin-bottom: 20px; }
.row-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.chart { width: 100%; height: auto; display: block; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { width: 150px; height: 150px; flex: none; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 140px; }
.donut-legend li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.donut-legend li strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.shift-list, .lead-list, .squad-list, .notif-list, .event-list, .approved-list, .mini-bookings, .history-simple, .version-list { list-style: none; margin: 0; padding: 0; }
.shift-list li, .lead-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.shift-list li:last-child, .lead-list li:last-child { border-bottom: 0; }
.shift-list-main, .lead-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.shift-list-main strong, .lead-main strong { font-size: 14px; }
.shift-list-main span, .lead-main span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.avatar-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--sand); display: grid; place-items: center; flex: none; }
.cap { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.cap-bar { height: 8px; width: 86px; background: var(--line); border-radius: 999px; overflow: hidden; flex: none; }
.cap-bar span { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.cap small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.photo-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.photo-tile { border: 0; padding: 0; background: var(--sand); border-radius: 12px; overflow: hidden; text-align: left; position: relative; transition: transform 180ms var(--ease); }
.photo-tile:hover { transform: translateY(-2px); }
.photo-tile img { display: block; width: 100%; height: 120px; object-fit: cover; }
.photo-tile span { display: block; padding: 8px 10px; font-size: 12px; color: var(--ink); background: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-green { background: #E8F4EE; color: #1E6647; }
.badge-sun { background: #FEF5D8; color: #7A5C02; }
.badge-coral { background: #FBEDE8; color: #A6381D; }
.badge-sky { background: #E6F1F6; color: #1E5F7A; }
.badge-muted { background: var(--sand); color: var(--muted); border: 1px solid var(--line); }
.flag { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-style: normal; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.flag-vip { background: var(--sun); color: var(--ink); }
.flag-urgent { background: #FBE3DB; color: #A6381D; border: 1px solid #F3C5B7; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.tone-green { background: var(--green); }
.tone-sun { background: var(--sun); }
.tone-coral { background: var(--coral); }
.tone-sky { background: var(--sky); }
.tone-muted { background: var(--muted); }

.segbar { display: flex; gap: 3px; margin-top: 8px; }
.seg { height: 5px; flex: 1; border-radius: 3px; background: var(--line); }
.seg.on { background: var(--green); }

.toolbar {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 16px;
}
.toolbar-count { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; align-self: center; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.field > span { font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  min-width: 0;
}
.field textarea { resize: vertical; min-height: 70px; }
.field.search { position: relative; min-width: 220px; flex: 1 1 220px; }
.field.search img { position: absolute; left: 10px; bottom: 11px; opacity: .65; }
.field.search input { padding-left: 34px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink); min-height: 40px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.seg-toggle { display: inline-flex; background: var(--sand); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg-toggle button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg-toggle button.active { background: var(--white); color: var(--ink); box-shadow: 0 2px 6px rgba(29,43,38,.08); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}
.chip:hover { background: var(--sand); }
.chip.active { background: var(--forest); border-color: var(--forest); color: var(--white); }

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.table { width: 100%; border-collapse: collapse; min-width: 720px; }
.table th, .table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13px; }
.table th { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--sand); font-weight: 600; white-space: nowrap; }
.table tbody tr { transition: background 150ms var(--ease); }
.table tbody tr:hover { background: #FBFAF5; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr[data-action] { cursor: pointer; }
.table-compact { min-width: 620px; }
.td-actions { white-space: nowrap; }
.td-actions .btn { margin-right: 3px; }
.row-low { background: #FFFBED; }
.row-out { background: #FDF3EF; }
.person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.person img { border-radius: 50%; flex: none; }
.person div { display: flex; flex-direction: column; min-width: 0; }
.person strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.person span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.stock-name { display: flex; align-items: center; gap: 9px; }
.stock-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--sand); display: grid; place-items: center; flex: none; }
.stock-name div { display: flex; flex-direction: column; }

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 12px;
  scroll-snap-type: x proximity;
}
.kanban-col {
  background: #EFEBDF;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  min-height: 260px;
  transition: background 150ms var(--ease), border-color 150ms var(--ease);
  scroll-snap-align: start;
}
.kanban-col.drag-over { background: #FFF7DA; border-color: var(--sun); }
.kanban-col header { display: flex; align-items: center; gap: 6px; padding: 2px 4px 8px; }
.kanban-col header h3 { font-size: 13px; margin: 0; flex: 1; }
.kanban-col header em { font-style: normal; font-size: 11px; color: var(--muted); }
.kanban-track { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.kanban-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 12px;
  padding: 10px 11px;
  box-shadow: 0 1px 2px rgba(29,43,38,.04);
  transition: transform 150ms var(--ease), box-shadow 180ms var(--ease);
  cursor: pointer;
  min-width: 0;
}
.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kanban-card.dragging { opacity: .6; transform: scale(1.02); box-shadow: var(--shadow-hover); }
.kanban-card.is-urgent { border-left-color: var(--coral); }
.kanban-card.is-vip { border-top: 3px solid var(--sun); }
.kc-top { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.kc-top strong { font-size: 12px; margin-right: auto; }
.kc-title { margin: 6px 0 2px; font-size: 14px; font-weight: 600; }
.kc-sub { margin: 0 0 6px; font-size: 11px; color: var(--muted); line-height: 1.35; }
.kc-foot { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 600; }
.kc-note { display: block; margin-top: 6px; font-size: 10px; color: var(--coral); font-weight: 600; }
.kanban-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 22px 6px; margin: 0; border: 1px dashed var(--line); border-radius: 10px; }
.legend-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); margin: 8px 0 20px; }
.legend-row i { margin-right: 4px; }

.shift-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 20px; }
.shift-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; transition: transform 180ms var(--ease), box-shadow 180ms var(--ease); }
.shift-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.shift-cover { position: relative; }
.shift-cover img { display: block; width: 100%; height: 160px; object-fit: cover; }
.shift-cover .badge { position: absolute; top: 10px; left: 10px; }
.shift-body { padding: 14px 16px 16px; }
.shift-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.shift-top h3 { margin: 0 0 2px; font-size: 18px; }
.shift-top p { margin: 0; font-size: 12px; }
.shift-desc { font-size: 13px; color: var(--muted); margin: 9px 0; min-height: 36px; }
.shift-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); }
.shift-meta span { display: inline-flex; align-items: center; gap: 5px; }
.shift-meta img { width: 16px; height: 16px; }
.cap-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; font-size: 12px; color: var(--muted); }
.cap-row .cap { min-width: 140px; }
.stage-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.stage-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: var(--sand); border: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.stage-chip.done { background: #E8F4EE; border-color: #CBE6D8; color: #1E6647; }
.stage-chip span { font-weight: 700; }
.approved-docs { font-size: 11px; color: var(--ink); margin: 8px 0; line-height: 1.4; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.stage-list { display: flex; flex-direction: column; gap: 7px; }
.stage-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.stage-item.done { background: #F2F9F5; border-color: #CBE6D8; }
.stage-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--sand); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.stage-item.done .stage-dot { background: var(--green); color: var(--white); }
.stage-item .btn { margin-left: auto; }
.squad-list li { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.squad-list li:last-child { border-bottom: 0; }
.squad-list li > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.squad-list strong { font-size: 13px; }
.squad-list span { font-size: 11px; color: var(--muted); }
.squad-list small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.squad-list img { border-radius: 50%; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.photo-card { margin: 0; background: var(--sand); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.photo-btn { display: block; border: 0; padding: 0; background: none; width: 100%; }
.photo-card img { display: block; width: 100%; height: 150px; object-fit: cover; transition: transform 180ms var(--ease); }
.photo-card:hover img { transform: scale(1.02); }
.photo-card figcaption { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; background: var(--white); font-size: 12px; }
.photo-card figcaption span { color: var(--muted); font-size: 11px; }
.empty { text-align: center; padding: 26px 16px; color: var(--muted); }
.empty img { display: block; margin: 0 auto 10px; max-width: 200px; }
.empty h3 { color: var(--ink); font-size: 17px; margin: 0 0 4px; }
.empty p { font-size: 13px; max-width: 42ch; margin: 0 auto 12px; }

.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.report-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--sand); }
.report-card strong { font-size: 14px; }
.report-card span { font-size: 12px; color: var(--muted); }
.report-card .btn { align-self: flex-start; margin-top: 4px; }

.calendar { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--sand); }
.cal-head span { padding: 8px 10px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-cell { min-height: 96px; padding: 6px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.is-empty { background: #FCFBF7; }
.cal-cell.is-today { background: #FFF9E6; }
.cal-day { font-size: 12px; color: var(--muted); font-weight: 600; }
.cal-event {
  display: block; width: 100%; text-align: left;
  border: 0; border-radius: 6px; padding: 3px 5px;
  font-size: 10px; line-height: 1.25; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal-event.tone-green { background: #E8F4EE; }
.cal-event.tone-sky { background: #E6F1F6; }
.cal-event.tone-coral { background: #FBEDE8; }
.cal-event.tone-sun { background: #FEF5D8; }
.event-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.event-list li:last-child { border-bottom: 0; }
.date-box { width: 42px; height: 44px; border-radius: 10px; background: var(--sand); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.date-box strong { font-size: 15px; line-height: 1; }
.date-box small { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.event-list li > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.event-list li > div strong { font-size: 13px; }
.event-list li > div span { font-size: 11px; }

.notif-list li { display: flex; gap: 11px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notif-list li:last-child { border-bottom: 0; }
.notif-list li.is-unread { background: #FFFDF4; margin: 0 -10px; padding: 12px 10px; border-radius: 10px; }
.notif-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--sand); display: grid; place-items: center; flex: none; }
.notif-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.notif-main strong { font-size: 13px; }
.notif-main span { font-size: 12px; color: var(--muted); }
.notif-main small { font-size: 11px; color: var(--muted); }
.notif-list .row-gap { flex: none; }

.doc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 20px; }
.doc-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.doc-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.doc-head > div { flex: 1; min-width: 0; }
.doc-head h3 { font-size: 16px; margin: 0 0 2px; overflow-wrap: anywhere; }
.doc-head p { margin: 0; font-size: 11px; }
.doc-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--sand); display: grid; place-items: center; flex: none; }
.version-list { display: flex; flex-direction: column; gap: 8px; }
.version { display: flex; gap: 10px; justify-content: space-between; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #FCFBF7; align-items: flex-start; }
.version.approved { background: #F2F9F5; border-color: #CBE6D8; }
.version.rejected { background: #FDF3EF; border-color: #F3C9BC; }
.version-main { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.version-main strong { font-size: 12px; }
.version-main span { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.version-main small { font-size: 11px; color: var(--muted); }
.version-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.version-side .row-gap { justify-content: flex-end; }
.approved-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.approved-list li:last-child { border-bottom: 0; }
.approved-list li > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.approved-list strong { font-size: 13px; }
.approved-list span { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.doc-upload .form-row { align-items: flex-end; }

.diary-feed { display: flex; flex-direction: column; gap: 16px; }
.diary-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.diary-card header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.diary-card header h2 { font-size: 20px; margin: 0 0 2px; }
.diary-card header p { margin: 0; font-size: 12px; }
.diary-date { width: 50px; height: 54px; border-radius: 12px; background: var(--forest); color: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.diary-date strong { font-size: 19px; line-height: 1; }
.diary-date span { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.diary-text { font-size: 14px; max-width: 72ch; }
.diary-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.diary-photos.one { grid-template-columns: 1fr; }
.diary-photo { border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--sand); }
.diary-photo img { display: block; width: 100%; height: 210px; object-fit: cover; transition: transform 180ms var(--ease); }
.diary-photos.one .diary-photo img { height: 320px; }
.diary-photo:hover img { transform: scale(1.02); }
.diary-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.diary-mini { display: flex; gap: 12px; background: var(--sand); border-radius: 13px; overflow: hidden; }
.diary-mini img { width: 130px; height: 120px; object-fit: cover; flex: none; }
.diary-mini div { padding: 10px 10px 10px 0; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.diary-mini h3 { font-size: 15px; margin: 0; }
.diary-mini p { font-size: 12px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.diary-mini .muted { font-size: 11px; }

.chat-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.chat-threads { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.thread { display: flex; gap: 9px; align-items: center; border: 1px solid transparent; background: transparent; padding: 9px; border-radius: 12px; text-align: left; }
.thread:hover { background: var(--sand); }
.thread.active { background: var(--sand); border-color: var(--line); }
.thread img { border-radius: 50%; flex: none; }
.thread > div { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.thread strong { font-size: 13px; }
.thread span { font-size: 11px; color: var(--muted); }
.thread small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .badge-count { position: static; margin-left: auto; }
.chat-pane { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-head .person { display: flex; gap: 9px; align-items: center; }
.chat-head .person div { display: flex; flex-direction: column; }
.chat-head .person strong { font-size: 14px; }
.chat-head .person span { font-size: 12px; color: var(--muted); }
.chat-scroll { height: 430px; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; background: #FCFBF7; }
.msg-row { display: flex; }
.msg-row.me { justify-content: flex-end; }
.msg { max-width: 76%; background: var(--white); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 8px 11px; }
.msg-row.me .msg { background: #EAF4EF; border-color: #CBE6D8; border-radius: 14px 14px 4px 14px; }
.msg strong { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.msg p { margin: 0 0 2px; font-size: 13px; }
.msg small { font-size: 10px; color: var(--muted); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-form textarea { flex: 1; min-height: 46px; max-height: 110px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; resize: vertical; }
.chat-pane .form-note { padding: 0 16px 12px; margin: 0; }
.chat-preview { display: flex; flex-direction: column; gap: 8px; }
.bubble { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #FCFBF7; max-width: 92%; }
.bubble.me { background: #EAF4EF; border-color: #CBE6D8; align-self: flex-end; }
.bubble strong { font-size: 11px; color: var(--muted); display: block; }
.bubble p { margin: 2px 0; font-size: 13px; }
.bubble small { font-size: 10px; color: var(--muted); }
.hero-mini { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.hero-mini img { width: 100%; height: 190px; object-fit: cover; }
.hero-mini > div { padding: 18px 22px; display: flex; flex-direction: column; justify-content: center; }
.hero-mini h2 { font-size: 26px; margin: 0 0 4px; }
.hero-mini p { font-size: 13px; color: var(--muted); }
.booking-mini-list { display: flex; flex-direction: column; gap: 9px; }
.booking-mini { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #FCFBF7; }
.booking-mini > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.booking-mini strong { font-size: 13px; }
.booking-mini span { font-size: 11px; color: var(--muted); }

.store-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--forest);
  color: var(--white);
  margin-bottom: 20px;
}
.store-hero > img { order: 2; width: 100%; height: 100%; min-height: 330px; object-fit: cover; }
.store-hero-text { order: 1; padding: 36px 34px; display: flex; flex-direction: column; justify-content: center; }
.store-hero-text .eyebrow { color: #C9DCD1; }
.store-hero-text h1 { color: var(--white); font-size: 44px; max-width: 15ch; }
.store-hero-text p { color: #E4EEE8; max-width: 46ch; font-size: 15px; }
.store-hero-text .btn { margin-top: 6px; }
.trust-chips { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 0; margin: 16px 0 0; }
.trust-chips li { font-size: 11px; padding: 4px 9px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; color: #E4EEE8; }
.store-catalog .panel-head .field { min-width: 260px; max-width: 380px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.store-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-width: 0; transition: transform 180ms var(--ease), box-shadow 180ms var(--ease); }
.store-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.store-media { position: relative; height: 165px; background: var(--sand); }
.store-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-media .badge { position: absolute; top: 9px; left: 9px; }
.store-pattern { display: grid; place-items: center; background: var(--sand) url("assets/pattern-pines.svg") center / 90% auto no-repeat; }
.store-pattern img { width: 64px; height: 64px; object-fit: contain; }
.store-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.store-body h3 { font-size: 17px; margin: 0; }
.store-body p { font-size: 12px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.store-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 4px; }
.store-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.feature-photo { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px; align-items: center; }
.feature-photo img { width: 100%; height: 140px; object-fit: cover; border-radius: 12px; }
.feature-photo h3 { font-size: 17px; margin: 0 0 3px; }
.feature-photo p { font-size: 13px; color: var(--muted); margin: 0; }
.lead-panel { background: linear-gradient(180deg, #FFFFFF 0%, #FCFBF7 100%); }
.lead-form .form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lead-form .form-row + .form-row { margin-top: 10px; }
.lead-form > .field { margin-top: 10px; }
.form-grid { display: flex; flex-direction: column; gap: 10px; }
.form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.form-row .field { flex: 1 1 160px; }
.form-row .field.search { flex-basis: 220px; }
.form-note { font-size: 11px; color: var(--muted); margin: 4px 0 0; line-height: 1.5; }
.form-status { min-height: 20px; font-size: 13px; margin: 6px 0 0; }
.form-status.is-ok { color: var(--green); font-weight: 600; }
.form-status.is-error { color: var(--coral); font-weight: 600; }
.consent { align-items: flex-start; }
.consent input { margin-top: 3px; }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.faq details p { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #FCFBF7; }
.switch-row > span { display: flex; flex-direction: column; min-width: 0; }
.switch-row strong { font-size: 13px; }
.switch-row small { font-size: 11px; color: var(--muted); }
.switch-row input[type="checkbox"] { width: 44px; height: 26px; flex: none; appearance: none; background: var(--line); border-radius: 999px; position: relative; transition: background 150ms var(--ease); cursor: pointer; }
.switch-row input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); transition: transform 150ms var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.switch-row input[type="checkbox"]:checked { background: var(--green); }
.switch-row input[type="checkbox"]:checked::after { transform: translateX(18px); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(29,43,38,.45); display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(760px, 100%); max-height: 92vh; overflow-y: auto; background: var(--white); border-radius: 18px; box-shadow: 0 30px 70px rgba(29,43,38,.3); animation: pop 200ms var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--white); z-index: 1; }
.modal-head h2 { font-size: 20px; margin: 0; overflow-wrap: anywhere; }
.modal-body { padding: 18px 20px 22px; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.detail-head h3 { margin: 0 0 2px; }
.detail-head p { margin: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.detail-grid > div { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; background: var(--sand); border-radius: 10px; min-width: 0; }
.detail-grid span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.detail-grid strong { font-size: 13px; overflow-wrap: anywhere; }
.stage-block { padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.stage-block .panel-head { margin-bottom: 6px; }
.history { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.history h4 { margin-bottom: 8px; }
.history ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.history li, .history-simple li { display: flex; flex-direction: column; gap: 1px; padding-left: 12px; border-left: 2px solid var(--line); }
.history li span, .history-simple li span { font-size: 10px; color: var(--muted); }
.history li strong, .history-simple li strong { font-size: 12px; font-weight: 600; }
.history li small, .history-simple li small { font-size: 10px; color: var(--muted); }
.status-editor { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.status-editor .field { min-width: 200px; }
.mini-bookings li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mini-bookings li:last-child { border-bottom: 0; }
.mini-bookings li > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mini-bookings strong { font-size: 12px; }
.mini-bookings span { font-size: 11px; color: var(--muted); }
.pay-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.pay-summary > div { background: var(--sand); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; }
.pay-summary span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pay-summary strong { font-size: 14px; }
.modal-photo { display: block; width: 100%; max-height: 62vh; object-fit: contain; background: var(--sand); border-radius: 12px; margin-bottom: 10px; }
.profile-card { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.profile-card img { border-radius: 50%; }
.profile-card h3 { margin: 0; }
.profile-card p { margin: 0; }
.demo-creds { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--sand); display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.demo-creds strong { color: var(--ink); font-size: 12px; }
.login-tabs { display: flex; gap: 6px; margin-bottom: 12px; }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 150; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 36px)); }
.toast { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 12px; padding: 10px 13px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 1px; animation: toastIn 220ms var(--ease); }
.toast strong { font-size: 12px; }
.toast span { font-size: 12px; color: var(--muted); }
.toast-error { border-left-color: var(--coral); }
.toast.out { animation: toastOut 180ms cubic-bezier(0.4, 0, 1, 1) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

.app-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 4px 0; font-size: 11px; color: var(--muted); }
.chat-scroll .empty { padding: 10px; }

@media (max-width: 1199px) {
  :root { --sidebar-w: 220px; }
  .main { padding: 22px 22px 34px; }
  .page-title { font-size: 34px; }
  .store-hero-text h1 { font-size: 36px; }
  .mode-pill { max-width: 190px; }
  .user-meta { display: none; }
}

@media (max-width: 1000px) {
  .only-mobile { display: inline-grid; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: min(300px, 86vw);
    height: 100vh;
    padding-top: 20px;
    transform: translateX(-102%);
    transition: transform 200ms var(--ease);
    box-shadow: var(--shadow-hover);
  }
  .sidebar.open { transform: translateX(0); }
  .main { padding: 18px 18px 34px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .hero-mini { grid-template-columns: 240px minmax(0, 1fr); }
  .chat-layout { grid-template-columns: 250px minmax(0, 1fr); }
  .store-hero-text { padding: 28px 24px; }
  .store-hero-text h1 { font-size: 32px; }
  .photo-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-form .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .topbar { gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
  .brand-text span { display: none; }
  .brand img { width: 38px; height: 38px; }
  .brand-text strong { font-size: 16px; }
  .topbar-tools { gap: 7px; }
  .mode-pill { display: none; }
  .role-switch .role-switch-label { display: none; }
  .role-switch select { max-width: 128px; font-size: 12px; padding-right: 26px; }
  .icon-btn { width: 38px; height: 38px; }
  .topbar .btn-sm { padding: 6px 9px; font-size: 12px; min-height: 36px; }
  .main { padding: 14px 12px 28px; }
  .page-head { flex-direction: column; align-items: stretch; margin-bottom: 16px; }
  .page-actions { justify-content: flex-start; }
  .page-title { font-size: 30px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .kpi { padding: 12px; border-radius: 14px; }
  .kpi-value { font-size: 21px; }
  .panel { padding: 14px; border-radius: 14px; }
  .photo-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-tile img { height: 96px; }
  .hero-mini { grid-template-columns: 1fr; }
  .hero-mini img { height: 170px; }
  .diary-preview-grid { grid-template-columns: 1fr; }
  .store-hero { grid-template-columns: 1fr; }
  .store-hero > img { order: 1; min-height: 210px; height: 210px; }
  .store-hero-text { order: 2; padding: 22px 18px; }
  .store-hero-text h1 { font-size: 30px; }
  .store-grid { grid-template-columns: 1fr; }
  .feature-photo { grid-template-columns: 1fr; }
  .feature-photo img { height: 170px; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-threads { flex-direction: row; overflow-x: auto; }
  .thread { min-width: 210px; }
  .chat-scroll { height: 360px; }
  .doc-grid { grid-template-columns: 1fr; }
  .version { flex-direction: column; }
  .version-side { align-items: flex-start; }
  .diary-photos { grid-template-columns: 1fr; }
  .diary-photo img, .diary-photos.one .diary-photo img { height: 220px; }
  .diary-mini img { width: 100px; height: 100px; }
  .calendar { overflow-x: auto; }
  .cal-grid, .cal-head { min-width: 620px; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-summary { grid-template-columns: 1fr; }
  .lead-form .form-row { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; align-items: stretch; }
  .form-row .field { flex: 1 1 auto; }
  .app-foot { flex-direction: column; }
  .store-catalog .panel-head .field { min-width: 100%; max-width: none; }
}

@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .photo-strip { grid-template-columns: 1fr; }
  .topbar-tools .user-chip { display: none; }
  .modal { max-height: 94vh; }
  .modal-body { padding: 14px 14px 18px; }
  .detail-grid { grid-template-columns: 1fr; }
  .toolbar { padding: 9px; gap: 7px; }
  .toolbar-count { margin-left: 0; }
}

.role-switch select { background-image: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .screen-body { opacity: 1; transform: none; animation: none; }
  .modal, .toast { animation: none; }
}
