:root {
  --bg: #F7F3EA;
  --surface: #FFFDF8;
  --ink: #13221C;
  --accent: #D9822B;
  --accent-dark: #0F5B3E;
  --neutral: #5E6B63;
  --line: rgba(94, 107, 99, .28);
  --line-soft: rgba(94, 107, 99, .16);
  --shadow: 0 8px 24px rgba(19, 34, 28, .10);
  --radius: 14px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/26px var(--sans);
  min-width: 320px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { color: var(--ink); overflow-wrap: anywhere; }
h1 { font: 700 44px/48px var(--serif); letter-spacing: -.02em; margin: 0 0 8px; }
h2 { font: 700 28px/34px var(--serif); letter-spacing: -.01em; margin: 0 0 8px; }
h3 { font: 600 20px/28px var(--sans); margin: 0 0 6px; }
p { margin: 0 0 10px; }
a { color: var(--accent-dark); }
button, input, select, textarea { font: inherit; color: var(--ink); }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 12px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--accent-dark); color: #F7F3EA;
  padding: 10px 20px; flex-wrap: wrap;
  box-shadow: 0 2px 10px rgba(19, 34, 28, .16);
}
.brand { display: flex; align-items: center; gap: 10px; color: #F7F3EA; text-decoration: none; min-width: 0; }
.brand img { flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font: 700 18px/22px var(--serif); white-space: nowrap; }
.brand-text small { font-size: 12px; letter-spacing: .04em; opacity: .85; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: #F7F3EA; }
.topbar-actions label { font-size: 12px; letter-spacing: .04em; }
.mode-badge {
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(247, 243, 234, .16); border: 1px solid rgba(247, 243, 234, .32);
  padding: 3px 8px; border-radius: 999px;
}
.mode-badge.server { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.user-chip { font-size: 13px; opacity: .92; }
.role-switch { display: flex; align-items: center; gap: 6px; }
.role-switch select { background: #FFFDF8; color: var(--ink); border-radius: 8px; border: 0; padding: 5px 8px; font-size: 13px; max-width: 170px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; text-decoration: none; line-height: 1.2;
  background: var(--surface); color: var(--ink);
  transition: background .14s var(--ease), border-color .14s var(--ease), transform .14s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(19, 34, 28, .12); }
.btn:active { transform: scale(.99); }
.btn-primary { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent); filter: brightness(.94); }
.btn-ghost { background: transparent; border-color: var(--line); color: inherit; }
.topbar .btn-ghost, .topbar .btn { color: #F7F3EA; border-color: rgba(247, 243, 234, .4); }
.topbar .btn:hover { background: rgba(247, 243, 234, .14); }
.btn-small { min-height: 32px; padding: 4px 10px; font-size: 12px; }
.btn-danger { color: var(--ink); background: var(--surface); border-color: var(--accent); }

/* Layout */
.demo-banner {
  background: var(--surface); color: var(--ink); border-bottom: 2px solid var(--accent);
  padding: 8px 20px; font-size: 14px;
}
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); max-width: 1400px; margin: 0 auto; }
.sidebar {
  position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px);
  border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto;
}
.tabs { display: flex; flex-direction: column; gap: 4px; }
.tab {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px;
  background: transparent; border: 1px solid transparent; border-radius: 10px;
  padding: 8px 10px; font-size: 14px; font-weight: 500; text-align: left; color: var(--ink);
  transition: background .14s var(--ease), border-color .14s var(--ease), color .14s var(--ease);
}
.tab img { width: 20px; height: 20px; opacity: .9; }
.tab:hover { background: rgba(217, 130, 43, .10); }
.tab.active { background: var(--accent); color: var(--ink); font-weight: 700; border-color: var(--accent); }
.tab.active img { filter: brightness(0); opacity: .85; }
.tab.locked { opacity: .42; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; font-size: 13px; line-height: 20px; color: var(--neutral); }
.sidebar-foot img { border-radius: 10px; margin-bottom: 8px; }

.main { padding: 20px 24px 40px; min-width: 0; }
.screen { animation: screenIn .18s var(--ease) both; }
.screen-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.screen-head p { max-width: 72ch; color: var(--neutral); margin: 0; }
.head-actions { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.head-actions label, .filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--neutral); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-dark); margin: 0 0 4px; }
.muted { color: var(--neutral); font-size: 14px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; background: rgba(15, 91, 62, .10); color: var(--accent-dark); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; min-width: 0;
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.card:hover { box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h2 { margin: 0; font-size: 22px; line-height: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.media-card img { border-radius: 10px; border: 1px solid var(--line); width: 100%; object-fit: cover; }
.media-card p { margin-top: 8px; }

input, select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 10px; min-height: 40px;
}
input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent-dark); }
textarea { min-height: 76px; resize: vertical; }
label { margin: 0; }

/* Filters */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters label { flex: 1 1 160px; min-width: 140px; }
.filters.card { margin-bottom: 16px; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.kpi .kpi-label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--neutral); }
.kpi .kpi-value { font: 700 28px/32px var(--sans); letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 2px; overflow-wrap: anywhere; }
.kpi .kpi-sub { font-size: 13px; color: var(--neutral); }
.kpi.warn { border-color: var(--accent); background: var(--surface); }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--neutral); background: rgba(247, 243, 234, .6); position: sticky; top: 0; }
tbody tr:hover { background: rgba(217, 130, 43, .06); }
td.actions { white-space: nowrap; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: rgba(94, 107, 99, .10); }
.badge.ok { color: var(--accent-dark); background: rgba(15, 91, 62, .10); border-color: rgba(15, 91, 62, .3); }
.badge.warn { color: var(--ink); background: rgba(217, 130, 43, .20); border-color: var(--accent); }
.badge.err { color: var(--ink); background: rgba(217, 130, 43, .28); border-color: var(--accent); }
.badge.vip { color: var(--ink); background: var(--accent); border-color: var(--accent); }

/* Empty */
.empty { text-align: center; padding: 18px; color: var(--neutral); }
.empty img { margin: 0 auto 10px; }

/* Showcase */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; margin-bottom: 18px; }
.hero h1 { font-size: 44px; line-height: 48px; }
.hero .lead { font-size: 18px; line-height: 28px; color: var(--neutral); max-width: 60ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 8px; }
.hero-note { font-size: 13px; color: var(--neutral); }
.hero-media img { border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
.section-title h2 { margin: 0; }
.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.event-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; transition: transform .14s var(--ease), box-shadow .18s var(--ease); }
.event-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.event-card .date { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-dark); }
.event-card h3 { margin: 0; }
.event-card .meta { font-size: 13px; color: var(--neutral); }
.event-card .card-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.event-card.vip { border-left: 4px solid var(--accent); }
.event-card.urgent { box-shadow: inset 4px 0 0 var(--accent); }
.lead-card { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; }
.lead-image { border-radius: 12px; border: 1px solid var(--line); margin-top: 8px; max-height: 220px; object-fit: cover; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--neutral); }
.form-grid label.consent { flex-direction: row; align-items: flex-start; gap: 8px; font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--ink); grid-column: 1 / -1; }
.form-grid .form-actions { grid-column: 1 / -1; }
.form-grid .form-status { grid-column: 1 / -1; margin: 0; font-size: 14px; min-height: 20px; }
.form-status.ok { color: var(--accent-dark); font-weight: 600; }
.form-status.err { color: var(--ink); font-weight: 600; background: rgba(217, 130, 43, .20); padding: 6px 10px; border-radius: 8px; }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; }
.kanban-col { background: rgba(255, 253, 248, .7); border: 1px dashed var(--line); border-radius: var(--radius); padding: 8px; min-height: 220px; min-width: 180px; transition: background .14s var(--ease), border-color .14s var(--ease); }
.kanban-col h3 { display: flex; align-items: center; justify-content: space-between; font-size: 14px; letter-spacing: .03em; text-transform: uppercase; color: var(--neutral); margin: 2px 4px 8px; }
.kanban-list { display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.kanban-col.drag-over { background: rgba(217, 130, 43, .12); border-color: var(--accent); }
.kanban-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent-dark); border-radius: 10px; padding: 10px; cursor: grab; touch-action: pan-y; transition: transform .12s var(--ease), box-shadow .18s var(--ease); }
.kanban-card:hover { box-shadow: var(--shadow); }
.kanban-card:active { cursor: grabbing; transform: scale(.99); }
.kanban-card.dragging { opacity: .55; transform: rotate(.4deg); }
.kanban-card.urgent { border-left-color: var(--accent); background: var(--surface); }
.kanban-card.vip { border-left-color: var(--accent); }
.kanban-card .k-title { font-weight: 700; font-size: 14px; }
.kanban-card .k-meta { font-size: 12px; color: var(--neutral); }
.kanban-card .k-sum { font-weight: 700; font-variant-numeric: tabular-nums; }
.kanban-card .k-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.kanban-card .k-move { display: flex; gap: 4px; margin-top: 6px; }
.kanban-card select { min-height: 30px; padding: 2px 4px; font-size: 12px; }
.kanban-card .k-drag { font-size: 11px; letter-spacing: .04em; color: var(--neutral); margin-top: 6px; user-select: none; }

/* Демонстрация панели на витрине */
.demo-panel { margin: 6px 0 16px; }
.demo-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.demo-board { min-width: 0; }
.demo-kanban { grid-template-columns: repeat(4, minmax(150px, 1fr)); margin-bottom: 0; }
.demo-kanban .kanban-col { min-height: 150px; }
.demo-kanban .kanban-list { min-height: 90px; }
.demo-notify { background: rgba(247, 243, 234, .55); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 12px; min-width: 0; }
.demo-notify h3 { margin-bottom: 8px; }
.demo-log { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.demo-log li { display: flex; align-items: center; gap: 8px; font-size: 13px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; padding: 6px 8px; min-width: 0; overflow-wrap: anywhere; }

/* Сгенерированные изображения приведены к тёплой фирменной палитре */
img[src$="generated-1.png"], img[src$="generated-2.png"], img[src$="generated-3.png"], img[src$="generated-4.png"] {
  filter: sepia(.9) saturate(1.5) hue-rotate(-12deg) contrast(1.03) brightness(1.05);
}
.hero-media { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-media img { border: 0; box-shadow: none; border-radius: 0; }
.hero-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(217, 130, 43, .26), rgba(15, 91, 62, .16) 55%, rgba(247, 243, 234, .20)); mix-blend-mode: multiply; }

/* Rating / charts */
.chart-card canvas { width: 100%; height: auto; background: var(--surface); border-radius: 8px; }
.rating-list { display: flex; flex-direction: column; gap: 8px; }
.rating-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 54px; gap: 8px; align-items: center; }
.rating-row .rank { font-weight: 700; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.rating-bar { height: 10px; border-radius: 999px; background: rgba(94, 107, 99, .18); overflow: hidden; }
.rating-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .7s var(--ease); }
.rating-row .score { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.records-list { display: flex; flex-direction: column; gap: 8px; }
.record { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.record .rec-id { font-size: 12px; font-weight: 700; letter-spacing: .05em; color: var(--accent-dark); text-transform: uppercase; }

/* Calendar */
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; grid-column: 1 / -1; }
.cal-head { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--neutral); text-align: center; padding: 4px; }
.cal-cell { border: 1px solid var(--line); border-radius: 9px; padding: 6px; min-height: 92px; background: var(--surface); min-width: 0; overflow: hidden; }
.cal-cell .d { font-size: 12px; font-weight: 700; color: var(--neutral); }
.cal-cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-event { display: block; width: 100%; text-align: left; background: rgba(15, 91, 62, .10); border: 0; border-left: 3px solid var(--accent-dark); border-radius: 5px; padding: 3px 5px; margin-top: 4px; font-size: 11px; line-height: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event.rc { background: rgba(217, 130, 43, .14); border-left-color: var(--accent); }
.calendar-list { display: flex; flex-direction: column; gap: 8px; }
.calendar-list .event-card { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.upcoming-list { display: flex; flex-direction: column; gap: 8px; }
.upcoming-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); padding: 6px 0; flex-wrap: wrap; }

/* Switches, plain lists */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.switch-row span { display: flex; flex-direction: column; }
.switch-row small { color: var(--neutral); font-size: 12px; }
.switch-row input[type="checkbox"] { width: 42px; height: 24px; appearance: none; background: rgba(94, 107, 99, .3); border-radius: 999px; position: relative; transition: background .14s var(--ease); flex: 0 0 auto; }
.switch-row input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: transform .14s var(--ease); }
.switch-row input[type="checkbox"]:checked { background: var(--accent-dark); }
.switch-row input[type="checkbox"]:checked::after { transform: translateX(18px); }
.plain-list { margin: 0 0 10px; padding-left: 18px; }
.plain-list li { margin-bottom: 6px; }
.roles-list { display: flex; flex-direction: column; gap: 6px; }
.role-row { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.role-row strong { display: block; }
.role-row small { color: var(--neutral); }

/* Modal, toast */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(19, 34, 28, .44); animation: fadeIn .16s var(--ease) both; }
.modal-window { position: relative; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 20px 50px rgba(19, 34, 28, .24); animation: modalIn .2s var(--ease) both; }
.modal-close { position: absolute; top: 8px; right: 10px; background: transparent; border: 0; font-size: 26px; line-height: 1; color: var(--neutral); }
.modal-window h2 { padding-right: 24px; }
.demo-creds { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 13px; color: var(--neutral); }
.demo-creds h3 { font-size: 14px; margin: 0 0 4px; }
.demo-creds p { margin: 0; }
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 90; max-width: min(420px, calc(100vw - 32px)); background: var(--accent-dark); color: #F7F3EA; border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 14px; animation: toastIn .2s var(--ease) both; }
.toast.err { background: var(--accent); color: var(--ink); }
.noscript { padding: 16px; background: rgba(217, 130, 43, .20); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 16px 24px 28px; color: var(--neutral); font-size: 13px; max-width: 1400px; margin: 0 auto; }

/* Animations from brand.md */
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes barGrow { from { width: 0; } }

/* Responsive */
@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .tabs { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .tab { width: auto; white-space: nowrap; min-height: 40px; }
  .sidebar-foot { display: none; }
  .main { padding: 16px 16px 32px; }
  .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  h1 { font-size: 32px; line-height: 38px; }
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; line-height: 40px; }
  .grid-2 { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr; }
  .lead-card { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(5, 220px); }
  .demo-kanban { grid-template-columns: repeat(4, 200px); }
  .calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .topbar { padding: 8px 12px; gap: 8px; }
  .brand-text strong { font-size: 15px; white-space: normal; }
  .brand-text small { display: none; }
  .user-chip { display: none; }
  .main { padding: 12px 12px 28px; }
  h1 { font-size: 27px; line-height: 32px; }
  h2 { font-size: 22px; line-height: 28px; }
  .event-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .filters label { flex-basis: 140px; }
  .kanban { grid-template-columns: repeat(5, 200px); }
  .demo-kanban { grid-template-columns: repeat(4, 180px); }
  .card { padding: 12px; }
  .screen-head { align-items: flex-start; }
  .head-actions { width: 100%; }
  .head-actions label { flex: 1 1 140px; }
  .hero-actions .btn { flex: 1 1 100%; }
  table { min-width: 520px; }
  .cal-cell { min-height: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rating-bar span { transition: none !important; }
}
