/* ===================================================================
   HaveDrift — Hi-fi design system
   Scandinavian field-service SaaS · garden/landscaping
   =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700&family=Hanken+Grotesk:wght@400;500;600;700&family=Spline+Sans+Mono:wght@400;500;600&display=swap');

:root{
  /* surfaces */
  --bg:#f3f1e9;
  --bg-2:#ece9df;
  --surface:#ffffff;
  --surface-2:#faf8f2;
  --surface-3:#f4f1e8;

  /* ink */
  --ink:#19211c;
  --ink-2:#5c645b;
  --ink-3:#8b9288;

  /* lines */
  --line:#e7e2d5;
  --line-2:#d9d3c3;

  /* brand */
  --forest:#21492f;
  --forest-2:#193a25;
  --forest-soft:#e4ede2;
  --moss:#5a9a4d;
  --moss-soft:#e8f1e1;
  --clay:#bd6837;
  --clay-soft:#f6e7da;
  --gold:#c0922f;
  --gold-soft:#f3ead0;
  --sky:#5d7c9c;
  --sky-soft:#e7edf3;
  --plum:#7a6a93;
  --plum-soft:#ece8f1;

  /* status */
  --st-plan:#5d7c9c;   --st-plan-bg:#e7edf3;
  --st-prog:#c0922f;   --st-prog-bg:#f4ecd3;
  --st-wait:#bd6837;   --st-wait-bg:#f6e7da;
  --st-done:#5a9a4d;   --st-done-bg:#e8f1e1;
  --st-inv:#7a6a93;    --st-inv-bg:#ece8f1;

  --r:14px; --r-sm:10px; --r-xs:8px; --r-lg:20px; --r-pill:999px;
  --sh-sm:0 1px 2px rgba(25,33,28,.05), 0 1px 1px rgba(25,33,28,.04);
  --sh:0 1px 2px rgba(25,33,28,.04), 0 6px 18px rgba(25,33,28,.06);
  --sh-lg:0 8px 40px rgba(25,33,28,.13);

  --ff-disp:"Bricolage Grotesque", ui-sans-serif, sans-serif;
  --ff:"Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --ff-mono:"Spline Sans Mono", ui-monospace, monospace;
}

*{ box-sizing:border-box; }
html,body{ margin:0; }
body{
  font-family:var(--ff);
  color:var(--ink);
  background:var(--bg);
  font-size:14px; line-height:1.45;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
h1,h2,h3,h4,h5{ font-family:var(--ff-disp); font-weight:600; margin:0; letter-spacing:-.01em; line-height:1.12; }
h1{ font-size:26px; } h2{ font-size:20px; } h3{ font-size:16px; }
.mono{ font-family:var(--ff-mono); font-variant-numeric:tabular-nums; }
.num{ font-family:var(--ff-disp); font-variant-numeric:tabular-nums; font-weight:600; letter-spacing:-.02em; }
a{ color:inherit; text-decoration:none; }
.muted{ color:var(--ink-2); } .dim{ color:var(--ink-3); }
.tiny{ font-size:12px; } .sm{ font-size:13px; } .lg{ font-size:16px; }
.up{ text-transform:uppercase; letter-spacing:.09em; font-size:11px; font-weight:600; color:var(--ink-3); }

/* ---------- page scaffold ---------- */
.page{ padding:26px 30px 60px; max-width:1320px; margin:0 auto; }
.page-head{ display:flex; align-items:flex-end; gap:18px; margin-bottom:22px; }
.page-head .ph-l{ flex:1; min-width:0; }
.page-head .crumbs{ font-size:12.5px; color:var(--ink-3); margin-bottom:6px; display:flex; gap:7px; align-items:center; }
.page-head .crumbs b{ color:var(--ink-2); font-weight:500; }
.page-head h1{ font-size:27px; }
.page-head p{ margin:5px 0 0; color:var(--ink-2); max-width:62ch; }
.head-actions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }

.row{ display:flex; gap:16px; }
.col{ display:flex; flex-direction:column; gap:16px; }
.grow{ flex:1; min-width:0; }
.wrap{ flex-wrap:wrap; }
.between{ justify-content:space-between; }
.center{ align-items:center; }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:var(--ff); font-weight:600; font-size:13.5px;
  padding:9px 15px; border-radius:var(--r-pill); border:1px solid var(--line-2);
  background:var(--surface); color:var(--ink); cursor:pointer; white-space:nowrap;
  box-shadow:var(--sh-sm); transition:.14s; line-height:1;
}
.btn:hover{ transform:translateY(-1px); box-shadow:var(--sh); }
.btn .i{ font-size:15px; line-height:1; }
.btn--primary{ background:var(--forest); color:#fff; border-color:var(--forest); }
.btn--primary:hover{ background:var(--forest-2); }
.btn--ghost{ background:transparent; box-shadow:none; border-color:transparent; }
.btn--ghost:hover{ background:var(--bg-2); box-shadow:none; transform:none; }
.btn--outline{ background:transparent; box-shadow:none; }
.btn--sm{ padding:6px 11px; font-size:12.5px; }
.btn--lg{ padding:12px 20px; font-size:15px; }
.btn--icon{ padding:8px; width:34px; height:34px; }
.btn--block{ width:100%; }

/* ---------- cards ---------- */
.card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--sh-sm); }
.card-head{ display:flex; align-items:center; gap:10px; padding:15px 18px; border-bottom:1px solid var(--line); }
.card-head h3{ font-size:15.5px; }
.card-head .ch-act{ margin-left:auto; display:flex; gap:8px; align-items:center; }
.card-body{ padding:18px; }
.card-body.tight{ padding:12px 14px; }

/* ---------- stat / KPI ---------- */
.stat{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:16px 17px; box-shadow:var(--sh-sm); position:relative; overflow:hidden; }
.stat .label{ font-size:12.5px; color:var(--ink-2); font-weight:500; display:flex; align-items:center; gap:7px; }
.stat .value{ font-family:var(--ff-disp); font-weight:600; font-size:30px; letter-spacing:-.02em; margin-top:8px; line-height:1; }
.stat .value small{ font-size:15px; color:var(--ink-3); font-weight:500; }
.stat .delta{ display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600; margin-top:9px; padding:2px 8px; border-radius:var(--r-pill); }
.delta.up{ color:var(--moss); background:var(--moss-soft); }
.delta.down{ color:var(--clay); background:var(--clay-soft); }
.delta.flat{ color:var(--ink-2); background:var(--bg-2); }
.stat .ico{ position:absolute; top:14px; right:15px; width:30px; height:30px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:16px; background:var(--surface-3); }

/* ---------- badges / status ---------- */
.badge{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; padding:3px 10px; border-radius:var(--r-pill); background:var(--bg-2); color:var(--ink-2); white-space:nowrap; }
.badge .dot{ width:7px; height:7px; border-radius:50%; background:currentColor; }
.st-plan{ background:var(--st-plan-bg); color:#3f5a78; }
.st-prog{ background:var(--st-prog-bg); color:#8a6816; }
.st-wait{ background:var(--st-wait-bg); color:#9a4f23; }
.st-done{ background:var(--st-done-bg); color:#3f7833; }
.st-inv{ background:var(--st-inv-bg); color:#5b4d73; }

.tag{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:500; padding:4px 11px; border-radius:var(--r-pill); border:1px solid var(--line-2); background:var(--surface); color:var(--ink-2); }
.tag--moss{ background:var(--moss-soft); border-color:transparent; color:#3f7833; }
.tag--forest{ background:var(--forest); border-color:var(--forest); color:#fff; }

/* ---------- avatar ---------- */
.av{ width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:600; font-size:13px; color:#fff; flex:0 0 auto; font-family:var(--ff-disp); }
.av--sm{ width:26px; height:26px; font-size:11px; }
.av--lg{ width:44px; height:44px; font-size:16px; }
.av-stack{ display:flex; } .av-stack .av{ margin-left:-9px; box-shadow:0 0 0 2px var(--surface); } .av-stack .av:first-child{ margin-left:0; }
.c1{ background:#3f7833; } .c2{ background:#bd6837; } .c3{ background:#5d7c9c; } .c4{ background:#7a6a93; } .c5{ background:#c0922f; } .c6{ background:#4a7d74; }

/* ---------- table ---------- */
.table{ width:100%; border-collapse:collapse; }
.table th{ text-align:left; font-size:11.5px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-3); padding:11px 14px; border-bottom:1px solid var(--line); }
.table td{ padding:13px 14px; border-bottom:1px solid var(--line); font-size:13.5px; vertical-align:middle; }
.table tr:last-child td{ border-bottom:none; }
.table tbody tr:hover{ background:var(--surface-2); }
.table .right{ text-align:right; } .table .center{ text-align:center; }

/* ---------- inputs (static look) ---------- */
.input{ display:flex; align-items:center; gap:9px; padding:9px 13px; border:1px solid var(--line-2); border-radius:var(--r-sm); background:var(--surface); color:var(--ink-3); font-size:13.5px; }
.input .i{ font-size:15px; }
.field{ display:flex; flex-direction:column; gap:6px; }
.field > label{ font-size:12.5px; font-weight:600; color:var(--ink-2); }
.seg{ display:inline-flex; background:var(--bg-2); border-radius:var(--r-sm); padding:3px; gap:2px; }
.seg span{ padding:6px 13px; border-radius:7px; font-size:13px; font-weight:600; color:var(--ink-2); cursor:pointer; }
.seg span.on{ background:var(--surface); color:var(--ink); box-shadow:var(--sh-sm); }

/* ---------- tabs ---------- */
.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--line); }
.tabs a{ padding:11px 4px; margin:0 12px -1px 0; font-weight:600; font-size:13.5px; color:var(--ink-3); border-bottom:2px solid transparent; cursor:pointer; }
.tabs a.on{ color:var(--forest); border-bottom-color:var(--forest); }

/* ---------- progress ---------- */
.prog{ height:8px; border-radius:var(--r-pill); background:var(--bg-2); overflow:hidden; }
.prog > i{ display:block; height:100%; border-radius:var(--r-pill); background:var(--moss); }
.prog.soon > i{ background:var(--gold); } .prog.due > i{ background:var(--clay); }

/* ---------- misc ---------- */
.divide{ height:1px; background:var(--line); border:none; margin:0; }
.ph-img{ border-radius:var(--r-sm); background:
   repeating-linear-gradient(45deg, transparent 0 11px, rgba(33,73,47,.05) 11px 12px), var(--surface-3);
   border:1px solid var(--line); display:flex; align-items:center; justify-content:center;
   color:var(--ink-3); font-family:var(--ff-mono); font-size:11px; text-align:center; }
.dotmark{ width:8px; height:8px; border-radius:50%; display:inline-block; }
.scroll-x{ overflow-x:auto; }
.grid{ display:grid; gap:16px; }

/* ---------- responsive ---------- */
@media (max-width:760px){
  .page{ padding:18px 16px 48px; }
  .page-head{ flex-wrap:wrap; }
  .page-head .ph-l{ flex:1 1 100%; }
  .page-head .head-actions{ width:100%; justify-content:flex-start; }
  .card-head{ flex-wrap:wrap; }
}
