/* =====================================================================
   ABART — never too much
   Nordic editorial design system
   Fraunces (display serif) + Hanken Grotesk (sans)
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Warm neutral palette */
  --ivory:      #FAF7F1;   /* page background */
  --ivory-2:    #F4EFE5;   /* alternate band */
  --ivory-3:    #EDE7DA;   /* deeper band */
  --paper:      #FFFDFA;   /* cards / surfaces */
  --paper-2:    #FFFFFF;

  --ink:        #1C1A17;   /* matte warm black */
  --ink-soft:   #46423B;
  --stone:      #847F75;   /* secondary text */
  --stone-2:    #ADA89B;   /* muted text */
  --line:       #E6E0D4;   /* hairline borders */
  --line-2:     #EFEADF;   /* lighter borders */

  /* Accents — used sparingly */
  --sage:       #6E7A60;
  --sage-deep:  #4F5942;
  --sage-tint:  #EBEFE4;
  --clay:       #A8765A;
  --clay-tint:  #F3E7DF;
  --blush:      #CBA593;

  /* Status */
  --ok:         #5E7A57;
  --ok-tint:    #E9F0E5;
  --warn:       #A9842F;
  --warn-tint:  #F4EBD4;
  --danger:     #A8544A;
  --danger-tint:#F3E1DD;

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans:    'Hanken Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Radius */
  --r-xs: 6px;
  --r-sm: 9px;
  --r:    13px;
  --r-lg: 20px;
  --r-xl: 30px;
  --pill: 999px;

  /* Shadow — soft, warm-tinted */
  --shadow-xs: 0 1px 2px rgba(40,34,24,.04);
  --shadow-sm: 0 2px 8px rgba(40,34,24,.05), 0 1px 2px rgba(40,34,24,.04);
  --shadow:    0 10px 30px -12px rgba(40,34,24,.16), 0 2px 8px rgba(40,34,24,.05);
  --shadow-lg: 0 30px 60px -20px rgba(40,34,24,.22), 0 8px 20px -10px rgba(40,34,24,.10);

  --ease: cubic-bezier(.22,.61,.36,1);
  --maxw: 1240px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--ivory);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { object-fit: cover; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--sage); color: #fff; }

/* ---------- Typography ---------- */
.display { font-family: var(--font-display); font-weight: 380; letter-spacing: -0.02em; line-height: 1.04; font-optical-sizing: auto; }
h1,h2,h3,h4 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; color: var(--ink); }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { color: var(--ink-soft); }
strong { font-weight: 600; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); line-height: 1.55; }
.muted { color: var(--stone); }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.serif { font-family: var(--font-display); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.container-narrow { max-width: 920px; }
.section { padding-block: clamp(56px, 9vw, 120px); }
.section-sm { padding-block: clamp(40px, 6vw, 72px); }
.band { background: var(--ivory-2); }
.band-deep { background: var(--ivory-3); }
.band-ink { background: var(--ink); color: var(--ivory); }
.band-ink p, .band-ink .muted { color: #C8C2B4; }
.band-ink h1, .band-ink h2, .band-ink h3 { color: var(--ivory); }

.grid { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px;
  border-radius: var(--pill);
  font-weight: 600; font-size: 0.92rem; letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform .35s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .35s var(--ease);
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--ink); color: var(--ivory); }
.btn-primary:hover { background: #2c2823; box-shadow: var(--shadow); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper); transform: translateY(-2px); }
.btn-sage { background: var(--sage); color: #fff; }
.btn-sage:hover { background: var(--sage-deep); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-light:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.82rem; }
.btn-lg { padding: 16px 30px; font-size: 1rem; }
.btn-icon { padding: 11px; border-radius: var(--pill); width: 42px; height: 42px; }
.link-underline { position: relative; font-weight: 500; color: var(--ink); }
.link-underline::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }
.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink); }
.link-arrow svg { transition: transform .35s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Tags / badges / status ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--pill);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink-soft);
}
.tag-sage { background: var(--sage-tint); border-color: transparent; color: var(--sage-deep); }
.tag-clay { background: var(--clay-tint); border-color: transparent; color: var(--clay); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.s-ok { color: var(--ok); } .s-warn { color: var(--warn); } .s-danger { color: var(--danger); } .s-mute { color: var(--stone); }
.pill-status { padding: 4px 11px; border-radius: var(--pill); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; }
.pill-ok { background: var(--ok-tint); color: var(--ok); }
.pill-warn { background: var(--warn-tint); color: var(--warn); }
.pill-danger { background: var(--danger-tint); color: var(--danger); }
.pill-mute { background: var(--ivory-3); color: var(--stone); }

/* ---------- Cards ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: 24px; }
.card-hover { transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.divide > * + * { border-top: 1px solid var(--line); }

/* ---------- Site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--ivory) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--ivory) 92%, transparent); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: baseline; gap: 9px; }
.brand-mark { font-family: var(--font-sans); font-weight: 800; font-size: 1.32rem; letter-spacing: 0.32em; text-indent: 0.32em; color: var(--ink); }
.brand-tag { font-family: var(--font-display); font-style: italic; font-size: 0.82rem; color: var(--stone); letter-spacing: 0; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--ink-soft); transition: color .2s; position: relative; padding: 6px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--sage); border-radius: 2px; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); border: 1px solid transparent; transition: background .2s, border-color .2s; position: relative; }
.icon-btn:hover { background: var(--paper); border-color: var(--line); }
.basket-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--sage); color: #fff; font-size: 0.66rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; padding-block: clamp(40px, 7vw, 96px); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.hero-media { position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4/5; box-shadow: var(--shadow-lg); }
.hero-media img { width: 100%; height: 100%; }
.hero-float {
  position: absolute; background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 14px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px;
}

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--paper); }
.marquee-track { display: flex; gap: 56px; white-space: nowrap; padding-block: 16px; width: max-content; animation: marquee 34s linear infinite; }
.marquee-track span { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--stone); display: inline-flex; align-items: center; gap: 56px; }
.marquee-track span::after { content: "✦"; color: var(--sage); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Product card ---------- */
.product-card { display: flex; flex-direction: column; }
.product-media { position: relative; aspect-ratio: 4/5; border-radius: var(--r-lg); overflow: hidden; background: var(--ivory-3); }
.product-media img { width: 100%; height: 100%; transition: transform .8s var(--ease); }
.product-card:hover .product-media img { transform: scale(1.05); }
.product-media .tag { position: absolute; top: 12px; left: 12px; }
.product-fav { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--paper) 85%, transparent); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; color: var(--ink); opacity: 0; transform: translateY(-4px); transition: .3s var(--ease); }
.product-card:hover .product-fav { opacity: 1; transform: translateY(0); }
.product-add { position: absolute; left: 12px; right: 12px; bottom: 12px; opacity: 0; transform: translateY(8px); transition: .35s var(--ease); }
.product-card:hover .product-add { opacity: 1; transform: translateY(0); }
.product-info { padding: 15px 2px 4px; }
.product-name { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.product-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; }
.product-cat { font-size: 0.8rem; color: var(--stone); }
.price { font-family: var(--font-display); font-weight: 500; font-size: 1.12rem; }
.price-was { color: var(--stone-2); text-decoration: line-through; font-size: 0.9rem; margin-right: 6px; }

/* ---------- Category chip ---------- */
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { padding: 9px 17px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--paper); font-size: 0.88rem; font-weight: 500; color: var(--ink-soft); transition: .25s var(--ease); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--stone); }
.input, .select, .textarea {
  width: 100%; padding: 12px 15px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 0.95rem; color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder, .textarea::placeholder { color: var(--stone-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-tint); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23847F75' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input-group { position: relative; }
.input-prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--stone); font-size: 0.95rem; }
.input-group .input { padding-left: 30px; }

/* switch */
.switch { position: relative; width: 44px; height: 26px; border-radius: var(--pill); background: var(--line); transition: background .25s; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease); }
.switch.on { background: var(--sage); }
.switch.on::after { transform: translateX(18px); }

/* file drop */
.dropzone { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 28px; text-align: center; color: var(--stone); background: var(--ivory-2); transition: .25s; cursor: pointer; }
.dropzone:hover { border-color: var(--sage); color: var(--sage-deep); background: var(--sage-tint); }

.segmented { display: inline-flex; background: var(--ivory-3); border-radius: var(--pill); padding: 4px; gap: 2px; }
.segmented button { padding: 8px 16px; border-radius: var(--pill); font-size: 0.85rem; font-weight: 600; color: var(--stone); transition: .2s; }
.segmented button.active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-xs); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 560px; }
.data thead th { text-align: left; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone); padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data tbody td { padding: 15px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.data tbody tr:last-child td { border-bottom: none; }
.data tbody tr { transition: background .15s; }
.data tbody tr:hover { background: var(--ivory-2); }
.data td.num, .data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data .strong { font-weight: 600; color: var(--ink); }
.cell-main { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 0.8rem; color: var(--stone); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 13px 18px; font-size: 0.92rem; font-weight: 600; color: var(--stone); position: relative; white-space: nowrap; transition: color .2s; }
.tab:hover { color: var(--ink-soft); }
.tab.active { color: var(--ink); }
.tab.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; }
.tabpane { display: none; animation: fadeUp .5s var(--ease) both; }
.tabpane.active { display: block; }

/* ---------- Stat tiles ---------- */
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; position: relative; overflow: hidden; }
.stat-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; color: var(--stone); text-transform: uppercase; }
.stat-value { font-family: var(--font-display); font-weight: 500; font-size: 2rem; margin-top: 10px; letter-spacing: -0.02em; line-height: 1; }
.stat-sub { font-size: 0.82rem; margin-top: 9px; display: flex; align-items: center; gap: 6px; }
.trend-up { color: var(--ok); } .trend-down { color: var(--danger); }
.stat-accent { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.stat-accent .stat-label, .stat-accent .stat-sub { color: #C8C2B4; }
.stat-sage { background: var(--sage); color: #fff; border-color: var(--sage); }
.stat-sage .stat-label { color: #E3E9DA; }

/* ---------- Charts ---------- */
.barchart { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.bar { flex: 1; background: var(--ivory-3); border-radius: 6px 6px 0 0; position: relative; transition: height 1s var(--ease); min-height: 4px; }
.bar.fill { background: linear-gradient(180deg, var(--sage) 0%, var(--sage-deep) 100%); }
.bar.fill-ink { background: linear-gradient(180deg, #38332c, var(--ink)); }
.bar-label { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: 0.68rem; color: var(--stone); }
.donut { --val: 70; width: 130px; height: 130px; border-radius: 50%; background: conic-gradient(var(--sage) calc(var(--val)*1%), var(--ivory-3) 0); display: grid; place-items: center; position: relative; }
.donut::after { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: var(--paper); }
.donut-label { position: relative; z-index: 1; font-family: var(--font-display); font-size: 1.4rem; }
.spark { display: block; width: 100%; height: 44px; }
.legend { display: flex; flex-direction: column; gap: 10px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* progress meter (consignment) */
.meter { height: 10px; border-radius: var(--pill); background: var(--ivory-3); overflow: hidden; display: flex; }
.meter span { height: 100%; }
.meter .m-sold { background: var(--sage); }
.meter .m-return { background: var(--clay); }
.meter .m-stock { background: var(--ink); opacity: .25; }

/* ---------- Admin shell ---------- */
.app { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: var(--ivory); padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand-mark { color: var(--ivory); font-size: 1.15rem; }
.side-section { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #837C6E; padding: 16px 12px 6px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-sm); font-size: 0.9rem; font-weight: 500; color: #C8C2B4; transition: background .2s, color .2s; cursor: pointer; }
.side-link svg { width: 18px; height: 18px; opacity: .85; flex: none; }
.side-link:hover { background: rgba(255,255,255,.06); color: var(--ivory); }
.side-link.active { background: var(--ivory); color: var(--ink); font-weight: 600; }
.side-link.active svg { opacity: 1; }
.side-badge { margin-left: auto; background: var(--sage); color: #fff; font-size: 0.66rem; font-weight: 700; padding: 2px 7px; border-radius: var(--pill); }

.app-main { display: flex; flex-direction: column; min-width: 0; background: var(--ivory); }
.app-topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--ivory) 85%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 40; }
.app-body { padding: 28px; max-width: 1280px; width: 100%; }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--pill); padding: 9px 16px; min-width: 240px; color: var(--stone); }
.search-box input { border: none; background: none; outline: none; flex: 1; font-size: 0.9rem; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--sage-tint); color: var(--sage-deep); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; border: 1px solid var(--line); }
.appview { display: none; animation: fadeUp .45s var(--ease) both; }
.appview.active { display: block; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-title { font-family: var(--font-display); font-weight: 500; font-size: 1.9rem; letter-spacing: -0.02em; }
.crumb { font-size: 0.82rem; color: var(--stone); margin-bottom: 6px; }

/* quick action big buttons */
.quickgrid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.quick {
  display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--r-lg);
  background: var(--paper); border: 1px solid var(--line); text-align: left; transition: .35s var(--ease); min-height: 132px; justify-content: space-between;
}
.quick:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.quick.q-ink { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.quick.q-sage { background: var(--sage); color: #fff; border-color: var(--sage); }
.quick.q-clay { background: var(--clay); color: #fff; border-color: var(--clay); }
.quick .q-ico { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.16); }
.quick.q-ink .q-ico, .quick.q-sage .q-ico, .quick.q-clay .q-ico { background: rgba(255,255,255,.16); }
.quick:not([class*=" q-"]) .q-ico { background: var(--sage-tint); color: var(--sage-deep); }
.quick .q-title { font-weight: 600; font-size: 1.1rem; }
.quick .q-sub { font-size: 0.82rem; opacity: .8; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 12px; background: var(--ink); color: var(--ivory); padding: 14px 18px; border-radius: var(--r); box-shadow: var(--shadow-lg); font-size: 0.9rem; font-weight: 500; transform: translateX(120%); transition: transform .5s var(--ease); max-width: 360px; }
.toast.show { transform: translateX(0); }
.toast .t-ico { width: 22px; height: 22px; border-radius: 50%; background: var(--sage); display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(28,26,23,.42); backdrop-filter: blur(3px); z-index: 150; opacity: 0; pointer-events: none; transition: opacity .3s; display: grid; place-items: center; padding: 20px; }
.modal-back.show { opacity: 1; pointer-events: auto; }
.modal { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; transform: translateY(16px) scale(.98); transition: transform .35s var(--ease); }
.modal-back.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 24px; }
.modal-foot { padding: 18px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 12px; background: var(--ivory-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--ivory); padding-block: 64px 32px; }
.site-footer a { color: #C8C2B4; transition: color .2s; }
.site-footer a:hover { color: var(--ivory); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.foot-col h4 { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: #837C6E; margin-bottom: 16px; font-weight: 700; }
.foot-col ul { display: flex; flex-direction: column; gap: 11px; font-size: 0.92rem; }
.foot-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.84rem; color: #837C6E; }

/* ---------- Login / role cards ---------- */
.role-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
.role-card { display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--paper); transition: .35s var(--ease); cursor: pointer; text-align: left; }
.role-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.role-ico { width: 50px; height: 50px; border-radius: var(--r); background: var(--sage-tint); color: var(--sage-deep); display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Document (print) ---------- */
.doc-sheet { background: #fff; max-width: 800px; margin-inline: auto; padding: 56px 60px; box-shadow: var(--shadow-lg); border-radius: 6px; color: #222; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 24px; margin-bottom: 28px; }
.doc-title { font-family: var(--font-display); font-size: 1.7rem; }
.doc-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 28px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-bottom: 24px; }
.doc-table th { text-align: left; padding: 11px 12px; background: var(--ivory-2); border-bottom: 1px solid var(--line); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--stone); }
.doc-table td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); }
.doc-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.doc-totals { margin-left: auto; width: 300px; }
.doc-totals .row { justify-content: space-between; padding: 7px 0; font-size: 0.92rem; }
.doc-totals .grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 12px; font-family: var(--font-display); font-size: 1.2rem; }

/* ---------- Utilities ---------- */
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}.mt-6{margin-top:48px}
.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}.mb-4{margin-bottom:32px}
.full{width:100%}.flex1{flex:1}.nowrap{white-space:nowrap}.hide{display:none!important}
.rounded{border-radius:var(--r-lg);overflow:hidden}
.hr { height: 1px; background: var(--line); border: none; margin-block: 24px; }
.ratio-sq{aspect-ratio:1}.ratio-45{aspect-ratio:4/5}.ratio-43{aspect-ratio:4/3}
.thumb{border-radius:var(--r-sm);overflow:hidden;background:var(--ivory-3)}
.thumb img{width:100%;height:100%}

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.reveal { opacity: 0; animation: fadeUp .8s var(--ease) forwards; }
.reveal.in { opacity: 1; }
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
.stagger > * { opacity: 0; animation: fadeUp .7s var(--ease) forwards; }
.stagger > *:nth-child(1){animation-delay:.05s}
.stagger > *:nth-child(2){animation-delay:.12s}
.stagger > *:nth-child(3){animation-delay:.19s}
.stagger > *:nth-child(4){animation-delay:.26s}
.stagger > *:nth-child(5){animation-delay:.33s}
.stagger > *:nth-child(6){animation-delay:.40s}
.stagger > *:nth-child(7){animation-delay:.47s}
.stagger > *:nth-child(8){animation-delay:.54s}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-media { aspect-ratio: 16/11; max-height: 460px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 256px; z-index: 120; transform: translateX(-100%); transition: transform .35s var(--ease); }
  .sidebar.open { transform: none; }
  .app-mobile-toggle { display: inline-flex !important; }
}
@media (max-width: 860px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: 1fr; }
  .nav-links, .nav-search-desktop { display: none; }
  .menu-toggle { display: inline-flex; }
  .quickgrid { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
  .doc-meta-grid { grid-template-columns: 1fr; }
  .doc-sheet { padding: 32px 24px; }
}
@media (max-width: 560px) {
  .container { padding-inline: 18px; }
  .cols-2, .cols-4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.2rem, 11vw, 3rem); }
  .nav { height: 64px; }
  .app-body { padding: 18px; }
  .toast-wrap { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}

/* ---------- Mobile slide nav ---------- */
.mobile-nav { position: fixed; inset: 0; z-index: 100; background: var(--ivory); transform: translateX(100%); transition: transform .4s var(--ease); display: flex; flex-direction: column; padding: 24px; }
.mobile-nav.open { transform: none; }
.mobile-nav a { font-family: var(--font-display); font-size: 1.8rem; padding: 14px 0; border-bottom: 1px solid var(--line); }
.scrim { position: fixed; inset: 0; background: rgba(28,26,23,.4); z-index: 110; opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.show { opacity: 1; pointer-events: auto; }

/* ---------- Print ---------- */
@media print {
  body { background: #fff; }
  .no-print, .site-header, .site-footer, .app-topbar, .sidebar, .toast-wrap, .doc-actions { display: none !important; }
  .doc-sheet { box-shadow: none; max-width: none; padding: 0; }
  .app, .app-main { display: block; }
  @page { margin: 18mm; }
}
