:root {
  --cream: #FFF8EC;
  --sand: #F3E7D3;
  --char: #1F2937;
  --amber: #F59E0B;
  --forest: #14532D;
  --forest-hover: #0F3D2E;
  --muted: #6B7280;
  --success: #15803D;
  --warning: #B45309;
  --danger: #B91C1C;
  --info: #0EA5E9;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(20, 83, 45, .08);
  --shadow-hover: 0 16px 34px rgba(20, 83, 45, .14);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --font: "Manrope", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 64px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--char); font-family: var(--font);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--forest-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.01em; font-weight: 800; }
h1 { font-size: clamp(28px, 4vw, 48px); }
h2 { font-size: clamp(24px, 2.6vw, 32px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--muted); }
.h-icon { display: inline-block; width: 26px; height: 26px; vertical-align: -5px; margin-right: 8px; }
.small { font-size: 13px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--forest); color: var(--cream); padding: 10px 16px; z-index: 200; }
.skip-link:focus { left: 12px; top: 12px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.hidden, [hidden] { display: none !important; }

.demo-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--forest); color: var(--cream); padding: 7px 16px; font-size: 13px;
}
.demo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.demo-label { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }
.role-switch { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.role-switch select { background: rgba(255,248,236,.12); color: var(--cream); border: 1px solid rgba(255,248,236,.35); border-radius: 8px; padding: 4px 8px; }
.role-switch select option { color: var(--char); background: var(--cream); }
.server-badge { font-size: 11px; border: 1px solid rgba(255,248,236,.35); border-radius: 999px; padding: 2px 9px; }
.server-badge.online { border-color: var(--amber); color: var(--amber); }

.site-header {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 20px;
  min-height: var(--header-h); padding: 10px clamp(16px, 4vw, 40px);
  background: rgba(255,248,236,.96); border-bottom: 1px solid var(--sand); backdrop-filter: blur(8px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; text-decoration: none; color: var(--forest); }
.brand-light, .brand-light:hover { color: var(--cream); }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-btn { border: 0; background: transparent; padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; min-height: 44px; }
.nav-btn:hover { background: var(--sand); }
.nav-btn.active { background: var(--forest); color: var(--cream); }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.header-actions .btn { white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; padding: 11px 18px; min-height: 44px;
  font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: transform 140ms var(--ease), box-shadow 140ms var(--ease), background 140ms var(--ease), color 140ms var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--forest); color: var(--cream); }
.btn-primary:hover { background: var(--forest-hover); color: var(--cream); box-shadow: var(--shadow); }
.btn-accent { background: var(--amber); color: var(--char); }
.btn-accent:hover { background: var(--amber); color: var(--char); filter: brightness(.94); box-shadow: var(--shadow); }
.btn-light { background: var(--cream); color: var(--forest); border-color: var(--sand); }
.btn-ghost { background: transparent; border-color: var(--sand); color: var(--forest); }
.btn-ghost:hover { background: var(--sand); }
.btn-danger { background: var(--danger); color: var(--cream); }
.btn-sm { padding: 7px 12px; min-height: 36px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.icon-btn { border: 1px solid var(--sand); background: var(--cream); border-radius: 8px; width: 38px; height: 38px; font-size: 22px; line-height: 1; cursor: pointer; }
.link-btn { border: 0; background: none; color: var(--info); padding: 0; cursor: pointer; font-weight: 600; text-decoration: underline; }

.page-width { width: min(1200px, 100% - 32px); margin-inline: auto; }
.view { animation: fadeUp 220ms var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.hero { position: relative; min-height: min(74vh, 640px); display: flex; align-items: center; overflow: hidden; background: var(--forest); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,83,45,.94) 0%, rgba(20,83,45,.78) 38%, rgba(20,83,45,.16) 72%); }
.hero-text { position: relative; z-index: 2; width: min(1200px, 100% - 32px); margin-inline: auto; color: var(--cream); padding: 56px 0; }
.hero-text h1 { max-width: 15ch; color: var(--cream); }
.hero-text p { max-width: 52ch; font-size: 18px; color: rgba(255,248,236,.94); }
.eyebrow { display: inline-block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--amber); margin-bottom: 10px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 18px; }
.hero-facts { list-style: none; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.hero-facts li { display: inline-flex; align-items: center; gap: 7px; }
.hero-facts img { width: 20px; height: 20px; filter: brightness(0) invert(1); opacity: .9; }

.section { padding: clamp(36px, 6vw, 64px) 0 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card { background: var(--cream); border: 1px solid var(--sand); border-radius: var(--radius); padding: 18px; box-shadow: 0 2px 10px rgba(20,83,45,.03); transition: transform 150ms var(--ease), box-shadow 150ms var(--ease); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card h3 { margin-bottom: 6px; }
.card p { margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.card-icon { width: 44px; height: 44px; display: grid; place-items: center; background: var(--sand); border-radius: 12px; margin-bottom: 12px; }
.card-icon img { width: 26px; height: 26px; }
.camp-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.camp-card img { width: 100%; height: 180px; object-fit: cover; }
.camp-card .card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.camp-card .card-body .btn { margin-top: auto; align-self: flex-start; }
.session-card { display: flex; flex-direction: column; gap: 8px; }
.session-card .thumb { width: 100%; height: 150px; object-fit: cover; border-radius: 12px; }
.session-card .meta-row { display: flex; flex-wrap: wrap; gap: 6px; }
.session-card .price { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--forest); }
.session-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--sand); color: var(--char); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-amber { background: rgba(245,158,11,.2); }
.chip-success { background: rgba(21,128,61,.13); color: var(--success); }
.chip-danger { background: rgba(185,28,28,.12); color: var(--danger); }
.chip-warning { background: rgba(180,83,9,.13); color: var(--warning); }
.chip-info { background: rgba(14,165,233,.14); color: var(--info); }
.chip-forest { background: var(--forest); color: var(--cream); }
.vip { box-shadow: inset 4px 0 0 var(--amber); }
.urgent { box-shadow: inset 4px 0 0 var(--danger); }

.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; background: var(--sand); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.filters label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--forest); }
.filters .check { flex-direction: row; align-items: center; gap: 8px; align-self: end; min-height: 44px; }
.filters .search { grid-column: span 2; }
.filters input, .filters select, .field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--sand); background: var(--cream); border-radius: 9px; padding: 10px 11px; min-height: 42px;
}
.filters input:focus, .filters select:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--amber); outline: 2px solid rgba(245,158,11,.28); }
.filter-actions { display: flex; gap: 8px; align-items: end; grid-column: span 2; }
.catalog-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 14px; flex-wrap: wrap; }
.inline-sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.inline-sort select { padding: 7px 9px; border-radius: 8px; border: 1px solid var(--sand); background: var(--cream); }
.empty { text-align: center; padding: 32px 16px; border: 1px dashed var(--sand); border-radius: var(--radius); background: rgba(243,231,211,.35); }
.empty img { width: 150px; margin: 0 auto 12px; }
.empty h3 { margin-bottom: 4px; }
.empty p { margin: 0 auto 12px; color: var(--muted); }

.feature-band { display: grid; grid-template-columns: 1.05fr 1fr; gap: 18px; align-items: stretch; }
.feature-band > img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; border-radius: var(--radius); }
.rounded-img { width: 100%; border-radius: var(--radius); object-fit: cover; }
.square-img { aspect-ratio: 1 / 1; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.timeline { display: grid; gap: 10px; margin-bottom: 16px; }
.timeline-item { background: var(--cream); border: 1px solid var(--sand); border-left: 4px solid var(--amber); border-radius: 10px; padding: 12px 14px; }
.timeline-item time { font-size: 12px; color: var(--muted); font-weight: 600; }
.timeline-item p { margin: 4px 0 0; font-size: 14px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.steps li { background: var(--sand); border-radius: var(--radius); padding: 18px; display: flex; gap: 12px; }
.step-num { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: var(--forest); color: var(--cream); display: grid; place-items: center; font-weight: 800; }
.steps h3 { font-size: 16px; margin-bottom: 4px; }
.steps p { margin: 0; font-size: 13px; color: var(--muted); }

.lead-section { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; background: var(--sand); border-radius: var(--radius); padding: clamp(20px, 3vw, 36px); margin-top: 56px; }
.lead-form { display: grid; gap: 12px; }
.lead-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; }
.lead-form input, .lead-form textarea { border: 1px solid var(--sand); background: var(--cream); border-radius: 9px; padding: 11px 12px; }
.lead-form .consent { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; font-size: 13px; }
.lead-form .consent input { width: auto; min-height: 0; margin-top: 3px; }
.form-status { margin: 0; font-size: 13px; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--danger); }
.contact-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.contact-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }

.site-footer { background: var(--forest); color: var(--cream); margin-top: 64px; padding: 36px 0 18px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid h3 { font-size: 14px; color: var(--amber); text-transform: uppercase; letter-spacing: .06em; }
.footer-grid a { display: block; color: rgba(255,248,236,.85); text-decoration: none; font-size: 14px; padding: 3px 0; }
.footer-grid a:hover { color: var(--cream); text-decoration: underline; }
.footer-grid p { color: rgba(255,248,236,.7); font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255,248,236,.18); margin-top: 24px; padding-top: 14px; font-size: 12px; color: rgba(255,248,236,.7); }

.app-view { background: var(--cream); }
.app-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - var(--header-h) - 34px); }
.app-side { padding: 20px 14px; border-right: 1px solid var(--sand); background: var(--sand); display: flex; flex-direction: column; gap: 14px; }
.app-user { display: flex; align-items: center; gap: 10px; background: var(--cream); border-radius: 12px; padding: 10px; }
.app-user img { border-radius: 50%; }
.app-user strong { display: block; font-size: 14px; }
.side-nav { display: grid; gap: 3px; }
.side-nav button { text-align: left; border: 0; background: transparent; padding: 10px 11px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--char); display: flex; align-items: center; gap: 9px; min-height: 44px; }
.side-nav button img { width: 18px; height: 18px; opacity: .8; }
.side-nav button:hover { background: rgba(255,248,236,.7); }
.side-nav button.active { background: var(--forest); color: var(--cream); }
.side-nav button.active img { filter: brightness(0) invert(1); }
.app-main { min-width: 0; padding: 0 20px 32px; }
.app-topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 0 14px; }
.app-topbar h2 { margin: 0 0 2px; font-size: 24px; }
.app-topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.panel-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--sand); padding-bottom: 2px; margin-bottom: 16px; scrollbar-width: thin; }
.panel-tabs button { border: 0; background: transparent; padding: 11px 13px; white-space: nowrap; border-bottom: 3px solid transparent; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); min-height: 44px; }
.panel-tabs button.active { color: var(--forest); border-bottom-color: var(--amber); }
.panel-tabs button:hover { color: var(--forest); }

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--cream); border: 1px solid var(--sand); border-radius: 14px; padding: 14px; min-width: 0; }
.kpi span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi strong { display: block; font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: 4px; }
.kpi small { color: var(--success); font-size: 12px; }
.charts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.chart-card { background: var(--cream); border: 1px solid var(--sand); border-radius: var(--radius); padding: 16px; min-width: 0; }
.chart-card h3 { font-size: 16px; margin-bottom: 8px; }
.chart-card canvas { width: 100%; height: 190px; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.bar-list { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.bar-track { height: 10px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--forest); border-radius: 999px; transition: width 220ms var(--ease); }
.bar-fill.amber { background: var(--amber); }
.feed { display: grid; gap: 10px; }
.feed-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--sand); }
.feed-item:last-child { border-bottom: 0; }
.feed-item img { width: 22px; height: 22px; margin-top: 2px; }
.feed-item p { margin: 0; font-size: 13px; }
.feed-item time { font-size: 11px; color: var(--muted); }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--sand); border-radius: 12px; padding: 10px; }
.toolbar input, .toolbar select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--sand); background: var(--cream); min-height: 40px; }
.toolbar .grow { flex: 1 1 180px; }
.toolbar label { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--sand); border-radius: 12px; background: var(--cream); }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 680px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--sand); vertical-align: middle; }
th { background: var(--sand); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--forest); white-space: nowrap; }
tbody tr:hover { background: rgba(243,231,211,.45); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-note { font-size: 12px; color: var(--muted); padding: 6px 2px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--sand); }
.tag.success { background: rgba(21,128,61,.13); color: var(--success); }
.tag.warning { background: rgba(180,83,9,.13); color: var(--warning); }
.tag.danger { background: rgba(185,28,28,.12); color: var(--danger); }
.tag.info { background: rgba(14,165,233,.14); color: var(--info); }

.kanban { display: grid; grid-template-columns: repeat(6, minmax(190px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.kanban-col { background: var(--sand); border-radius: 12px; padding: 8px; min-width: 190px; }
.kanban-col.drag-over { outline: 2px dashed var(--amber); outline-offset: -3px; }
.kanban-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 3px 4px 8px; font-size: 12px; font-weight: 800; color: var(--forest); }
.kanban-head .count { background: var(--cream); border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.kanban-cards { display: grid; gap: 8px; min-height: 56px; }
.kcard { background: var(--cream); border: 1px solid var(--sand); border-radius: 10px; padding: 10px; cursor: grab; transition: transform 140ms var(--ease), box-shadow 140ms var(--ease); }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .5; }
.kcard:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kcard h4 { font-size: 13px; margin: 0 0 3px; }
.kcard p { font-size: 12px; color: var(--muted); margin: 0 0 5px; }
.kcard .krow { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; }
.kcard .amount { font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.stagebar { display: flex; gap: 2px; margin: 6px 0 2px; }
.stagebar span { height: 5px; flex: 1; background: var(--sand); border-radius: 2px; }
.stagebar span.on { background: var(--forest); }
.stagebar span.amber { background: var(--amber); }

.segmented { display: inline-flex; background: var(--sand); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; padding: 6px 10px; border-radius: 7px; font-size: 12px; font-weight: 700; cursor: pointer; }
.segmented button.active { background: var(--cream); box-shadow: 0 1px 4px rgba(20,83,45,.12); }

.client-card { display: flex; gap: 12px; align-items: flex-start; }
.client-card img { width: 44px; height: 44px; border-radius: 50%; }
.client-card h3 { margin: 0; font-size: 16px; }
.client-card p { margin: 2px 0; font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-grid .field { background: var(--sand); border-radius: 10px; padding: 10px 12px; }
.detail-grid .field b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
.detail-grid .field span { font-size: 14px; }

.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.photo-card { background: var(--cream); border: 1px solid var(--sand); border-radius: 12px; overflow: hidden; }
.photo-card img { width: 100%; height: 120px; object-fit: cover; }
.photo-card div { padding: 8px 10px; }
.photo-card p { margin: 0; font-size: 12px; }
.photo-card time { font-size: 11px; color: var(--muted); }
.upload-zone { border: 1.5px dashed var(--muted); border-radius: 12px; padding: 16px; background: rgba(243,231,211,.3); font-size: 13px; }
.upload-zone label { font-weight: 700; display: flex; flex-direction: column; gap: 6px; }
.upload-zone input[type=file] { font-size: 12px; }

.doc-list { display: grid; gap: 14px; }
.doc-card { background: var(--cream); border: 1px solid var(--sand); border-radius: var(--radius); padding: 16px; }
.doc-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.versions { display: grid; gap: 8px; }
.version { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--sand); border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.version.approved { border-left: 4px solid var(--success); }
.version.rejected { border-left: 4px solid var(--danger); }
.version.pending { border-left: 4px solid var(--warning); }
.version b { font-size: 13px; }
.version small { color: var(--muted); }

.chat { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; min-height: 380px; min-width: 0; }
.chat > *, .chat-list, .chat-thread { min-width: 0; }
.chat-list { background: var(--sand); border-radius: 12px; padding: 8px; display: grid; align-content: start; gap: 4px; }
.chat-list button { text-align: left; border: 0; background: transparent; padding: 10px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.chat-list button.active { background: var(--cream); }
.chat-thread { border: 1px solid var(--sand); border-radius: 12px; display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--sand); }
.chat-head img { border-radius: 50%; }
.chat-body { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 360px; }
.msg { max-width: 78%; padding: 8px 11px; border-radius: 12px; font-size: 13px; background: var(--sand); }
.msg.me { align-self: flex-end; background: var(--forest); color: var(--cream); }
.msg time { display: block; font-size: 10px; opacity: .65; margin-top: 2px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--sand); }
.chat-form input { flex: 1; border: 1px solid var(--sand); border-radius: 9px; padding: 9px 11px; min-width: 0; }
.quick-chat { align-items: stretch; }
.quick-chat-person { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.quick-chat-person > img { border-radius: 50%; border: 3px solid var(--sand); }
.quick-chat-person .contact-list { margin: 4px 0 8px; }
.quick-chat-thread { background: var(--cream); }
.quick-chat-thread .chat-body { min-height: 168px; max-height: 300px; }
.cabinet-chat { margin: 16px 0; border: 1px solid var(--sand); border-radius: 12px; background: var(--cream); display: flex; flex-direction: column; min-width: 0; }
.cabinet-chat .chat-head { align-items: flex-start; }
.cabinet-chat h3 { margin: 0; font-size: 15px; }
.cabinet-chat .chat-body { min-height: 96px; max-height: 240px; }
.cabinet-chat .chat-form { flex-wrap: wrap; }
.cabinet-chat .chat-form input { flex: 1 1 220px; }
.hero-chat { max-width: 560px; margin-top: 22px; border: 1px solid rgba(255,248,236,.28); border-radius: 12px; background: rgba(20,83,45,.55); backdrop-filter: blur(3px); overflow: hidden; }
.hero-chat-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px 4px; }
.hero-chat-head img { border-radius: 50%; border: 2px solid rgba(255,248,236,.5); flex: 0 0 auto; }
.hero-chat-head b { display: block; color: var(--cream); font-size: 14px; }
.hero-chat-head p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: rgba(255,248,236,.85); max-width: none; }
.hero-chat-form { border-top: 0; padding: 8px 12px 10px; }
.hero-chat-form input { border-color: rgba(255,248,236,.35); background: var(--cream); }
.hero-chat-form .btn { white-space: nowrap; }
.hero-chat-log { padding: 0 12px 10px; max-height: 130px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.hero-chat-log .msg { max-width: 90%; background: rgba(255,248,236,.92); color: var(--char); font-size: 12px; padding: 6px 9px; }
.hero-chat-log .msg.me { background: var(--amber); color: var(--char); }
.hero-chat-log .muted { color: rgba(255,248,236,.8); }
.msg-author { display: block; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; opacity: .72; margin-bottom: 2px; }

.notify-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sand); }
.switch { position: relative; width: 44px; height: 24px; flex: 0 0 44px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--muted); border-radius: 999px; transition: background 150ms var(--ease); cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: var(--cream); border-radius: 50%; transition: transform 150ms var(--ease); }
.switch input:checked + span { background: var(--forest); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }
.log-list { display: grid; gap: 6px; font-size: 12px; max-height: 220px; overflow-y: auto; }
.log-item { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; background: var(--sand); border-radius: 7px; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); display: inline-block; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-bottom: 1px solid var(--sand); }
.notice.unread { background: rgba(245,158,11,.08); }
.notice img { width: 20px; height: 20px; margin-top: 2px; }
.notice p { margin: 0; font-size: 13px; }
.notice time { font-size: 11px; color: var(--muted); }

.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: 11px; font-weight: 800; color: var(--muted); text-align: center; padding: 4px; }
.cal-day { min-height: 84px; background: var(--cream); border: 1px solid var(--sand); border-radius: 8px; padding: 5px; font-size: 11px; overflow: hidden; }
.cal-day.out { background: rgba(243,231,211,.35); color: var(--muted); }
.cal-day .d { font-weight: 800; font-size: 12px; }
.cal-ev { display: block; margin-top: 3px; background: var(--sand); border-left: 2px solid var(--forest); border-radius: 3px; padding: 2px 4px; font-size: 10px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev.amber { border-left-color: var(--amber); }

.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(31,41,55,.55); }
.modal { position: relative; background: var(--cream); border-radius: var(--radius); width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 24px 60px rgba(15,61,46,.3); animation: modalIn 200ms var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: scale(.98) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--sand); position: sticky; top: 0; background: var(--cream); z-index: 2; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 18px; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 150; background: var(--forest); color: var(--cream); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: min(380px, calc(100% - 36px)); animation: toastIn 200ms var(--ease); font-size: 14px; }
.toast.err { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.wizard-progress { display: flex; gap: 6px; margin-bottom: 16px; }
.wizard-progress span { flex: 1; height: 6px; background: var(--sand); border-radius: 3px; }
.wizard-progress span.on { background: var(--forest); }
.wizard-progress span.cur { background: var(--amber); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; }
.field.full { grid-column: 1 / -1; }
.field small { font-weight: 400; color: var(--muted); }
.option-list { display: grid; gap: 8px; }
.option { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid var(--sand); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.option.selected { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); background: rgba(243,231,211,.4); }
.option input { width: auto; }
.summary-lines { display: grid; gap: 6px; margin: 10px 0; }
.summary-lines div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.summary-lines .total { border-top: 1px solid var(--sand); padding-top: 8px; font-weight: 800; font-size: 17px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hint { font-size: 12px; color: var(--muted); background: var(--sand); border-radius: 8px; padding: 8px 10px; }
.error-text { color: var(--danger); font-size: 12px; font-weight: 600; }
.success-box { text-align: center; padding: 8px 0; }
.success-box img { width: 120px; margin: 0 auto 10px; }
.avatar-row { display: flex; align-items: center; gap: 10px; }
.avatar-row img { border-radius: 50%; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .charts { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(6, minmax(210px, 1fr)); }
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-section { grid-template-columns: 1fr; }
  .feature-band, .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .app-layout { grid-template-columns: 1fr; }
  .app-side { flex-direction: row; align-items: center; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--sand); padding: 10px 12px; }
  .app-user { min-width: 180px; }
  .side-nav { display: flex; }
  .side-nav button { white-space: nowrap; }
  .app-main { padding: 0 16px 28px; }
  .notify-grid { grid-template-columns: 1fr; }
  .chat { grid-template-columns: minmax(0, 1fr); }
  .chat-list { grid-auto-flow: column; overflow-x: auto; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; }
  .site-header { flex-wrap: wrap; }
  .calendar-grid { grid-template-columns: repeat(7, minmax(38px, 1fr)); }
  .cal-day { min-height: 58px; padding: 3px; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4, .filters, .steps, .detail-grid, .field-grid, .pay-methods { grid-template-columns: 1fr; }
  .filters .search, .filter-actions { grid-column: auto; }
  .hero-overlay { background: linear-gradient(180deg, rgba(20,83,45,.92), rgba(20,83,45,.8)); }
  .hero-text { padding: 36px 0; }
  .hero-text h1 { font-size: 30px; }
  .hero-chat { margin-top: 16px; }
  .hero-chat-form { flex-wrap: wrap; }
  .hero-chat-form .btn { width: 100%; }
  .header-actions .btn-ghost { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .demo-bar { gap: 8px; }
  .role-switch { margin-left: 0; }
  .brand span { font-size: 17px; }
  .app-topbar h2 { font-size: 21px; }
  .calendar-grid { display: none; }
  .cal-list { display: grid !important; }
}
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 700; }
.badge-soft { background: var(--sand); color: var(--forest); }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; }
.check { flex-direction: row !important; align-items: center; gap: 7px !important; align-self: center; }
.check input { width: auto; min-height: 0; }
body.compact th, body.compact td { padding: 5px 8px; }
body.compact .card { padding: 13px; }
body.compact .kcard { padding: 7px; }
body.compact .section { padding-top: 36px; }

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