@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@112,500;112,700;125,800&family=Source+Sans+3:wght@400;600&display=swap");

:root {
  --ink: #1F2A6B;          /* carbon-copy blue ink */
  --ink-soft: #4A5596;
  --paper: #F4F6FB;        /* pale bill-book paper */
  --sheet: #FFFFFF;
  --rule: #D5DBEC;         /* ruled lines */
  --rule-strong: #AEB7D6;
  --text: #1B1E2B;
  --muted: #5D6375;
  --stamp: #2E7D4F;        /* "OK" stamp green */
  --stamp-bg: #E5F2EA;
  --danger: #B42318;
  --radius-s: 6px;
  --radius-l: 14px;
  --head: "Archivo", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", "Segoe UI", sans-serif;
  --tint-1: #EEF1F9; --tint-2: #E3E8F7; --tint-3: #DDE2F5;
}
/* Colour themes per client (CLIENTS[c].theme): accents follow the login backdrop. */
body.theme-teal {
  --ink: #0E5E63; --ink-soft: #3E8B8C; --paper: #F2F8F7;
  --rule: #CFE4E1; --rule-strong: #9CC7C2;
  --tint-1: #EAF4F2; --tint-2: #DCEEEA; --tint-3: #CBE6E1;
}
body.theme-maroon {
  --ink: #7A1F2E; --ink-soft: #A3505F; --paper: #FBF5F5;
  --rule: #EDD9DC; --rule-strong: #D6AEB5;
  --tint-1: #FAEEF0; --tint-2: #F4DFE3; --tint-3: #EECFD5;
}
body.theme-blue {
  --ink: #1D4FA8; --ink-soft: #4F78C2; --paper: #F3F6FC;
  --rule: #D3DDF0; --rule-strong: #A8BBE0;
  --tint-1: #EDF2FC; --tint-2: #DFE8FA; --tint-3: #CFDDF8;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
}
h1, h2, h3 { font-family: var(--head); color: var(--ink); line-height: 1.15; margin: 0; }
h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; font-stretch: 125%; letter-spacing: -0.01em; }
h2 { font-size: 28px; font-weight: 700; font-stretch: 112%; }
h3 { font-size: 19px; font-weight: 700; font-stretch: 112%; }
p { margin: 0; }
a { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink-soft); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- top bar ---------- */
.bar { border-bottom: 1px solid var(--rule); background: var(--sheet); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 5px;
  display: grid; place-items: center; font-family: var(--head); font-weight: 800; color: var(--ink); font-size: 16px;
  background: repeating-linear-gradient(to bottom, transparent 0 6px, var(--rule) 6px 7px);
}
.brand-name { font-family: var(--head); font-weight: 800; font-stretch: 125%; font-size: 20px; color: var(--ink); }
.bar-actions { display: flex; gap: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16px/1 var(--body); padding: 12px 18px; border-radius: var(--radius-s);
  border: 1.5px solid var(--ink); cursor: pointer; text-decoration: none;
}
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #17205A; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--tint-2); }
.btn-small { padding: 8px 14px; font-size: 15px; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero p.lead { font-size: 20px; color: var(--muted); margin-top: 18px; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 14px; font-size: 15px; color: var(--muted); }

/* the day's book */
.book {
  background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius-l);
  padding: 22px 22px 18px; position: relative;
}
.book-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.book-head h3 { font-size: 17px; }
.book-date { color: var(--muted); font-size: 15px; }
.book-rows { list-style: none; margin: 0; padding: 0; min-height: 296px; }
.book-rows li {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: baseline;
  padding: 9px 2px; border-bottom: 1px solid var(--rule); font-size: 15.5px;
}
.book-rows .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.book-rows .what { color: var(--text); }
.book-rows .qty { font-family: var(--head); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.book-rows .qty.out { color: var(--danger); }
.book-rows li.new { animation: ink-in .7s ease-out; }
@keyframes ink-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.stamp {
  position: absolute; right: 18px; bottom: -16px; transform: rotate(-6deg);
  border: 2.5px solid var(--stamp); color: var(--stamp); background: var(--stamp-bg);
  font-family: var(--head); font-weight: 800; font-stretch: 112%; font-size: 15px;
  padding: 4px 12px; border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) { .book-rows li.new { animation: none; } }

/* ---------- teams ---------- */
.section { padding: 56px 0; border-top: 1px solid var(--rule); }
.section-intro { max-width: 60ch; color: var(--muted); margin-top: 10px; }
.teams { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 32px; border-top: 2px solid var(--ink); }
.team-col { padding: 0 20px; border-left: 1px solid var(--rule); }
.team-col:first-child { padding-left: 0; border-left: 0; }
.team-col:last-child { padding-right: 0; }
.team { padding: 20px 0 8px; }
.team + .team { margin-top: 16px; border-top: 2px solid var(--ink); }
.team p.blurb { color: var(--muted); font-size: 15px; margin: 4px 0 12px; }
.team ul { list-style: none; padding: 0; margin: 0; }
.team li { padding: 8px 0; border-top: 1px solid var(--rule); }
.team li b { color: var(--ink); font-weight: 600; display: block; }
.team li span { font-size: 14.5px; color: var(--muted); }

/* ---------- steps (a real sequence) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 28px; counter-reset: s; }
.step { counter-increment: s; }
.step::before {
  content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--ink); font-family: var(--head); font-weight: 800; color: var(--ink); margin-bottom: 12px;
}
.step p { color: var(--muted); margin-top: 6px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule); padding: 26px 0 40px; color: var(--muted); font-size: 14.5px; }
.foot .wrap { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 12px; text-align: center; }
@media (min-width: 561px) { .foot .wrap > * + *::before { content: "·"; margin-right: 12px; } }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
/* login backdrop: same as Accounting-Books - dark at the top, light teal glow low down,
   soft painted-canvas texture. The header keeps its white bar; the footer turns light. */
.login-page {
  background-color:#073f49;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' preserveAspectRatio='none'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 .08  0 0 0 0 .1  0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23g)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800' preserveAspectRatio='none'%3E%3Cfilter id='l' x='0' y='0' width='100%' height='100%'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004' numOctaves='6' seed='17'/%3E%3CfeColorMatrix values='0 0 0 0 .25  0 0 0 0 .62  0 0 0 0 .6  0.45 0 0 0 -0.2'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23l)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800' preserveAspectRatio='none'%3E%3Cfilter id='d' x='0' y='0' width='100%' height='100%'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0035' numOctaves='6' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .01  0 0 0 0 .12  0 0 0 0 .15  0.9 0 0 0 -0.3'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23d)'/%3E%3C/svg%3E"),
    linear-gradient(180deg,rgba(2,16,22,.95) 0%,rgba(3,24,32,.75) 22%,rgba(4,30,38,.35) 45%,transparent 65%),
    radial-gradient(ellipse 140% 80% at 50% 100%,transparent 55%,rgba(3,26,34,.35) 100%),
    radial-gradient(ellipse 75% 60% at 45% 92%,#22a39c 0%,#19908b 25%,#11736f 50%,#0b5a5f 80%,#084550 100%);
  background-size:140px 140px,cover,cover,100% 100%,100% 100%,100% 100%;
  background-attachment:fixed;
}
/* maroon backdrop, for clients with theme: "maroon" */
.login-page.theme-maroon {
  background-color:#3a0d16;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' preserveAspectRatio='none'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1  0 0 0 0 0  0 0 0 0 .02  0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23g)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800' preserveAspectRatio='none'%3E%3Cfilter id='l' x='0' y='0' width='100%' height='100%'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004' numOctaves='6' seed='17'/%3E%3CfeColorMatrix values='0 0 0 0 .78  0 0 0 0 .4  0 0 0 0 .45  0.45 0 0 0 -0.2'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23l)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800' preserveAspectRatio='none'%3E%3Cfilter id='d' x='0' y='0' width='100%' height='100%'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0035' numOctaves='6' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .12  0 0 0 0 .02  0 0 0 0 .04  0.9 0 0 0 -0.3'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23d)'/%3E%3C/svg%3E"),
    linear-gradient(180deg,rgba(18,3,7,.95) 0%,rgba(26,5,10,.75) 22%,rgba(34,7,13,.35) 45%,transparent 65%),
    radial-gradient(ellipse 140% 80% at 50% 100%,transparent 55%,rgba(28,5,10,.45) 100%),
    radial-gradient(ellipse 75% 60% at 45% 92%,#b04257 0%,#963246 25%,#7a2436 50%,#5e1928 80%,#45101d 100%);
  background-size:140px 140px,cover,cover,100% 100%,100% 100%,100% 100%;
  background-attachment:fixed;
}
/* blue backdrop, for clients with theme: "blue" */
.login-page.theme-blue {
  background-color:#0a1d44;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' preserveAspectRatio='none'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 .03  0 0 0 0 .12  0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23g)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800' preserveAspectRatio='none'%3E%3Cfilter id='l' x='0' y='0' width='100%' height='100%'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004' numOctaves='6' seed='17'/%3E%3CfeColorMatrix values='0 0 0 0 .3  0 0 0 0 .45  0 0 0 0 .85  0.45 0 0 0 -0.2'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23l)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800' preserveAspectRatio='none'%3E%3Cfilter id='d' x='0' y='0' width='100%' height='100%'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0035' numOctaves='6' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .01  0 0 0 0 .04  0 0 0 0 .14  0.9 0 0 0 -0.3'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23d)'/%3E%3C/svg%3E"),
    linear-gradient(180deg,rgba(3,8,24,.95) 0%,rgba(4,12,34,.75) 22%,rgba(5,16,44,.35) 45%,transparent 65%),
    radial-gradient(ellipse 140% 80% at 50% 100%,transparent 55%,rgba(3,10,30,.45) 100%),
    radial-gradient(ellipse 75% 60% at 45% 92%,#2f6bd0 0%,#2456b4 25%,#1a3f8e 50%,#122d6a 80%,#0b1f4d 100%);
  background-size:140px 140px,cover,cover,100% 100%,100% 100%,100% 100%;
  background-attachment:fixed;
}
.login-page .login-card { box-shadow: 0 20px 50px rgba(0,0,0,.28); border-color: transparent; }
.login-page .foot { border-top-color: rgba(255,255,255,.15); color: rgba(255,255,255,.75); }
.login-page .foot a { color: #fff; }

.login-main { display: grid; place-items: center; padding: 40px 16px; }
.login-card {
  width: 100%; max-width: 440px; background: var(--sheet); border: 1px solid var(--rule-strong);
  border-radius: var(--radius-l); padding: 28px;
}
.switch { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--ink); border-radius: var(--radius-s); overflow: hidden; margin-bottom: 22px; }
.switch button { font: 600 15px var(--body); padding: 10px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.client-line { color: var(--muted); font-size: 15px; margin: 6px 0 20px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field input {
  width: 100%; font: 400 16px var(--body); padding: 11px 12px; border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius-s); background: #fff; color: var(--text);
}
.field input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--tint-3); }
.form-error { color: var(--danger); font-size: 15px; min-height: 22px; margin: -4px 0 10px; }
.demo-hint { margin-top: 18px; padding: 12px 14px; border: 1px dashed var(--rule-strong); border-radius: var(--radius-s); font-size: 14.5px; color: var(--muted); }
.demo-hint code { font-family: var(--body); font-weight: 600; color: var(--ink); }

/* ---------- portal shell ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { background: var(--sheet); border-right: 1px solid var(--rule); display: flex; flex-direction: column; }
.side-top { padding: 18px 18px 14px; border-bottom: 1px solid var(--rule); }
.side-client { font-weight: 600; margin-top: 12px; }
.side-user { font-size: 14.5px; color: var(--muted); }
.side nav { padding: 10px; flex: 1; overflow-y: auto; }
.side nav h4 { font: 600 13.5px var(--body); color: var(--muted); margin: 14px 10px 6px; }
.side nav button {
  display: block; width: 100%; text-align: left; font: 400 16px var(--body); color: var(--text);
  background: none; border: 0; border-radius: var(--radius-s); padding: 9px 10px; cursor: pointer;
}
.side nav button:hover { background: var(--tint-1); }
.side nav button[aria-current="page"] { background: var(--tint-2); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--ink); }
.side-foot { padding: 14px 18px; border-top: 1px solid var(--rule); font-size: 13.5px; color: var(--muted); text-align: center; }
.main { display: flex; flex-direction: column; min-width: 0; }
.main-bar { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--rule); background: var(--sheet); }
.main-bar h2 { font-size: 20px; }
.menu-btn { display: none; }
.view { padding: 28px 24px; flex: 1; }
.frame { width: 100%; height: calc(100vh - 60px); border: 0; display: block; background: #fff; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 20px; }
.mod {
  text-align: left; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius-l);
  padding: 18px; cursor: pointer; font: inherit; color: inherit;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
}
.mod:hover { border-color: var(--ink); }
.mod p { color: var(--muted); font-size: 15px; margin-top: 6px; }
.status { display: inline-block; font-size: 13.5px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.status.live { color: var(--stamp); background: var(--stamp-bg); }
.status.soon { color: var(--muted); background: #EEF0F5; }
.empty {
  max-width: 560px; margin: 40px auto; text-align: center; background: var(--sheet);
  border: 1px dashed var(--rule-strong); border-radius: var(--radius-l); padding: 36px 28px;
}
.empty p { color: var(--muted); margin: 10px 0 18px; }

/* ---------- catalog ---------- */
.cat-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 22px; }
.cat-tools input { flex: 1; min-width: 200px; font: 400 16px var(--body); padding: 10px 12px; border: 1.5px solid var(--rule-strong); border-radius: var(--radius-s); }
.chip { font: 600 14.5px var(--body); padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--rule-strong); background: #fff; color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product { background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius-l); overflow: hidden; display: flex; flex-direction: column; }
.product .pic {
  aspect-ratio: 4 / 3; display: grid; place-items: center; font-family: var(--head); font-weight: 800; font-stretch: 125%;
  font-size: 30px; color: var(--ink-soft); background: repeating-linear-gradient(to bottom, #F7F8FC 0 22px, var(--rule) 22px 23px);
}
.product .pic img { width: 100%; height: 100%; object-fit: cover; }
.product .info { padding: 14px; }
.product .cat { font-size: 13.5px; color: var(--muted); }
.product h3 { font-size: 17px; margin-top: 2px; }
.packs { list-style: none; margin: 10px 0 0; padding: 0; }
.packs li { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.packs b { font-family: var(--head); color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .teams { grid-template-columns: 1fr; }
  .team-col, .team-col:first-child { padding: 0; border-left: 0; }
  .team-col + .team-col .team:first-child { margin-top: 16px; border-top: 2px solid var(--ink); }
  .steps { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 20; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(20, 25, 60, .35); }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 560px) {
  .teams { grid-template-columns: 1fr; }
  .bar-actions .btn-line { display: none; }
}

/* ---------- admin screens ---------- */
.muted { color: var(--muted); font-size: 15px; }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 22px 0 12px; }
.tbl { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius-l); overflow: hidden; }
.tbl th { text-align: left; font: 600 14px var(--body); color: var(--muted); padding: 10px 14px; border-bottom: 2px solid var(--ink); background: #F9FAFD; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; font-size: 15.5px; }
.tbl tr:last-child td { border-bottom: 0; }
.panel { background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius-l); padding: 20px; margin-top: 18px; }
.panel h3 { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.field select { width: 100%; font: 400 16px var(--body); padding: 10px 12px; border: 1.5px solid var(--rule-strong); border-radius: var(--radius-s); background: #fff; color: var(--text); }
.field input[readonly] { background: #F3F5FA; color: var(--muted); }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mod .status { margin-top: 12px; }

/* ---------- install bar ---------- */
.install-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; margin: 0 auto; max-width: 560px;
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px;
  background: var(--sheet); color: var(--text); border: 1.5px solid var(--ink); border-radius: var(--radius-l);
  font-size: 15.5px; box-shadow: 0 6px 24px rgba(10, 30, 50, .18);
}
.install-bar span { flex: 1; }
.install-close { background: none; border: 0; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }

/* ---------- company setup wizard ---------- */
.wiz-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.wiz-step { display: flex; align-items: center; gap: 8px; font: 600 15px var(--body); padding: 8px 14px 8px 8px; border-radius: 999px;
  border: 1.5px solid var(--rule-strong); background: var(--sheet); color: var(--ink); cursor: pointer; }
.wiz-step b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tint-2); color: var(--ink); font-size: 13px; }
.wiz-step.done b { background: var(--stamp-bg); color: var(--stamp); }
.wiz-step.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.wiz-step.on b { background: #fff; color: var(--ink); }
.wiz-sub { margin: 16px 0 8px; font: 600 16px var(--head); color: var(--ink); }
.tbl .cell, input.cell, select.cell { width: 100%; font: 400 15px var(--body); padding: 7px 9px; border: 1.5px solid var(--rule-strong); border-radius: var(--radius-s); background: #fff; color: var(--text); }
.tbl .cell:focus, input.cell:focus, select.cell:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--tint-3); }
.tbl .cell[readonly] { background: #F3F5FA; color: var(--muted); }
.tbl td small { display: block; margin-top: 3px; font-size: 12px; }
.tbl tr.off td { color: var(--muted); }
.wiz-errs { margin: 6px 0 10px 18px; font-size: 15px; color: var(--danger); max-height: 260px; overflow: auto; }
.wiz-errs li { margin: 3px 0; }
.ok-msg { color: var(--stamp); font-weight: 600; }
.wiz-help { margin: 4px 0 12px; }
.wiz-help summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.wiz-review { margin-top: 12px; padding: 14px; border: 1px dashed var(--rule-strong); border-radius: var(--radius-s); background: var(--paper); }
@media (max-width: 720px) {
  .tbl { display: block; overflow-x: auto; }
}

/* ---------- product catalog editor (Marketing) ---------- */
.cat-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ca-card { background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: var(--radius-l); overflow: hidden; display: flex; flex-direction: column; }
.ca-card.is-hidden { opacity: .72; border-style: dashed; }
.ca-pic { aspect-ratio: 4 / 3; background: var(--tint-1); display: grid; place-items: center; overflow: hidden; }
.ca-pic img { width: 100%; height: 100%; object-fit: cover; }
.ca-pic span { font-family: var(--head); font-weight: 800; font-size: 40px; color: var(--ink-soft); }
.ca-photo-actions { display: flex; gap: 8px; padding: 10px 14px 0; flex-wrap: wrap; }
.ca-photo-actions label { cursor: pointer; }
.ca-body { padding: 10px 14px 14px; }
.ca-body h3 { font-size: 17px; }
.ca-packs { font-size: 14px; margin: 4px 0 10px; }
.ca-body .field { margin-bottom: 10px; }
.ca-body textarea { width: 100%; font: 400 15px var(--body); padding: 9px 11px; border: 1.5px solid var(--rule-strong); border-radius: var(--radius-s); resize: vertical; }
.ca-body textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--tint-3); }
.ca-row { display: flex; align-items: flex-end; gap: 14px; }
.ca-check { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 20px; cursor: pointer; }
.ca-check input { width: 18px; height: 18px; accent-color: var(--ink); }
.ca-msg { font-size: 14px; align-self: center; }

/* ---------- Sales Desk ---------- */
.sd-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 14px; margin-bottom: 8px; }
.sd-tools .field { margin-bottom: 12px; min-width: 150px; }
.sd-tools .btn { margin-bottom: 12px; }
.sd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 18px; }
.sd-tiles div { background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 12px; padding: 12px 14px; }
.sd-tiles b { display: block; font-family: var(--head); font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.sd-tiles span { font-size: 13.5px; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.is-cancelled td { color: var(--muted); text-decoration: line-through; }
.tbl tr.is-cancelled td.row-btns, .tbl tr.is-cancelled td .pill-x { text-decoration: none; }
.row-btns { white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.pill-x { display: inline-block; font: 600 12px var(--body); padding: 2px 8px; border-radius: 999px; background: #FDECEA; color: var(--danger); }

/* the hidden attribute always wins over a class that sets display */
[hidden]{display:none!important}
/* demo company: what each app does */
.demo-info { text-align: left; max-width: 640px; }
.demo-info h4 { margin: 14px 0 6px; color: var(--ink); }
.demo-info ul { margin: 0 0 16px 20px; padding: 0; line-height: 1.7; }
.demo-note { background: var(--paper); border-radius: 10px; padding: 12px 14px; color: var(--ink) !important; }
.status.custom { color: var(--ink); background: var(--paper); border: 1px solid var(--ink-soft); }

/* ---------- contact ---------- */
.bar-link { color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; margin-right: 6px; }
.bar-link:hover { text-decoration: underline; }
.contact { background: var(--paper); }
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-points { margin: 18px 0; padding-left: 20px; line-height: 1.9; }
.contact-direct { color: var(--muted); }
.contact-direct a { color: var(--ink); }
.contact-form { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-l); padding: 24px; }
.field textarea { width: 100%; font: 400 16px var(--body); padding: 11px 12px; border: 1.5px solid var(--rule-strong); border-radius: var(--radius-s); background: #fff; color: var(--text); resize: vertical; }
.field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--tint-3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-done { font-weight: 600; color: var(--ink); margin: 0; }
@media (max-width: 760px) { .contact-wrap { grid-template-columns: 1fr; gap: 20px; } .bar-link { display: none; } }
.contact-direct { display: flex; flex-direction: column; gap: 12px; }
.contact-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-direct a.btn-ink { color: #fff; }
.demo-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--paper); border: 1px solid var(--ink-soft); border-radius: var(--radius-l); padding: 14px 16px; margin-bottom: 18px; }
.demo-info .contact-direct a.btn-ink, .demo-ask a.btn-ink { color: #fff; }
.demo-login-ask { margin-top: 12px; gap: 8px; } .demo-login-ask a.btn-ink { color: #fff; }
/* people: one-time password box and remove button */
.pw-box { background: var(--paper); border: 1px solid var(--ink-soft); border-radius: var(--radius-s); padding: 12px 14px; margin: 12px 0; line-height: 1.6; }
.btn-danger { color: #A23A2A !important; border-color: #E2B4AB !important; }
.btn-danger:hover { background: #FBEDEA !important; }
