/* Vin-Aire Hub — design system
   Palette: brand yellow + deep navy/indigo, sampled directly from the Vin-Aire Marketing logo.
   Ice-blue tokens are kept as the secondary/informational accent (badges, charts) — the yellow
   is reserved for primary actions and brand moments so it doesn't get diluted by overuse. */

:root {
  --brand-50:  #fff8df;
  --brand-100: #fff3cb;
  --brand-400: #ffdc5c;
  --brand-500: #ffd22f;   /* primary — sampled from the logo background */
  --brand-600: #e0b829;
  --brand-700: #c6a324;
  --brand-ink: #0e0147;   /* near-black indigo, for text/icons ON the yellow */

  --ice-50:  #eef8fd;
  --ice-100: #d7eefb;
  --ice-200: #aee0f7;
  --ice-300: #7ccdf1;
  --ice-400: #46b6ea;
  --ice-500: #1B9CE5;   /* secondary / informational accent */
  --ice-600: #157fbf;
  --ice-700: #12659a;
  --navy-900:#0e0147;   /* sampled from the logo mark */
  --navy-800:#2a1f5d;
  --navy-700:#43386f;
  --navy-600:#5b5281;
  --white:   #ffffff;
  --gray-50: #f7f9fb;
  --gray-100:#eef1f5;
  --gray-200:#dfe4ea;
  --gray-300:#c4cdd8;
  --gray-500:#7c8a9c;
  --gray-700:#465064;
  --ink:     #14202e;
  --danger:  #e0453f;
  --danger-bg:#fdecea;
  --success: #17a06b;
  --success-bg:#e8f8f1;
  --warn:    #d98a11;
  --warn-bg: #fbf1de;
  --radius:  12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(14,1,71,0.08), 0 1px 2px rgba(14,1,71,0.06);
  --shadow-lg: 0 10px 30px rgba(14,1,71,0.16);
  --touch: 48px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--gray-50);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ice-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; color: var(--navy-900); }
p { line-height: 1.55; }
img { max-width: 100%; }
button { font-family: inherit; }

/* ---------- Layout: app shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; background: var(--navy-900); color: #cfe4f7;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-brand img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(255,255,255,0.12); }
.sidebar-brand .name { font-weight: 700; color: #fff; font-size: 15px; line-height: 1.2; }
.sidebar-brand .sub { font-size: 11px; color: #8db3d6; }
.sidebar-nav { flex: 1; padding: 10px 10px; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin-bottom: 2px;
  border-radius: var(--radius-sm); color: #cfe4f7; font-size: 14px; font-weight: 500;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.sidebar-nav a.active { background: var(--brand-500); color: var(--brand-ink); }
.sidebar-nav .icon { width: 18px; text-align: center; }
.sidebar-section-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6f93b6; padding: 14px 12px 6px; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 12px; color: #8db3d6; }
.sidebar-foot .who { color: #fff; font-weight: 600; font-size: 13px; }
.role-pill { display:inline-block; font-size: 10px; padding: 2px 7px; border-radius: 999px; background: var(--brand-500); color:var(--brand-ink); font-weight:700; letter-spacing:.03em; }
.role-pill.staff { background:#5c6f8a; color:#fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px; background: #fff; border-bottom: 1px solid var(--gray-200); position: sticky; top:0; z-index: 20;
}
.topbar h1 { font-size: 19px; margin: 0; }
.topbar .meta { font-size: 12px; color: var(--gray-500); }
.content { padding: 20px 22px 60px; max-width: 1320px; width: 100%; }
.menu-toggle { display:none; background:none; border:1px solid var(--gray-200); border-radius: 8px; width:40px; height:40px; font-size:18px; }

/* ---------- Public site header/footer ---------- */
.pub-header { background: var(--navy-900); color: #fff; position: sticky; top:0; z-index: 30; }
.pub-header .wrap { max-width: 1180px; margin: 0 auto; display:flex; align-items:center; justify-content:space-between; padding: 14px 20px; }
.pub-brand { display:flex; align-items:center; gap:10px; color:#fff; font-weight:700; font-size:17px; }
.pub-brand img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(255,255,255,0.12); }
.pub-nav { display:flex; gap: 4px; align-items:center; flex-wrap: wrap; }
.pub-nav a { color:#cfe4f7; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight:600; }
.pub-nav a:hover { background: rgba(255,255,255,0.08); text-decoration:none; }
.pub-nav a.btn-ghost-light { border:1px solid rgba(255,255,255,0.35); }
.pub-footer { background: var(--navy-900); color:#a9c6e2; padding: 34px 20px 24px; margin-top: 60px; }
.pub-footer .wrap { max-width: 1180px; margin: 0 auto; display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.pub-footer h4 { color:#fff; font-size: 14px; }
.pub-footer a { color:#a9c6e2; }
.pub-footer .bottom { max-width:1180px; margin: 24px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 12px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px;}

.hero {
  background: radial-gradient(1200px 500px at 80% -10%, rgba(255,210,47,0.28), transparent),
              linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: #fff; padding: 64px 20px 76px; position: relative; overflow: hidden;
}
.hero .wrap { max-width: 1180px; margin: 0 auto; display:grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items:center; }
.hero h1 { color:#fff; font-size: 40px; margin-bottom: 14px; }
.hero p.lead { color:#cfe4f7; font-size: 17px; max-width: 46ch; }
.hero-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: 16px; padding: 22px; backdrop-filter: blur(6px); }

.section { max-width: 1180px; margin: 0 auto; padding: 56px 20px; }
.section-head { text-align:center; max-width: 640px; margin: 0 auto 34px; }
.section-head .eyebrow { color: var(--navy-800); font-weight:700; font-size: 12px; text-transform:uppercase; letter-spacing:.08em; }

/* ---------- Category tiles ---------- */
.cat-tile { padding: 0; overflow: hidden; }
.cat-photo { height: 160px; background: var(--navy-800); background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; }
.cat-photo .cat-emoji { font-size: 46px; opacity: .85; }
.cat-photo.has-photo .cat-emoji { display: none; }
.cat-body { padding: 18px 20px; }
.cat-body h3 { margin: 0 0 4px; }

/* ---------- Brands showcase ---------- */
.brand-cat { margin-bottom: 30px; }
.brand-cat h3 { font-size: 16px; text-transform: uppercase; letter-spacing: .04em; color: var(--navy-900);
  border-bottom: 2px solid var(--brand-500); padding-bottom: 8px; margin-bottom: 16px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.brand-card { background:#fff; border:1px solid var(--gray-200); border-radius: 12px; box-shadow: var(--shadow);
  min-height: 92px; display:flex; align-items:center; justify-content:center; padding: 16px; text-align:center; }
.brand-card .brand-name { font-weight: 800; font-size: 15px; color: var(--navy-900); letter-spacing: .01em; }
.brand-card .brand-logo { max-width: 100%; max-height: 56px; object-fit: contain; }
@media (max-width: 560px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items:center; justify-content:center; gap: 8px;
  border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 14px;
  padding: 10px 16px; min-height: 40px; cursor: pointer; transition: filter .12s, background .12s;
  background: var(--brand-500); color: var(--brand-ink);
}
.btn:hover { filter: brightness(0.94); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.btn-lg { min-height: var(--touch); font-size: 15px; padding: 12px 20px; }
.btn.btn-secondary { background: var(--white); color: var(--navy-800); border-color: var(--gray-300); }
.btn.btn-navy { background: var(--navy-900); color:#fff; }
.btn.btn-danger { background: var(--danger); color:#fff; }
.btn.btn-success { background: var(--success); color:#fff; }
.btn.btn-ghost { background: transparent; color: var(--ice-600); border-color: transparent; }
.btn.btn-ghost-light { background: transparent; color:#fff; border-color: rgba(255,255,255,0.4); }
.btn.btn-block { width: 100%; }
.btn.btn-sm { min-height: 32px; padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border:1px solid var(--gray-200); background:#fff; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }

/* ---------- Cards / surfaces ---------- */
.card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .card-body { padding: 18px 18px; }
.card .card-head { padding: 16px 18px; border-bottom: 1px solid var(--gray-100); display:flex; align-items:center; justify-content:space-between; }
.card .card-head h3 { font-size: 15px; margin:0; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Stat tiles */
.stat-tile { background:#fff; border:1px solid var(--gray-200); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-tile .label { font-size: 12.5px; color: var(--gray-500); font-weight:600; text-transform:uppercase; letter-spacing:.02em;}
.stat-tile .value { font-size: 26px; font-weight: 800; color: var(--navy-900); margin-top: 4px; }
.stat-tile .delta { font-size: 12.5px; margin-top: 6px; font-weight:600; }
.stat-tile .delta.up { color: var(--success); }
.stat-tile .delta.down { color: var(--danger); }
.stat-tile.locked { position:relative; }

/* ---------- Forms ---------- */
label { display:block; font-size: 13px; font-weight: 600; color: var(--navy-800); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; border: 1px solid var(--gray-300); border-radius: 10px; padding: 10px 12px; font-size: 14.5px;
  min-height: 42px; background:#fff; color: var(--ink); font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ice-300); border-color: var(--ice-500); }
.field { margin-bottom: 14px; }
.field-row { display:flex; gap: 12px; }
.field-row > .field { flex: 1; }
.help { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.checkbox-row { display:flex; align-items:center; gap:8px; }
.checkbox-row input { width: 20px; height:20px; min-height:auto; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--gray-100); }
th { color: var(--gray-500); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; background: var(--gray-50); }
tr:hover td { background: var(--ice-50); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border:1px solid var(--gray-200); background:#fff;}
.table-wrap table { border: none; }
.table-wrap .card-head { border-radius: var(--radius) var(--radius) 0 0; }

/* ---------- Badges / pills ---------- */
.badge { display:inline-flex; align-items:center; gap:5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing:.02em; }
.badge.gray { background: var(--gray-100); color: var(--gray-700); }
.badge.blue { background: var(--ice-100); color: var(--ice-700); }
.badge.green { background: var(--success-bg); color: var(--success); }
.badge.red { background: var(--danger-bg); color: var(--danger); }
.badge.orange { background: var(--warn-bg); color: var(--warn); }
.badge.navy { background: var(--navy-800); color: #fff; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display:flex; align-items:center; justify-content:center; background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); padding: 20px; }
.login-card { background:#fff; border-radius: 18px; padding: 34px 30px; width: 100%; max-width: 380px; box-shadow: var(--shadow-lg); }
.login-brand { text-align:center; margin-bottom: 18px; }
.login-brand img { width: 68px; height: 68px; border-radius: 14px; object-fit: cover; display:block; margin: 0 auto 10px; box-shadow: var(--shadow); }
.login-brand h1 { font-size: 20px; margin: 6px 0 2px; }
.login-brand p { color: var(--gray-500); font-size: 13px; margin:0; }
.demo-accounts { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--gray-300); font-size: 12.5px; color: var(--gray-500); }
.demo-accounts code { background: var(--gray-100); padding: 1px 5px; border-radius: 5px; }
.error-banner { background: var(--danger-bg); color: var(--danger); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }

/* ---------- POS: invoice sheet ---------- */
.invoice-sheet { padding: 22px 24px; max-width: 960px; }
.invoice-sheet .inv-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; border-bottom: 2px solid var(--navy-900); padding-bottom: 12px; margin-bottom: 14px; flex-wrap:wrap; }
.invoice-sheet .inv-brand { font-size: 18px; font-weight: 900; color: var(--navy-900); letter-spacing:.02em; }
.invoice-sheet .inv-meta { display:flex; gap:12px; flex-wrap:wrap; }
.invoice-sheet .inv-meta .field { margin:0; }
.invoice-sheet .inv-meta input { min-width: 160px; }
.invoice-sheet .inv-parties { display:grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 14px; }
.invoice-sheet .inv-parties .field { margin:0; }

table.inv-lines { width:100%; border-collapse:collapse; }
table.inv-lines th { background: var(--gray-50); }
table.inv-lines td { padding: 4px 6px; vertical-align: top; border-bottom: 1px solid var(--gray-100); }
table.inv-lines input { width:100%; min-height: 36px; padding: 6px 8px; }
table.inv-lines .l-total { font-weight:700; padding-top: 12px; white-space:nowrap; }
table.inv-lines .l-cost { padding-top: 12px; white-space:nowrap; }
table.inv-lines .l-hint { font-size: 11px; margin-top: 2px; min-height: 13px; }
table.inv-lines tr.line-warn input.l-qty { border-color: var(--danger); background: var(--danger-bg); }
.inv-lines .icon-btn { color: var(--gray-500); font-size: 18px; }

.invoice-sheet .inv-foot { display:grid; grid-template-columns: 1fr 320px; gap: 24px; margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--navy-900); }
.invoice-sheet .inv-payment .field { margin-bottom: 10px; }
.invoice-sheet .inv-totals .row { display:flex; justify-content:space-between; align-items:center; padding: 5px 0; font-size: 14px; }
.invoice-sheet .inv-totals .row.grand { font-size: 21px; font-weight: 900; color: var(--navy-900); border-top: 1px dashed var(--gray-300); margin-top: 4px; padding-top: 8px; }
.invoice-sheet .inv-totals input#discPct { width: 58px; min-height: 30px; padding: 3px 6px; margin: 0 2px; text-align:right; }
.invoice-sheet .inv-actions { display:flex; justify-content:flex-end; gap: 10px; margin-top: 18px; }

@media (max-width: 760px) {
  .invoice-sheet { padding: 16px; }
  .invoice-sheet .inv-parties, .invoice-sheet .inv-foot { grid-template-columns: 1fr; }
  table.inv-lines th:nth-child(4), table.inv-lines td.l-cost { display:none; }
}

/* ---------- CRM inbox ---------- */
.crm-grid { display:grid; grid-template-columns: 340px 1fr; gap: 16px; align-items:start; }
.thread-list { max-height: calc(100vh - 200px); overflow-y:auto; }
.thread-item { display:block; padding: 12px 14px; border-bottom: 1px solid var(--gray-100); cursor:pointer; }
.thread-item:hover { background: var(--ice-50); }
.thread-item.active { background: var(--ice-100); }
.thread-item .t-top { display:flex; justify-content:space-between; gap:6px; align-items:center; }
.thread-item .t-name { font-weight:700; font-size: 13.5px; }
.thread-item .t-snippet { font-size:12.5px; color: var(--gray-500); margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.thread-item.overdue { background: var(--danger-bg); }
.thread-item.overdue .t-name { color: var(--danger); }
.chan-dot { width:8px; height:8px; border-radius:50%; display:inline-block; margin-right:6px; }
.chan-Facebook { background:#1877F2; }
.chan-Email { background:#EA4335; }
.chan-Viber { background:#7360F2; }
.chan-Website { background: var(--brand-500); }

.msg-thread { max-height: 48vh; overflow-y:auto; padding: 4px 4px; display:flex; flex-direction:column; gap:10px; }
.msg { max-width: 70%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height:1.4; }
.msg.in { background: var(--gray-100); align-self:flex-start; border-bottom-left-radius:4px; }
.msg.out { background: var(--brand-500); color:var(--brand-ink); align-self:flex-end; border-bottom-right-radius:4px; }
.msg .m-time { display:block; font-size:10.5px; opacity:.65; margin-top:4px; }

/* ---------- Misc ---------- */
.divider { height:1px; background: var(--gray-200); margin: 18px 0; border:none; }
.muted { color: var(--gray-500); }
.center { text-align:center; }
.flex { display:flex; }
.flex-between { display:flex; align-items:center; justify-content:space-between; }
.flex-gap { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.mt-0 {margin-top:0;} .mt-1{margin-top:8px;} .mt-2{margin-top:16px;} .mt-3{margin-top:24px;}
.mb-0 {margin-bottom:0;} .mb-1{margin-bottom:8px;} .mb-2{margin-bottom:16px;} .mb-3{margin-bottom:24px;}
.lock-note { display:flex; align-items:center; gap:6px; font-size:12px; color: var(--gray-500); background: var(--gray-100); padding: 8px 10px; border-radius: 8px; }
.progress-bar { height: 16px; border-radius: 999px; background: var(--gray-200); overflow:hidden; }
.progress-bar > div { height:100%; background: linear-gradient(90deg, var(--brand-400), var(--brand-600)); border-radius:999px; transition: width .4s; }
.progress-bar > div.done { background: linear-gradient(90deg, var(--success), #12c07f); }

/* Bonus banner — shown when the store-wide monthly quota (staff bonus threshold) is reached */
.bonus-banner {
  display:flex; align-items:center; gap:14px; margin-bottom: 16px;
  padding: 16px 18px; border-radius: 14px;
  background: linear-gradient(100deg, var(--success-bg), #fff6d6);
  border: 1px solid var(--success); color: var(--navy-900); font-size: 14.5px;
  animation: fadein .25s ease-out;
}
.bonus-banner .bb-emoji { font-size: 30px; line-height: 1; }
.card.quota-hit { border-color: var(--success); }
.toast-region { position: fixed; top: 16px; right: 16px; z-index: 999; display:flex; flex-direction:column; gap:8px; }
.toast { background: var(--navy-900); color:#fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; min-width: 220px; animation: fadein .15s ease-out; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes fadein { from { opacity:0; transform: translateY(-6px);} to {opacity:1; transform:translateY(0);} }

.modal-backdrop { position: fixed; inset:0; background: rgba(11,31,56,0.45); display:flex; align-items:center; justify-content:center; z-index: 100; padding: 16px; }
.modal { background:#fff; border-radius: 16px; max-width: 480px; width:100%; max-height: 90vh; overflow-y:auto; box-shadow: var(--shadow-lg); }
.modal.modal-lg { max-width: 920px; }
.modal .modal-body table { font-size: 13px; }
.modal .modal-body tfoot td { background: var(--gray-50); }
.modal .modal-head { padding: 18px 20px; border-bottom:1px solid var(--gray-100); display:flex; justify-content:space-between; align-items:center; }
.modal .modal-body { padding: 20px; }
.modal .modal-foot { padding: 16px 20px; border-top:1px solid var(--gray-100); display:flex; justify-content:flex-end; gap:10px; }

.empty-state { text-align:center; padding: 40px 20px; color: var(--gray-500); }
.empty-state .big-icon { font-size: 38px; margin-bottom: 10px; }

.owner-only-tag { font-size: 10px; background: var(--navy-800); color:#fff; padding:2px 6px; border-radius: 5px; margin-left:6px; vertical-align: middle;}

/* Simple SVG chart helpers */
.chart-wrap { width:100%; overflow-x:auto; }
.chart-legend { display:flex; gap:14px; flex-wrap:wrap; font-size: 12.5px; margin-top:10px; }

/* Daily breakdown: main column + fixed sidebar for services / monitored items */
.day-layout { display:grid; grid-template-columns: minmax(0,1fr) 300px; gap:18px; align-items:start; }
.day-side .card { background: var(--gray-50); }
.day-side .card-head { padding:12px 14px; }
.day-side table { font-size:12.5px; }
.pay-chip { display:inline-flex; gap:6px; padding:4px 10px; border-radius:999px; background:var(--gray-100); font-weight:600; font-size:12.5px; }
@media (max-width: 900px) { .day-layout { grid-template-columns: 1fr; } }

.cc-result { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; background: var(--gray-100); color: var(--gray-500); }
.cc-result.ok { background: #e5f6ee; color: var(--success); }
.cc-result.short { background: var(--danger-bg); color: var(--danger); }
.cc-result.over { background: var(--warn-bg); color: var(--warn); }
.chart-legend .item { display:flex; align-items:center; gap:6px; }
.chart-legend .swatch { width:10px; height:10px; border-radius:3px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .crm-grid { grid-template-columns: 1fr; }
  .hero .wrap { grid-template-columns: 1fr; }
  .pub-footer .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left:-240px; top:0; z-index: 50; transition: left .18s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { left:0; }
  .menu-toggle { display:inline-flex; align-items:center; justify-content:center; }
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .content { padding: 16px 14px 50px; }
  .topbar { padding: 12px 14px; }
}
