/* Jubilee Procurement — Jubilee Tissue Industries brand: teal J-mark (#00ACA9) with the deep green of the mark,
   and the product colours as accents: Poshy green & purple, Livelle orange, Celine blue. Clean, light, simple. */
:root {
  --teal: #00ACA9; --teal-d: #008C89; --deep: #006F5B; --teal-l: #E2F5F4; --teal-ll: #F1FAFA;
  --green: #69BF4A; --green-d: #4FA233; --green-l: #ECF7E7;
  --orange: #FD6C35; --orange-d: #E2531D; --orange-l: #FFEFE7;
  --purple: #592B82; --purple-l: #F1EAF7;
  --blue: #0066B2; --blue-l: #E6F0F9; --sky: #00B4E6; --yellow: #E1C708;
  --red: #D23B2A; --red-l: #FCEAE7;
  --ink: #17323A; --ink-2: #3D5A61; --muted: #6C8A90;
  --bg: #F3F8F8; --card: #FFFFFF; --line: #DCEAEB; --line-2: #EBF3F4;
  --radius: 14px; --shadow: 0 1px 3px rgba(23,50,58,.06), 0 4px 14px rgba(23,50,58,.04); --shadow-lg: 0 18px 50px rgba(23,50,58,.2);
  --font: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --side: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--teal-d); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 600; }
svg.i { width: 18px; height: 18px; flex-shrink: 0; vertical-align: -3px; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--teal-l); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.hide { display: none !important; }

/* ── shell: sidebar + top bar ───────────────────────── */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; }
.side-logo { display: block; padding: 18px 20px 14px; border-bottom: 1px solid var(--line-2); }
.side-logo img { height: 46px; width: auto; display: block; }
.side-logo span { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.side nav { flex: 1; overflow-y: auto; padding: 10px 12px 16px; }
.side .grp { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin: 16px 10px 6px; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: var(--ink-2); font-weight: 500; position: relative; }
.side nav a:hover { background: var(--teal-ll); color: var(--teal-d); }
.side nav a.on { background: var(--teal-l); color: var(--deep); font-weight: 600; }
.side nav a.on::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--teal); }
.side nav a .cnt { margin-left: auto; background: var(--orange); color: #fff; font-size: 11.5px; font-weight: 700; min-width: 21px; height: 21px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px; }
.side-credit { display: block; padding: 12px 20px 16px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.side-credit img { height: 40px; width: auto; display: block; margin-bottom: 6px; }
.side-credit b { color: var(--blue); }
.top { position: sticky; top: 0; z-index: 30; margin-left: var(--side); background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: linear-gradient(90deg, var(--teal) 0 46%, var(--green) 46% 64%, var(--orange) 64% 78%, var(--purple) 78% 90%, var(--blue) 90%); }
.top-in { display: flex; align-items: center; gap: 12px; padding: 10px 24px; min-height: 62px; }
.top .crumb { font-weight: 600; color: var(--ink-2); font-size: 15px; }
.top-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--teal-l); color: var(--deep); font-weight: 700; display: grid; place-items: center; cursor: pointer; border: 2px solid var(--teal); }
.menu-btn { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.menu-btn svg { width: 26px; height: 26px; }
.top-logo { display: none; }
.usermenu { position: fixed; right: 16px; top: 64px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 240px; padding: 8px; z-index: 60; }
.usermenu .who { padding: 10px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.usermenu .who b { display: block; } .usermenu .who small { color: var(--muted); }
.usermenu a, .usermenu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px 12px; border: 0; background: none; color: var(--ink); border-radius: 8px; cursor: pointer; text-align: left; }
.usermenu a:hover, .usermenu button:hover { background: var(--bg); }
.main { margin-left: var(--side); padding: 26px 28px 110px; max-width: calc(1360px + var(--side)); }
.app-credit { margin-left: var(--side); text-align: center; font-size: 12px; color: var(--muted); padding: 0 16px 28px; margin-top: -70px; }
.app-credit a { color: var(--blue); font-weight: 600; }

/* ── page structure ─────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.title { font-size: 27px; font-weight: 600; letter-spacing: -.2px; color: var(--ink); }
.title::after { content: ''; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--teal); margin-top: 8px; }
.subtitle { color: var(--muted); margin-top: 8px; max-width: 760px; }
.section { margin-top: 22px; }
.section-title { font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-2); margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.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-2-1 { grid-template-columns: minmax(0,2fr) minmax(0,1fr); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line-2); padding: 20px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h3 { font-size: 16px; font-weight: 600; }
.card-h small { color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 13px; } .right { text-align: right; } .center { text-align: center; } .b { font-weight: 600; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.nowrap { flex-wrap: nowrap; }
.stack > * + * { margin-top: 12px; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* hint — the self-guide line on each screen */
.hint { display: flex; gap: 12px; align-items: flex-start; background: var(--teal-ll); border: 1px solid var(--teal-l); color: var(--ink-2); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.hint svg { color: var(--teal); margin-top: 1px; }
.hint b { color: var(--deep); }

/* KPI tiles — brand & product colours */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.kpi { position: relative; border-radius: var(--radius); color: #fff; padding: 18px 18px 16px; min-height: 128px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(23,50,58,.16); }
.kpi::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.12); }
.kpi .ic { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.2); display: grid; place-items: center; margin-bottom: 10px; }
.kpi .ic svg { width: 21px; height: 21px; }
.kpi .lbl { font-size: 13px; font-weight: 500; opacity: .92; text-transform: uppercase; letter-spacing: .5px; }
.kpi .val { font-size: 25px; font-weight: 600; margin-top: 2px; letter-spacing: -.3px; word-break: break-word; }
.kpi .sub { font-size: 12.5px; opacity: .9; margin-top: 2px; }
.kpi.teal { background: linear-gradient(135deg, #00ACA9, #00877F); } .kpi.blue { background: linear-gradient(135deg, #0066B2, #0089D0); }
.kpi.orange { background: linear-gradient(135deg, #FD6C35, #F79232); } .kpi.purple { background: linear-gradient(135deg, #592B82, #7A3FA8); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 10px 17px; font-weight: 600; cursor: pointer; background: var(--teal); color: #fff; white-space: nowrap; transition: background .15s, transform .05s, box-shadow .15s; text-decoration: none; }
.btn:hover { background: var(--teal-d); } .btn:active { transform: translateY(1px); }
.btn.approve { background: var(--green); } .btn.approve:hover { background: var(--green-d); }
.btn.orange { background: var(--orange); } .btn.orange:hover { background: var(--orange-d); }
.btn.deep { background: var(--deep); }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); } .btn.ghost:hover { border-color: var(--teal); color: var(--teal-d); }
.btn.danger { background: var(--red); } .btn.warn { background: #fff; color: var(--red); border: 1.5px solid #F2C7C0; }
.btn.link { background: none; color: var(--teal-d); padding: 6px 8px; } .btn.link:hover { background: var(--teal-ll); }
.btn.sm { padding: 6px 12px; font-size: 13.5px; border-radius: 8px; } .btn.lg { padding: 14px 24px; font-size: 16px; } .btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 0; background: none; cursor: pointer; padding: 6px; border-radius: 8px; color: var(--muted); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--bg); color: var(--red); }

/* forms */
label.f { display: block; } label.f > span { display: block; font-weight: 500; font-size: 13.5px; margin-bottom: 5px; color: var(--ink-2); }
label.f > span i { font-style: normal; color: var(--muted); font-weight: 400; }
.input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; outline: none; transition: border .15s, box-shadow .15s; }
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,172,169,.15); }
textarea.input { min-height: 84px; resize: vertical; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; } .fgrid .full { grid-column: 1 / -1; }
.fgrid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); margin-top: 2px; flex-shrink: 0; }
.err { background: var(--red-l); color: var(--red); padding: 10px 14px; border-radius: 9px; font-weight: 500; font-size: 14px; }
.note { background: var(--teal-l); color: var(--deep); padding: 12px 14px; border-radius: 9px; font-size: 14px; }
.warn { background: var(--orange-l); color: #A43F12; padding: 12px 14px; border-radius: 9px; font-size: 14px; }
.ok { background: var(--green-l); color: #2F6B1B; padding: 12px 14px; border-radius: 9px; font-size: 14px; }
.seg { display: inline-flex; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; flex-wrap: wrap; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-weight: 500; cursor: pointer; color: var(--ink-2); font-size: 14px; }
.seg button.on { background: var(--teal); color: #fff; }
.seg button .n { opacity: .7; margin-left: 4px; font-size: 12px; }
/* toggle switch (settings) */
.switch { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.switch:last-child { border-bottom: 0; }
.switch b { display: block; font-weight: 500; } .switch small { color: var(--muted); display: block; font-size: 13px; }
.tg { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.tg input { opacity: 0; width: 0; height: 0; position: absolute; }
.tg span { position: absolute; inset: 0; background: #C9D9DB; border-radius: 26px; cursor: pointer; transition: background .2s; }
.tg span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.tg input:checked + span { background: var(--teal); } .tg input:checked + span::after { transform: translateX(20px); }
.inline-num { width: 130px; }

/* tables */
.tbl-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; padding: 9px 10px; border-bottom: 2px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--teal-ll); }
.tbl .num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 600; border-bottom: 0; }
.empty { text-align: center; padding: 38px 20px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; color: var(--line); display: block; margin: 0 auto 10px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.b-teal { background: var(--teal-l); color: var(--deep); } .b-green { background: var(--green-l); color: #2F6B1B; } .b-orange { background: var(--orange-l); color: #B5441A; }
.b-purple { background: var(--purple-l); color: var(--purple); } .b-blue { background: var(--blue-l); color: var(--blue); } .b-red { background: var(--red-l); color: var(--red); }
.b-grey { background: var(--line-2); color: var(--ink-2); } .b-urgent { background: var(--red); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

/* bars (charts without a library) */
.bars .br { display: grid; grid-template-columns: minmax(90px, 180px) 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.bars .br > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .bt { display: block; height: 10px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.bars .bf { display: block; height: 100%; border-radius: 6px; background: var(--teal); }
.cols { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 10px; }
.cols .c { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.cols .c i { display: block; width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--teal), var(--deep)); min-height: 3px; }
.cols .c small { font-size: 11px; color: var(--muted); margin-top: 6px; white-space: nowrap; }
.cols .c b { font-size: 10.5px; color: var(--ink-2); margin-bottom: 4px; font-weight: 500; white-space: nowrap; }

/* pipeline (dashboard) */
.pipe { display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 8px; }
.pipe a { background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s; border-top: 4px solid var(--c, var(--teal)); }
.pipe a:hover { transform: translateY(-2px); }
.pipe b { display: block; font-size: 22px; font-weight: 600; } .pipe small { color: var(--muted); font-size: 12px; line-height: 1.25; display: block; }

/* stepper (request) */
.stepper { display: flex; gap: 0; overflow-x: auto; padding: 4px 0 2px; }
.stepper .st { flex: 1; min-width: 92px; text-align: center; position: relative; font-size: 12px; color: var(--muted); font-weight: 500; }
.stepper .st::before { content: ''; position: absolute; top: 13px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.stepper .st:first-child::before { display: none; }
.stepper .st .o { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--line); margin: 0 auto 6px; position: relative; z-index: 1; display: grid; place-items: center; }
.stepper .st.done { color: var(--deep); } .stepper .st.done .o { background: var(--teal); border-color: var(--teal); color: #fff; } .stepper .st.done::before { background: var(--teal); }
.stepper .st.cur { color: var(--orange-d); font-weight: 600; } .stepper .st.cur .o { border-color: var(--orange); background: var(--orange-l); box-shadow: 0 0 0 4px rgba(253,108,53,.15); } .stepper .st.cur::before { background: var(--teal); }
.stepper .st .o svg { width: 14px; height: 14px; }

/* next-step banner */
.next { display: flex; gap: 14px; align-items: center; border-radius: 14px; padding: 16px 18px; background: linear-gradient(135deg, var(--teal-l), #fff 70%); border: 1px solid #C6EAE8; flex-wrap: wrap; }
.next .nic { width: 44px; height: 44px; border-radius: 12px; background: var(--teal); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.next .nic svg { width: 22px; height: 22px; }
.next .ntx { flex: 1; min-width: 220px; } .next .ntx > b { display: block; font-size: 16px; } .next .ntx span { color: var(--ink-2); font-size: 14px; }
.next.you { background: linear-gradient(135deg, #FFF2EB, #fff 70%); border-color: #FFD4C0; } .next.you .nic { background: var(--orange); }
.next.doneb { background: linear-gradient(135deg, var(--green-l), #fff 70%); border-color: #CDE9C1; } .next.doneb .nic { background: var(--green); }

/* inbox approval cards */
.ap { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; }
.ap + .ap { margin-top: 12px; }
.ap .sel { padding-top: 3px; }
.ap .sel input { width: 20px; height: 20px; accent-color: var(--teal); }
.ap h4 { font-size: 16.5px; font-weight: 600; } .ap .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ap .amt { font-size: 20px; font-weight: 600; text-align: right; color: var(--deep); }
.ap .lines { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }
.ap .acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.bulkbar { position: sticky; bottom: 16px; z-index: 20; display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-lg); margin-top: 16px; }
.task { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.task:last-child { border-bottom: 0; } .task:hover .tt { color: var(--teal-d); }
.task .ti { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.task .tt { font-weight: 600; } .task .ts { font-size: 13px; color: var(--muted); }

/* quotation comparison */
.cmp th.sup { text-align: right; white-space: normal; min-width: 130px; } .cmp td:first-child { min-width: 170px; } .cmp td.best { background: var(--green-l); color: #2F6B1B; font-weight: 600; }
.cmp tr.tot td { font-weight: 600; border-top: 2px solid var(--line); } .cmp th.chosen, .cmp td.chosen { box-shadow: inset 0 0 0 2px var(--teal); }
.cmp .na { color: var(--muted); font-style: italic; }
.radio-card { display: flex; gap: 12px; align-items: center; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.radio-card + .radio-card { margin-top: 8px; }
.radio-card.on { border-color: var(--teal); background: var(--teal-ll); }
.radio-card input { accent-color: var(--teal); width: 18px; height: 18px; }

/* line editor */
.lines-ed { width: 100%; border-collapse: collapse; }
.lines-ed th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; text-align: left; padding: 6px; }
.lines-ed td { padding: 5px 4px; vertical-align: top; } .lines-ed .input { padding: 8px 10px; }
.total-bar { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, var(--deep), var(--teal)); color: #fff; padding: 13px 18px; border-radius: 12px; margin-top: 12px; }
.total-bar b { font-size: 22px; font-weight: 600; }

/* timeline */
.tl { position: relative; padding-left: 22px; }
.tl::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl .ev { position: relative; padding: 0 0 14px; }
.tl .ev::before { content: ''; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--c, var(--teal)); }
.tl .ev b { font-weight: 600; } .tl .ev small { color: var(--muted); display: block; } .tl .ev p { margin: 3px 0 0; font-size: 14px; color: var(--ink-2); }

/* auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-hero { position: relative; overflow: hidden; color: #fff; padding: 44px 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 90% at 85% 15%, rgba(105,191,74,.55), transparent 55%), radial-gradient(90% 80% at 10% 90%, rgba(0,102,178,.55), transparent 60%), linear-gradient(160deg, #00A3A0, #006F5B); }
.auth-hero .logo-card { display: inline-block; background: #fff; border-radius: 16px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.auth-hero .logo-card img { height: 54px; display: block; }
.auth-hero h1 { font-size: 40px; font-weight: 600; line-height: 1.12; margin-top: 46px; max-width: 540px; letter-spacing: -.5px; }
.auth-hero h1 em { font-style: normal; color: #D9F5C9; }
.auth-hero p { font-size: 17px; opacity: .94; max-width: 520px; }
.hero-points { display: grid; gap: 12px; margin-top: 28px; max-width: 500px; }
.hero-points div { display: flex; gap: 14px; align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); padding: 12px 16px; border-radius: 12px; backdrop-filter: blur(4px); }
.hero-points svg { width: 22px; height: 22px; flex-shrink: 0; color: #D9F5C9; }
.brand-dots { display: flex; gap: 8px; margin-top: 18px; } .brand-dots i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h2 { font-size: 26px; font-weight: 600; } .auth-card h2::after { content: ''; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--teal); margin-top: 8px; }
.credit-link { color: var(--muted); font-size: 12.5px; } .credit-link b { color: var(--blue); }

/* modal, drawer, toast */
.modal-bg { position: fixed; inset: 0; background: rgba(13,35,40,.45); z-index: 70; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; animation: fade .15s; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); animation: pop .18s; }
.modal.wide { max-width: 960px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.modal-h h3 { font-size: 18px; font-weight: 600; }
.modal-b { padding: 18px 22px; } .modal-f { padding: 12px 22px 18px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(10px); opacity: 0; } }
#toast-root { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 500; box-shadow: var(--shadow-lg); animation: pop .2s; max-width: 90vw; }
.toast.ok { background: var(--deep); } .toast.bad { background: var(--red); }
.help-fab { position: fixed; right: 22px; bottom: 22px; height: 52px; padding: 0 18px 0 14px; border-radius: 26px; background: var(--teal); color: #fff; border: 0; cursor: pointer; z-index: 50; box-shadow: 0 8px 22px rgba(0,140,137,.4); display: flex; align-items: center; gap: 8px; font-weight: 600; }
.help-fab svg { width: 24px; height: 24px; } .help-fab:hover { background: var(--teal-d); }
.drawer-bg { position: fixed; inset: 0; background: rgba(13,35,40,.35); z-index: 75; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(540px, 100%); background: #fff; z-index: 76; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide .2s; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-h { background: linear-gradient(135deg, var(--deep), var(--teal)); color: #fff; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; }
.drawer-h h3 { font-size: 18px; font-weight: 600; }
.drawer-h button { background: rgba(255,255,255,.18); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 20px; }
.drawer-tabs { display: flex; border-bottom: 1px solid var(--line); }
.drawer-tabs button { flex: 1; background: none; border: 0; padding: 12px 6px; font-weight: 600; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; }
.drawer-tabs button.on { color: var(--deep); border-bottom-color: var(--teal); }
.drawer-b { overflow-y: auto; padding: 18px 20px 40px; flex: 1; }
.guide-list button { display: flex; width: 100%; text-align: left; gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; margin-bottom: 8px; }
.guide-list button:hover { border-color: var(--teal); }
.guide-list .n { width: 30px; height: 30px; border-radius: 50%; background: var(--teal-l); color: var(--deep); font-weight: 600; display: grid; place-items: center; flex-shrink: 0; }
.guide-list .here { margin-left: auto; }
.guide h4 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.guide img { width: 100%; border-radius: 10px; border: 1px solid var(--line); margin: 12px 0; display: block; }
.guide ol { padding-left: 20px; } .guide li { margin-bottom: 7px; }
.guide .where { background: var(--orange-l); color: #A43F12; padding: 8px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 500; }
.qref { width: 100%; border-collapse: collapse; font-size: 13.5px; } .qref td { padding: 8px 6px; border-bottom: 1px solid var(--line-2); vertical-align: top; } .qref td:first-child { font-weight: 600; color: var(--deep); white-space: nowrap; }
.support-opt { display: flex; gap: 14px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; color: var(--ink); }
.support-opt:hover { border-color: var(--teal); }
.support-opt .si { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.support-opt b { display: block; } .support-opt small { color: var(--muted); }
.openit { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--blue-l); margin-bottom: 14px; }
.openit img { height: 46px; width: auto; } .openit small { color: var(--ink-2); display: block; }

/* bottom bar (phone) */
.bottombar { display: none; }
.lpo-wrap { background: transparent; }
.pw-wrap { position: relative; display: block; } .pw-wrap .input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }

@media print {
  body { background: #fff; } .side, .top, .help-fab, .bottombar, .no-print, #toast-root, .app-credit { display: none !important; }
  .main { margin: 0; padding: 0; max-width: none; } .card { box-shadow: none; border: 0; }
}
@media (max-width: 1180px) {
  .side { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  body.nav-open .side { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(13,35,40,.35); z-index: 35; }
  .top, .main, .app-credit { margin-left: 0; } .menu-btn { display: block; }
  .top-logo { display: block; height: 34px; }
  .kpis, .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .pipe { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .g-2-1, .g3 { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .top-in { padding: 8px 12px; min-height: 56px; } .top .crumb { display: none; }
  .main { padding: 16px 12px 120px; } .title { font-size: 22px; }
  .g2, .fgrid, .fgrid.three { grid-template-columns: minmax(0,1fr); }
  .tbl.cards td > div { text-align: right; } .tbl.cards td { flex-wrap: wrap; }
  .kpi { min-height: 112px; padding: 14px; } .kpi .val { font-size: 19px; } .kpi .ic { width: 32px; height: 32px; margin-bottom: 6px; }
  .pipe { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .card { padding: 15px; } .tbl-wrap { margin: 0 -15px; padding: 0 15px; }
  .auth-wrap { grid-template-columns: 1fr; } .auth-hero { padding: 24px 20px; } .auth-hero h1 { font-size: 26px; margin-top: 20px; } .hero-points { display: none; }
  .bottombar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); z-index: 40; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottombar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 500; color: var(--muted); padding: 4px; position: relative; }
  .bottombar a svg { width: 23px; height: 23px; } .bottombar a.on { color: var(--teal-d); }
  .bottombar a .cnt { position: absolute; top: 0; left: 52%; background: var(--orange); color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
  .bottombar a.new span.c { background: var(--teal); color: #fff; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; margin-top: -24px; box-shadow: 0 4px 14px rgba(0,140,137,.45); }
  .bottombar a.new em { font-style: normal; color: var(--teal-d); }
  .help-fab { bottom: 82px; right: 12px; height: 46px; padding: 0 14px 0 12px; } .help-fab span { display: none; }
  #toast-root { bottom: 140px; }
  .modal-bg { padding: 0; align-items: flex-end; } .modal { border-radius: 18px 18px 0 0; max-height: 94vh; overflow-y: auto; }
  .ap { grid-template-columns: auto 1fr; } .ap .amt { grid-column: 2; text-align: left; }
  .bulkbar { bottom: 74px; }
  .tbl.cards thead { display: none; } .tbl.cards tr { display: block; border-bottom: 1px solid var(--line-2); padding: 8px 0; }
  .tbl.cards td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 2px; text-align: right; }
  .tbl.cards td::before { content: attr(data-l); color: var(--muted); font-size: 12.5px; text-align: left; font-weight: 500; }
  .tbl.cards td.num { white-space: normal; }
  .lines-ed thead { display: none; } .lines-ed tr { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
  .lines-ed td { padding: 0; } .lines-ed td.desc { grid-column: 1 / -1; }
  .app-credit { margin-top: -96px; padding-bottom: 100px; }
  .amt-head { text-align: left; } .tbl.cards td[data-l="Unit"], .tbl.cards td[data-l="#"] { display: none; } .tbl.cards tfoot td[colspan] { display: none; } .tbl.cards tfoot tr { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── v1.1: signatures, documents, catalogue picker ────────────────────── */
.sigwrap { border: 2px dashed var(--line); border-radius: 12px; background: #fff; position: relative; }
.sigwrap.signed { border-color: var(--teal); border-style: solid; }
.sigpad { width: 100%; height: 190px; display: block; touch-action: none; cursor: crosshair; border-radius: 12px; }
.sigline { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin: 0 14px; padding: 4px 0 6px; font-size: 12px; color: var(--muted); }
.sigbox { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; min-height: 90px; display: grid; place-items: center; }
.sigbox img { max-height: 110px; max-width: 100%; }
.ev .sig { display: block; height: 38px; max-width: 160px; object-fit: contain; object-position: left; margin-top: 4px; background: #fff; border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; }
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.doc { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.doc img, .doc .pdf { width: 100%; height: 120px; object-fit: cover; background: var(--bg); cursor: zoom-in; display: grid; place-items: center; color: var(--red); font-weight: 600; }
.doc .pdf svg { width: 36px; height: 36px; } .doc .pdf { cursor: pointer; text-decoration: none; }
.doc .dm { padding: 8px 10px; font-size: 12.5px; display: grid; gap: 1px; } .doc .dm b { font-size: 13px; } .doc .dm span { color: var(--muted); }
.sig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.sig-card { background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.sig-card img { width: 100%; height: 84px; object-fit: contain; background: #fff; border-bottom: 1px dashed var(--line); margin-bottom: 8px; }
/* catalogue picker */
.picker { border: 1px solid var(--line); border-radius: 14px; background: var(--teal-ll); padding: 12px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chips button { flex-shrink: 0; border: 1.5px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 13px; cursor: pointer; font-weight: 500; font-size: 13.5px; color: var(--ink-2); }
.chips button.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.chips.sub button { font-size: 12.5px; padding: 4px 11px; } .chips.sub button.on { background: var(--deep); border-color: var(--deep); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 10px; max-height: 330px; overflow-y: auto; padding: 2px; }
.tile { position: relative; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; cursor: pointer; user-select: none; transition: border .12s, transform .08s; }
.tile:hover { border-color: var(--teal); } .tile:active { transform: scale(.98); }
.tile b { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; } .tile small { color: var(--muted); font-size: 12px; }
.tile.on { border-color: var(--teal); background: var(--teal-l); }
.tile .q { position: absolute; top: -7px; right: -7px; background: var(--orange); color: #fff; font-weight: 700; border-radius: 12px; min-width: 24px; height: 24px; display: grid; place-items: center; padding: 0 6px; font-size: 12.5px; }
.lines2 .ln { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto 34px; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.lines2 .ln .d b { display: block; } .lines2 .ln .d small { color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.qty button { border: 0; background: var(--bg); width: 32px; height: 36px; cursor: pointer; font-size: 18px; font-weight: 600; color: var(--ink-2); }
.qty input { width: 76px; border: 0; text-align: center; outline: none; height: 36px; }
.lines2 .unit { width: 74px; } .lines2 .price { width: 120px; }
/* categories tree */
.cat-layout { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 16px; align-items: start; }
.tree a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; color: var(--ink-2); cursor: pointer; }
.tree a:hover { background: var(--teal-ll); } .tree a.on { background: var(--teal-l); color: var(--deep); font-weight: 600; }
.tree a .n { margin-left: auto; font-size: 12px; color: var(--muted); } .tree .sub a { padding-left: 30px; font-size: 14px; }
.tree a .ed { opacity: 0; } .tree a:hover .ed { opacity: 1; }
.bulkbar.light { background: var(--deep); }
@media (max-width: 1180px) { .cat-layout { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 760px) {
  .tiles { grid-template-columns: repeat(2, minmax(0,1fr)); max-height: 290px; }
  .lines2 .ln { grid-template-columns: minmax(0,1fr) auto; } .lines2 .ln .d { grid-column: 1 / -1; } .lines2 .unit { width: 70px; } .lines2 .price { width: 100%; }
  .sigpad { height: 170px; }
}
