/* ============================================================
   Carnet221 — design system
   Papier chaud + encre profonde : on remplace un carnet, pas
   un tableur. Vert « teranga » pour l'action, ocre pour l'alerte.
   ============================================================ */

:root {
  --ink:        #14181f;
  --ink-2:      #3c4552;
  --ink-3:      #6b7686;
  --ink-4:      #9aa4b2;
  --line:       #e4e0d8;
  --line-2:     #efece5;
  --paper:      #f7f5f0;
  --surface:    #ffffff;
  --surface-2:  #fbfaf7;

  --brand:      #0e7c66;
  --brand-dark: #0a5c4c;
  --brand-soft: #e3f2ec;
  --accent:     #d98324;
  --accent-soft:#fdf1e0;
  --danger:     #c8443c;
  --danger-soft:#fbe9e7;
  --critical:   #2b2b2b;
  --info:       #2a6fb5;
  --info-soft:  #e7f0fa;

  --radius:     14px;
  --radius-sm:  9px;
  --radius-lg:  22px;
  --shadow-1:   0 1px 2px rgba(20,24,31,.05), 0 1px 3px rgba(20,24,31,.04);
  --shadow-2:   0 4px 6px -2px rgba(20,24,31,.05), 0 12px 24px -8px rgba(20,24,31,.10);
  --shadow-3:   0 24px 48px -16px rgba(20,24,31,.20);

  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Roboto Mono', Menlo, monospace;

  --nav-w: 254px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.021em; line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.06rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

.muted     { color: var(--ink-3); }
.small     { font-size: .845rem; }
.xs        { font-size: .78rem; }
.strong    { font-weight: 700; }
.center    { text-align: center; }
.right     { text-align: right; }
.nowrap    { white-space: nowrap; }
.mono      { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num       { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: .5rem } .mt-2 { margin-top: 1rem } .mt-3 { margin-top: 1.5rem } .mt-4 { margin-top: 2.25rem }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: .5rem } .mb-2 { margin-bottom: 1rem } .mb-3 { margin-bottom: 1.5rem }
.hide { display: none !important; }

/* ---------- Layout ---------- */
.wrap { width: min(1180px, calc(100% - 3rem)); margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .6rem; align-items: center; }
.row-between { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 1.1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-main { grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); align-items: start; }
@media (max-width: 1000px) { .g3, .g4, .g-main { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px)  { .g2, .g3, .g4, .g-main { grid-template-columns: 1fr; } }

/* ---------- Cards & panels ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.card-pad { padding: 1.35rem 1.45rem; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.45rem; border-bottom: 1px solid var(--line-2);
}
.card-head h2, .card-head h3 { font-size: 1rem; letter-spacing: -.01em; }
.card-body { padding: 1.25rem 1.45rem; }
.card-foot { padding: .9rem 1.45rem; border-top: 1px solid var(--line-2); background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 600; font-size: .9rem;
  padding: .58rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .14s ease, border-color .14s ease, transform .06s ease, box-shadow .14s ease;
  text-decoration: none !important;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-4); }
.btn-quiet { background: transparent; color: var(--ink-3); }
.btn-quiet:hover { background: var(--line-2); color: var(--ink); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: #f2cfcb; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-wa { background: #1fa855; color: #fff; }
.btn-wa:hover { background: #17843f; }
.btn-lg { padding: .82rem 1.5rem; font-size: 1rem; border-radius: 11px; }
.btn-sm { padding: .36rem .68rem; font-size: .8rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .34rem;
  padding: .2rem .58rem; border-radius: 999px;
  font-size: .755rem; font-weight: 700; letter-spacing: .01em;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.badge-ok       { background: var(--brand-soft);  color: var(--brand-dark); border-color: #c7e5d9; }
.badge-info     { background: var(--info-soft);   color: var(--info);       border-color: #cfe0f2; }
.badge-warning  { background: var(--accent-soft); color: #a2611a;           border-color: #f3ddba; }
.badge-danger   { background: var(--danger-soft); color: var(--danger);     border-color: #f2cfcb; }
.badge-critical { background: #e9e9e9;            color: var(--critical);   border-color: #d5d5d5; }
.badge-neutral  { background: var(--line-2);      color: var(--ink-3);      border-color: var(--line); }

/* ---------- Avatars ---------- */
.avatar {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark);
  font-weight: 800; font-size: .82rem; letter-spacing: .02em;
}
.avatar-lg { width: 54px; height: 54px; flex-basis: 54px; font-size: 1.1rem; border-radius: 15px; }
.avatar-sm { width: 30px; height: 30px; flex-basis: 30px; font-size: .7rem; border-radius: 9px; }
.avatar.warm { background: var(--accent-soft); color: #a2611a; }
.avatar.cold { background: var(--info-soft); color: var(--info); }
.avatar.hot  { background: var(--danger-soft); color: var(--danger); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th {
  text-align: left; font-size: .715rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--ink-4); padding: .65rem 1.45rem; background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: .78rem 1.45rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.tight, table.data th.tight { width: 1%; white-space: nowrap; }

/* ---------- Forms ---------- */
label, .form-label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: .32rem; }
input[type=text], input[type=tel], input[type=email], input[type=password],
input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: .93rem; color: var(--ink);
  padding: .58rem .72rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .14s ease, box-shadow .14s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14,124,102,.13);
}
textarea { resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7686' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2rem; }
.field { margin-bottom: 1rem; }
.field .help { font-size: .78rem; color: var(--ink-3); margin-top: .3rem; }
.field .error, .form-error { font-size: .8rem; color: var(--danger); margin-top: .3rem; font-weight: 600; }
.checkbox { display: flex; align-items: center; gap: .55rem; font-weight: 500; color: var(--ink-2); }
.checkbox input { width: auto; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
legend { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800;
  color: var(--ink-4); padding: 0 0 .7rem; }

/* ---------- Flashes ---------- */
.flash {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .82rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid; font-size: .9rem; font-weight: 500; margin-bottom: 1rem;
}
.flash-success { background: var(--brand-soft); border-color: #c7e5d9; color: var(--brand-dark); }
.flash-error   { background: var(--danger-soft); border-color: #f2cfcb; color: var(--danger); }
.flash-info    { background: var(--info-soft); border-color: #cfe0f2; color: var(--info); }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0,1fr); min-height: 100vh; }

.sidebar {
  background: #101922; color: #cfd8e0; padding: 1.1rem .85rem 2rem;
  display: flex; flex-direction: column; gap: 1.35rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem 0; color: #fff; }
.sidebar .brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand) 0%, #14a884 100%);
  color: #fff; font-weight: 800; font-size: .82rem; letter-spacing: -.02em;
}
.brand-name { font-weight: 800; letter-spacing: -.02em; font-size: 1.02rem; }

.nav-group + .nav-group { margin-top: 1.1rem; }
.nav-title { font-size: .66rem; text-transform: uppercase; letter-spacing: .11em;
  color: #5f6f7f; font-weight: 800; padding: 0 .75rem .45rem; }
.nav-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem .75rem; border-radius: 9px;
  color: #b6c2cd; font-size: .885rem; font-weight: 600;
}
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(20,168,132,.17); color: #4fd6ae; }
.nav-link .ico { width: 17px; height: 17px; flex: 0 0 17px; opacity: .9; }
.nav-link .count {
  margin-left: auto; font-size: .7rem; font-weight: 800; padding: .07rem .4rem;
  border-radius: 999px; background: var(--danger); color: #fff;
}
.sidebar-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.08); }
.shop-card { display: flex; gap: .6rem; align-items: center; padding: .55rem .6rem; border-radius: 10px; }
.shop-card:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.shop-card .avatar { background: rgba(255,255,255,.1); color: #fff; }
.shop-card .n { color: #fff; font-weight: 700; font-size: .84rem; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.shop-card .s { color: #7d8b99; font-size: .72rem; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247,245,240,.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: .8rem 1.9rem; display: flex; align-items: center; gap: 1rem;
}
.topbar h1 { font-size: 1.16rem; letter-spacing: -.015em; }
.topbar .sub { font-size: .8rem; color: var(--ink-3); }
.topbar-actions { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
.content { padding: 1.6rem 1.9rem 3.5rem; flex: 1; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: column; }
  .topbar, .content { padding-inline: 1.1rem; }
}

.burger { display: none; }
@media (max-width: 900px) {
  .sidebar nav, .sidebar-foot { display: none; }
  .sidebar.open nav, .sidebar.open .sidebar-foot { display: block; }
  .burger { display: inline-flex; }
}

/* ---------- Metric tiles ---------- */
.metric {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.05rem 1.15rem; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: .3rem; min-width: 0;
}
.metric .k { font-size: .715rem; text-transform: uppercase; letter-spacing: .07em;
  font-weight: 800; color: var(--ink-4); display: flex; align-items: center; gap: .4rem; }
.metric .v { font-size: 1.62rem; font-weight: 800; letter-spacing: -.032em;
  font-variant-numeric: tabular-nums; line-height: 1.1; }
.metric .u { font-size: .8rem; font-weight: 700; color: var(--ink-3); margin-left: .18rem; }
.metric .d { font-size: .8rem; color: var(--ink-3); }
.metric.hero {
  background: linear-gradient(150deg, #0f2a26 0%, #113c33 55%, #0e5646 100%);
  border-color: #0b332c; color: #e7f4ef; box-shadow: var(--shadow-2);
}
.metric.hero .k { color: #6ac4a8; }
.metric.hero .v { color: #fff; font-size: 2rem; }
.metric.hero .d { color: #9dc4b7; }
.metric.accent  { border-left: 3px solid var(--accent); }
.metric.danger  { border-left: 3px solid var(--danger); }
.metric.ok      { border-left: 3px solid var(--brand); }
.metric.info    { border-left: 3px solid var(--info); }

/* ---------- Progress ---------- */
.bar { height: 7px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .3s ease; }
.bar.thin { height: 5px; }
.bar > i.warn { background: var(--accent); }
.bar > i.bad  { background: var(--danger); }

/* Barres empilées de vieillissement */
.aging { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line-2); }
.aging > span { display: block; height: 100%; }
.aging .s-ok { background: var(--brand); }
.aging .s-warning { background: var(--accent); }
.aging .s-danger { background: var(--danger); }
.aging .s-critical { background: var(--critical); }
.legend { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; font-size: .8rem; color: var(--ink-2); }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: .38rem; }

/* ---------- Chart (SVG columns) ---------- */
.chart { display: flex; align-items: flex-end; gap: .55rem; height: 178px; padding-top: .5rem; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; gap: .35rem; min-width: 0; height: 100%; }
.chart .pair { display: flex; align-items: flex-end; gap: 3px; width: 100%; height: 100%; justify-content: center; }
.chart .b { width: 46%; max-width: 26px; border-radius: 5px 5px 0 0; min-height: 2px;
  background: var(--brand); transition: opacity .15s; }
.chart .b.b2 { background: var(--accent); }
.chart .col:hover .b { opacity: .82; }
.chart .lbl { font-size: .7rem; color: var(--ink-4); font-weight: 700; white-space: nowrap; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 1.4rem; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 5px; bottom: 5px;
  width: 2px; background: var(--line); }
.timeline .item { position: relative; padding-bottom: 1.1rem; }
.timeline .item:last-child { padding-bottom: 0; }
.timeline .item::before { content: ''; position: absolute; left: -1.4rem; top: 5px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--brand); }
.timeline .item.warn::before { border-color: var(--accent); }
.timeline .item.bad::before  { border-color: var(--danger); }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 3rem 1.5rem; }
.empty .icon { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 1rem;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.empty h3 { margin-bottom: .4rem; }
.empty p { color: var(--ink-3); max-width: 42ch; margin-inline: auto; }

/* ---------- Filter tabs ---------- */
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; }
.tab {
  padding: .4rem .78rem; border-radius: 999px; font-size: .83rem; font-weight: 600;
  color: var(--ink-3); border: 1px solid transparent;
}
.tab:hover { background: var(--line-2); text-decoration: none; color: var(--ink); }
.tab.active { background: var(--ink); color: #fff; }
.tab .n { opacity: .65; margin-left: .25rem; font-variant-numeric: tabular-nums; }

.search { position: relative; flex: 1; min-width: 180px; max-width: 340px; }
.search input { padding-left: 2.1rem; }
.search svg { position: absolute; left: .68rem; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--ink-4); pointer-events: none; }

/* ---------- Public site ---------- */
.pub-nav {
  position: sticky; top: 0; z-index: 40; background: rgba(247,245,240,.9);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.pub-nav .inner { display: flex; align-items: center; gap: 1.4rem; height: 66px; }
.pub-nav .links { display: flex; gap: 1.35rem; margin-left: 1rem; }
.pub-nav .links a { color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.pub-nav .links a:hover { color: var(--brand-dark); text-decoration: none; }
.pub-nav .cta { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
@media (max-width: 820px) { .pub-nav .links { display: none; } }

.hero { padding: 4.2rem 0 3.4rem; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark);
  font-size: .78rem; font-weight: 700; margin-bottom: 1.1rem; border: 1px solid #c7e5d9;
}
.hero h1 { max-width: 15ch; margin-bottom: 1.1rem; }
.hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 52ch; margin-bottom: 1.7rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 3rem; align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 2.2rem; } .hero { padding-top: 2.6rem; } }

.section { padding: 3.4rem 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 2rem; }
.section-head .kicker { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em;
  font-weight: 800; color: var(--brand); margin-bottom: .5rem; }

.feature { padding: 1.35rem; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); }
.feature .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark); margin-bottom: .8rem; }
.feature h3 { font-size: .99rem; margin-bottom: .35rem; }
.feature p { font-size: .885rem; color: var(--ink-3); margin: 0; }

.step { display: flex; gap: 1rem; }
.step .n { flex: 0 0 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-weight: 800; font-size: .85rem; }
.step h3 { font-size: .97rem; margin-bottom: .2rem; }
.step p { font-size: .875rem; color: var(--ink-3); margin: 0; }

.price-card { border: 2px solid var(--brand); border-radius: var(--radius-lg);
  padding: 2rem; background: var(--surface); box-shadow: var(--shadow-2); max-width: 420px; }
.price-card .amt { font-size: 3rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.price-card ul { list-style: none; padding: 0; margin: 1.4rem 0; }
.price-card li { display: flex; gap: .6rem; align-items: flex-start; padding: .34rem 0; font-size: .91rem; }
.price-card li svg { flex: 0 0 17px; color: var(--brand); margin-top: 2px; }

.faq-item { border-bottom: 1px solid var(--line); padding: 1.15rem 0; }
.faq-item h3 { font-size: .99rem; margin-bottom: .4rem; }
.faq-item p { color: var(--ink-3); font-size: .9rem; margin: 0; }

.footer { background: #101922; color: #8d9aa6; padding: 3rem 0 2rem; margin-top: 0; }
.footer a { color: #b6c2cd; font-size: .885rem; }
.footer a:hover { color: #fff; }
.footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; }
.footer .cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
.footer .cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer .bottom { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.09);
  font-size: .83rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 780px) { .footer .cols { grid-template-columns: 1fr 1fr; } }

/* ---------- Mockup (hero) ---------- */
.mock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3); overflow: hidden; }
.mock .bar-top { display: flex; gap: .35rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line-2);
  background: var(--surface-2); }
.mock .bar-top i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.mock .body { padding: 1.1rem; display: grid; gap: .75rem; }
.mock-row { display: flex; align-items: center; gap: .7rem; padding: .55rem .65rem;
  border: 1px solid var(--line-2); border-radius: 10px; }
.mock-row .nm { font-weight: 700; font-size: .855rem; }
.mock-row .ph { font-size: .74rem; color: var(--ink-4); }
.mock-row .am { margin-left: auto; text-align: right; }
.mock-row .am b { display: block; font-size: .89rem; font-variant-numeric: tabular-nums; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); }
.auth-aside { background: linear-gradient(160deg, #0f2a26 0%, #113c33 50%, #0e5646 100%);
  color: #d9ebe4; padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.auth-aside h2 { color: #fff; font-size: 1.7rem; margin-bottom: .9rem; max-width: 18ch; }
.auth-aside p { color: #a5c8bc; max-width: 42ch; }
.auth-aside .pt { display: flex; gap: .7rem; align-items: flex-start; margin-top: 1rem; }
.auth-aside .pt svg { flex: 0 0 18px; color: #4fd6ae; margin-top: 2px; }
.auth-main { display: grid; place-items: center; padding: 2.5rem 1.5rem; }
.auth-box { width: min(480px, 100%); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-aside { display: none; } }

/* ---------- Receipt ---------- */
.receipt {
  width: 340px; margin: 2rem auto; background: #fff; padding: 1.4rem 1.2rem;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: #000;
  border: 1px dashed #bbb;
}
.receipt .sep { border-top: 1px dashed #999; margin: .6rem 0; }
.receipt .r { display: flex; justify-content: space-between; gap: .5rem; }
.receipt .c { text-align: center; }
.receipt .big { font-size: 14px; font-weight: 700; }
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .receipt { border: 0; margin: 0; width: auto; }
}

/* ---------- Item rows (credit form) ---------- */
.items-table { width: 100%; border-collapse: collapse; }
.items-table th { font-size: .715rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-4); font-weight: 800; text-align: left; padding: 0 .5rem .4rem; }
.items-table th:last-child, .items-table td:last-child { text-align: right; }
.items-table td { padding: .28rem .5rem; vertical-align: middle; }
.items-table .line-total { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-remove { background: none; border: 0; color: var(--ink-4); cursor: pointer; padding: .3rem;
  border-radius: 7px; line-height: 0; }
.item-remove:hover { background: var(--danger-soft); color: var(--danger); }
.total-line { display: flex; justify-content: space-between; align-items: baseline;
  padding: .85rem 1rem; border-radius: var(--radius-sm); background: var(--brand-soft);
  border: 1px solid #c7e5d9; margin-top: .9rem; }
.total-line .lbl { font-weight: 700; color: var(--brand-dark); font-size: .88rem;
  text-transform: uppercase; letter-spacing: .06em; }
.total-line .val { font-size: 1.5rem; font-weight: 800; color: var(--brand-dark);
  font-variant-numeric: tabular-nums; letter-spacing: -.03em; }

.quick-amounts { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .45rem; }
.quick-amounts button { font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
  padding: .25rem .55rem; border-radius: 7px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); }
.quick-amounts button:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }

/* ---------- Misc ---------- */
.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1.1rem; font-size: .885rem; }
.kv dt { color: var(--ink-3); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.divide > * + * { border-top: 1px solid var(--line-2); padding-top: .85rem; margin-top: .85rem; }
.list-row { display: flex; align-items: center; gap: .75rem; }
.list-row .grow { min-width: 0; flex: 1; }
.list-row .grow .t { font-weight: 700; font-size: .89rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .grow .s { font-size: .78rem; color: var(--ink-3); }
.sticky-side { position: sticky; top: 5.2rem; }
