/* TrukZone Fleet licensing — admin pages and the public checkout. Prefixed tz- throughout. */

:root {
    --tz-ink: #0f172a;
    --tz-muted: #64748b;
    --tz-line: #e2e8f0;
    --tz-soft: #f8fafc;
    --tz-brand: #0b6e4f;
    --tz-brand-soft: #e7f5ef;
    --tz-amber: #b45309;
    --tz-amber-soft: #fef3c7;
    --tz-red: #b91c1c;
    --tz-red-soft: #fee2e2;
    --tz-blue: #1d4ed8;
    --tz-blue-soft: #dbeafe;
}

.tz-page { max-width: 1200px; margin: 0 auto; padding: 8px 0 48px; color: var(--tz-ink); }
.tz-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.tz-title { font-size: 1.45rem; font-weight: 700; margin: 0; }
.tz-sub { color: var(--tz-muted); font-size: .9rem; margin-top: 2px; }
.tz-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tz-tabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--tz-line); color: var(--tz-ink); text-decoration: none; font-size: .88rem; }
.tz-tabs a.active { background: var(--tz-brand); border-color: var(--tz-brand); color: #fff; }

.tz-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tz-stat { background: #fff; border: 1px solid var(--tz-line); border-radius: 12px; padding: 14px 16px; }
.tz-stat-val { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.tz-stat-lbl { color: var(--tz-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.tz-card { background: #fff; border: 1px solid var(--tz-line); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.tz-card h3 { font-size: 1rem; font-weight: 700; margin: 0 0 12px; }
.tz-card h4 { font-size: .85rem; font-weight: 700; margin: 14px 0 8px; color: var(--tz-muted); text-transform: uppercase; letter-spacing: .04em; }
.tz-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 18px; }
.tz-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 18px; }
.tz-field label { display: block; font-size: .78rem; font-weight: 600; color: var(--tz-muted); margin-bottom: 3px; }
.tz-hint { font-size: .78rem; color: var(--tz-muted); margin-top: 3px; }

.tz-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tz-table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tz-muted); padding: 8px 10px; border-bottom: 1px solid var(--tz-line); white-space: nowrap; }
.tz-table td { padding: 9px 10px; border-bottom: 1px solid var(--tz-line); vertical-align: middle; }
.tz-table tr.tz-click { cursor: pointer; }
.tz-table tr.tz-click:hover td { background: var(--tz-soft); }
.tz-scroll { overflow-x: auto; }
.tz-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.tz-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.tz-pill.green { background: var(--tz-brand-soft); color: var(--tz-brand); }
.tz-pill.amber { background: var(--tz-amber-soft); color: var(--tz-amber); }
.tz-pill.red { background: var(--tz-red-soft); color: var(--tz-red); }
.tz-pill.blue { background: var(--tz-blue-soft); color: var(--tz-blue); }
.tz-pill.grey { background: #f1f5f9; color: var(--tz-muted); }

.tz-feature-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--tz-line); }
.tz-feature-row:last-child { border-bottom: 0; }
.tz-seg { display: inline-flex; border: 1px solid var(--tz-line); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.tz-seg button { border: 0; background: #fff; padding: 4px 10px; font-size: .78rem; color: var(--tz-muted); }
.tz-seg button + button { border-left: 1px solid var(--tz-line); }
.tz-seg button.on { background: var(--tz-brand); color: #fff; }
.tz-seg button.locked { background: var(--tz-amber); color: #fff; }
.tz-seg button.hidden { background: #475569; color: #fff; }
.tz-seg button.inherit { background: #e2e8f0; color: var(--tz-ink); }

.tz-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tz-empty { color: var(--tz-muted); padding: 18px 0; text-align: center; }
.tz-danger { color: var(--tz-red); }

/* ── Public checkout ─────────────────────────────────────────────────────────────── */
.tz-buy { min-height: 100vh; background: linear-gradient(180deg, #e7f5ef 0, #fff 320px); padding: 32px 16px 64px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: var(--tz-ink); }
.tz-buy-inner { max-width: 880px; margin: 0 auto; }
.tz-buy-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; color: var(--tz-brand); margin-bottom: 6px; }
.tz-buy h1 { font-size: 1.7rem; font-weight: 800; margin: 8px 0 4px; }
.tz-buy-lede { color: var(--tz-muted); margin-bottom: 22px; }
.tz-steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tz-steps span { font-size: .78rem; padding: 4px 10px; border-radius: 999px; background: #f1f5f9; color: var(--tz-muted); }
.tz-steps span.now { background: var(--tz-brand); color: #fff; }
.tz-steps span.done { background: var(--tz-brand-soft); color: var(--tz-brand); }
.tz-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tz-plan { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; border: 2px solid var(--tz-line); border-radius: 14px; padding: 16px; background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.tz-plan.sel { border-color: var(--tz-brand); box-shadow: 0 0 0 3px var(--tz-brand-soft); }
/* Smaller than the fleet: still bought — the rest wait for extra lorries — so not dimmed. */
.tz-plan-nofit { color: var(--tz-amber); font-weight: 600; }
.tz-plan-name { font-weight: 700; }
.tz-plan-price { font-size: 1.4rem; font-weight: 800; margin: 6px 0 2px; }
.tz-plan-per { color: var(--tz-muted); font-size: .8rem; }
.tz-plan ul { padding-left: 18px; margin: 10px 0 0; font-size: .82rem; color: var(--tz-muted); }
.tz-buy-box { background: #fff; border: 1px solid var(--tz-line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.tz-buy-box .form-control { max-width: 420px; }
.tz-otp { letter-spacing: .4em; font-size: 1.3rem; max-width: 200px !important; }
.tz-err { color: var(--tz-red); margin-top: 8px; font-size: .9rem; }
.tz-ok { background: var(--tz-brand-soft); color: var(--tz-brand); border-radius: 14px; padding: 22px; }

@media (max-width: 640px) {
    .tz-buy { padding: 20px 16px 48px; }
    .tz-buy h1 { font-size: 1.35rem; }
    .tz-feature-row { flex-direction: column; align-items: flex-start; }
}
