/* Karabo Parking Hub on top of the shared Webcafe app.css (same look as webcafe.kit). The customer's
   brand colour (--brand, Set-up > Settings) drives buttons and highlights. */
:root { --brand: #86C53C; --brand-ink: #0E1B38; }

.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { filter: brightness(.93); }
.site-header { border-bottom: 3px solid var(--brand); }
.site-header .nav-link.active { box-shadow: inset 0 -3px 0 var(--brand); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

.brand-mark { display: flex; align-items: center; min-height: 40px; }
.brand-mark img { max-height: 44px; max-width: 220px; object-fit: contain; }
.brand-name { font: 800 20px/1.1 var(--font-head); color: var(--navy); letter-spacing: -.01em; }

.bell { position: relative; font-size: 18px; }
.bell .dot { position: absolute; top: 2px; right: 0; background: var(--red); color: #fff; border-radius: 10px;
    font: 700 10px/1 var(--font-body); padding: 3px 5px; }

/* column widths */
.w-ref { width: 92px; } .w-sm { width: 90px; } .w-md { width: 130px; } .w-lg { width: 170px; } .w-xl { width: 220px; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tr.is-low td { background: var(--amber-soft); }
.data-table tr.is-out td { background: var(--red-soft); }
.data-table tr.over td { background: var(--amber-soft); }
.data-table.mini th, .data-table.mini td { padding: 4px 8px; font-size: 13px; }
.data-table tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-actions { display: flex; flex-wrap: nowrap; gap: 4px; justify-content: flex-end; }
.btn-icon { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.btn-icon.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.role-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.role-list dt { font-weight: 700; } .role-list dd { margin: 0; }
@media (max-width: 575px) { .role-list { grid-template-columns: 1fr; gap: 2px; } .role-list dd { margin-bottom: 8px; } }

/* status badges */
.rs-submitted, .rs-step1, .ps-draft { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-line); }
.rs-approved, .ps-ordered, .ps-partial { background: var(--ice); color: var(--link); border: 1px solid var(--frost); }
.rs-dispatched { background: #EEF2FF; color: #3730A3; border: 1px solid #C7D2FE; }
.rs-received, .ps-received { background: var(--lime-soft); color: var(--lime-ink); border: 1px solid #C9E7A7; }
.rs-declined, .rs-cancelled, .ps-cancelled { background: #F1F5F9; color: var(--slate); border: 1px solid var(--line); }
.lvl-off { background: #F1F5F9; color: var(--slate); }
.st-ok { background: var(--lime-soft); color: var(--lime-ink); }
.st-pending { background: var(--amber-soft); color: var(--amber); }
.flag { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; }
.flag.warn { color: var(--amber); } .flag.bad { color: var(--red); } .flag.good { color: var(--lime-ink); }

/* two-column page: work on the left, history on the right */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.split > * { min-width: 0; }
.compact-kv { grid-template-columns: 90px 1fr; font-size: 14px; }
.hold-list, .req-history { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.hold-list li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.req-history li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.req-history li:last-child { border-bottom: 0; }
.req-history .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.req-history .sub { color: var(--slate); }

/* the item order grid */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.item-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.item-card.extra { border-style: dashed; }
.item-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.item-head .nm { font-weight: 600; color: var(--navy); }
.item-head .price { margin-left: auto; color: var(--slate); font-size: 13px; white-space: nowrap; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.size-box { display: flex; flex-direction: column; align-items: center; width: 52px; font-size: 12px; color: var(--slate); }
.size-box input { width: 52px; padding: 4px 2px; text-align: center; -moz-appearance: textfield; }
.size-box input::-webkit-outer-spin-button, .size-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.size-box input:not(:placeholder-shown):not([value=""]) { border-color: var(--brand); }

.line-table select { min-width: 90px; }
.line-table input[type=number] { width: 70px; }
.lines-total { text-align: right; font-weight: 600; margin-top: 8px; }
.terms { background: var(--ice); border: 1px solid var(--frost); border-radius: 10px; padding: 12px 14px; font-size: 14px; }

/* staff self-service */
.staff-wrap { max-width: 980px; margin: 0 auto; }
.staff-hello { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.big-ref { font: 800 32px/1.1 var(--font-head); color: var(--navy); }

.tiles a.tile { text-decoration: none; }
.tile .num, .tile .lbl { display: block; }
.data-table.mini th.num, .data-table.mini td.num { width: 64px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-grid > * { min-width: 0; }

@media (max-width: 1000px) { .split, .dash-grid { grid-template-columns: 1fr; } }

/* printable dispatch note / purchase order */
.print-doc { background: #fff; max-width: 820px; margin: 0 auto; padding: 24px; border: 1px solid var(--line); }
.print-doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.print-doc th, .print-doc td { border: 1px solid #94A3B8; padding: 6px 8px; text-align: left; }
.print-doc .sig { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 48px; }
.print-doc .sig div { border-top: 1px solid #0F172A; padding-top: 6px; font-size: 13px; }
@media print {
    body { background: #fff; }
    .no-print { display: none !important; }
    .print-doc { border: 0; padding: 0; }
}

/* platform admin impersonating a company (same idea as DonorMS's impersonate badge) */
.impersonate-bar { background: var(--amber-soft); border-bottom: 2px solid var(--amber-line); color: var(--navy); font-size: 14px; }
.impersonate-bar .container-xl { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; }
.impersonate-bar .bar-actions { display: flex; gap: 8px; align-items: center; }
.impersonate-bar form { margin: 0; }

/* subscription banner for company users (kitapp/billing.py) */
.sub-bar { font-size: 14px; padding: 8px 0; border-bottom: 2px solid; }
.sub-bar.sub-warning { background: var(--amber-soft); border-color: var(--amber-line); color: var(--navy); }
.sub-bar.sub-danger { background: var(--red-soft); border-color: #FECACA; color: #991B1B; }
/* platform dashboard KPIs */
.kpi-group { margin-bottom: 1.5rem; }
.kpi-group h2 { font-size: 1rem; margin-bottom: .6rem; } .kpi-group h2 .muted { font-weight: 400; font-size: .85rem; }
.kpi .delta { font-size: .78rem; font-weight: 600; margin-top: .3rem; }
.kpi .delta.good { color: var(--lime-ink); } .kpi .delta.bad { color: var(--red); } .kpi .delta.flat { color: var(--slate); }
.kpi .note { font-size: .74rem; color: var(--slate); }
.period-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: 1.25rem; }
.print-only { display: none; } @media print { .print-only { display: block; } .no-print { display: none !important; } }
.data-table .btn { white-space: nowrap; }
.kpi .num { font-size: 1.5rem; white-space: nowrap; }

/* demo sign-in page (/karabo, dev only) */
.demo-wrap { max-width: 980px; margin: 0 auto; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.demo-card { margin: 0; }
.demo-btn { width: 100%; height: 100%; text-align: left; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px;
    row-gap: 2px; align-items: start; padding: 16px; background: var(--white); border: 1px solid var(--line);
    border-left: 4px solid var(--brand); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; }
.demo-btn:hover, .demo-btn:focus-visible { border-color: var(--brand); background: var(--ice); }
.demo-btn .bi { grid-row: span 3; font-size: 26px; color: var(--navy); line-height: 1; padding-top: 2px; }
.demo-role { font: 700 1.05rem/1.3 var(--font-head); color: var(--navy); }
.demo-note { font-size: .84rem; color: var(--slate); }
.demo-who { font-size: .78rem; color: var(--slate); margin-top: 4px; }
.demo-staff { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }

/* company footer: the company's look, like the header (white, brand-colour line, its logo) */
.site-footer.company-footer { background: var(--white); color: var(--slate); border-top: 3px solid var(--brand); padding: 1rem 0; }
.company-footer .copy { margin-top: 0; padding-top: 0; border-top: 0; align-items: center; }
.company-footer .footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--navy); }
.company-footer .footer-brand img { max-height: 28px; max-width: 120px; object-fit: contain; }
.company-footer a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: 3px; }
.company-footer a:hover { color: var(--navy); text-decoration-thickness: 2px; }
.rs-returned { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }

/* ---- Karabo Parking Hub ---- */
/* record status: draft / submitted / sent back / approved; slips: to verify / verified / rejected */
.cs-draft { background: #F1F5F9; color: var(--slate); border: 1px solid var(--line); }
.cs-submitted, .ss-pending { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-line); }
.cs-returned, .ss-rejected { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-line); }
.cs-approved, .ss-verified { background: var(--lime-soft); color: var(--lime-ink); border: 1px solid #C9E7A7; }
.short { color: var(--red); font-weight: 600; } .over { color: var(--amber); font-weight: 600; } .square { color: var(--lime-ink); }
.data-table tr.is-total td { font-weight: 700; background: #FBFDFF; border-top: 2px solid var(--line); }
.data-table tr.gap td { background: var(--amber-soft); }

/* capture grid: tariffs down, pay points across, like the Payments sheet */
.capture-grid { min-width: 100%; }
.capture-grid th, .capture-grid td { white-space: nowrap; }
.capture-grid input.form-control { width: 76px; padding: 4px 6px; text-align: right; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.capture-grid input.money { width: 96px; }
.capture-grid input::-webkit-outer-spin-button, .capture-grid input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.capture-grid .tl { color: var(--navy); font-weight: 600; } .capture-grid .tp { color: var(--slate); font-size: .8rem; }
.capture-grid tfoot td, .capture-grid .rowsum { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.capture-grid tr.sep td { border-top: 2px solid var(--line); }
.mini-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 16px; }
.mini-form label { font-size: .84rem; font-weight: 600; color: var(--navy); display: block; margin-bottom: 2px; }
.sum-list { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.sum-list li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.sum-list li:last-child { border-bottom: 0; }
.sum-list li.big { font-weight: 800; font-size: 1.05rem; color: var(--navy); border-top: 2px solid var(--navy); border-bottom: 0; padding-top: 8px; }
.sum-list .k { color: var(--slate); } .sum-list .v { font-variant-numeric: tabular-nums; text-align: right; }
.sticky-side { position: sticky; top: 12px; }
.review-note { border-left: 4px solid var(--red); background: var(--red-soft); border-radius: 8px; padding: .7rem 1rem; margin-bottom: 1rem; }
.problems { margin: 0; padding-left: 1.1rem; }
.slip-card { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.slip-card:last-child { border-bottom: 0; }
.slip-thumb { width: 120px; height: 120px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex;
    align-items: center; justify-content: center; background: #F8FAFC; color: var(--slate); font-size: 2rem; text-decoration: none; }
.slip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ticket-photo { max-width: 100%; max-height: 260px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 575px) { .slip-card { grid-template-columns: 1fr; } }
/* simple bar charts (no chart library: server-drawn widths) */
.bars { display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 110px; gap: 8px; align-items: center; font-size: .82rem; }
.bar-row .lbl { color: var(--slate); white-space: nowrap; }
.bar-row .track { background: #F1F5F9; border-radius: 4px; height: 14px; overflow: hidden; }
.bar-row .fill { background: var(--brand); height: 100%; border-radius: 4px; }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; }
.refresh-note { font-size: .78rem; color: var(--slate); }
