/* LNX Licensing - one palette, one rhythm.
   Paper with a green-grey bias, ink text, a deep teal for the house's own
   actions; the meaning colours are the same as in LNX Billing. */
:root {
    --paper: #f5f7f5;
    --card: #ffffff;
    --ink: #1c2430;
    --ink-muted: #5d6874;
    --line: #dde3e0;
    --line-strong: #c3ccc7;
    --accent: #0f766e;
    --accent-ink: #ffffff;
    --accent-soft: #d9f1ee;
    --c-emerald: #059669; --c-emerald-soft: #d1fae5;
    --c-amber: #d97706;   --c-amber-soft: #fef3c7;
    --c-rose: #e11d48;    --c-rose-soft: #ffe4e6;
    --c-sky: #0284c7;     --c-sky-soft: #e0f2fe;
    --radius: 10px;
    --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --mono: "IBM Plex Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { text-wrap: balance; margin: 0; }

/* ---------- shell ---------- */
.lic-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.lic-rail { background: var(--ink); color: #e6ebe8; display: flex; flex-direction: column; padding: 22px 16px; position: sticky; top: 0; height: 100vh; }
.lic-brand { display: flex; align-items: baseline; gap: 8px; color: #fff; text-decoration: none; padding: 0 8px 22px; }
.lic-brand-mark { font-family: var(--mono); font-weight: 600; font-size: 18px; letter-spacing: .08em; background: var(--accent); color: var(--accent-ink); padding: 2px 8px; border-radius: 6px; }
.lic-brand-text { font-weight: 600; font-size: 15px; letter-spacing: .01em; }
.lic-nav { display: flex; flex-direction: column; gap: 4px; }
.lic-nav a { display: flex; align-items: center; gap: 10px; color: #c4ccc8; padding: 9px 10px; border-radius: 8px; font-weight: 500; text-decoration: none; }
.lic-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.lic-nav a.is-active { background: rgba(255,255,255,.10); color: #fff; }
.lic-nav-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
.lic-nav a.is-active .lic-nav-dot { background: #5eead4; opacity: 1; }
.lic-rail-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lic-who { font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lic-link-btn { background: none; border: 0; color: #9fb0a8; padding: 0; font: inherit; cursor: pointer; }
.lic-link-btn:hover { color: #fff; text-decoration: underline; }
.lic-main { padding: 28px 32px 48px; max-width: 1240px; width: 100%; }

/* ---------- page head ---------- */
.lic-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.lic-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.lic-head .lic-sub { color: var(--ink-muted); margin-top: 2px; }
.lic-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }

/* ---------- cards & tables ---------- */
.lic-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.lic-card + .lic-card { margin-top: 16px; }
.lic-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.lic-card-head h2 { font-size: 15px; font-weight: 600; }
.lic-card-body { padding: 16px 20px; }
.lic-table { width: 100%; border-collapse: collapse; }
.lic-table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); padding: 10px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lic-table td { padding: 11px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lic-table tr:last-child td { border-bottom: 0; }
.lic-table tbody tr:hover { background: #fafbfa; }
.lic-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lic-table .muted, .muted { color: var(--ink-muted); }
.lic-table-wrap { overflow-x: auto; }
.lic-empty { padding: 28px 20px; color: var(--ink-muted); text-align: center; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }

/* ---------- tiles ---------- */
.lic-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.lic-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.lic-tile .v { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.lic-tile .l { color: var(--ink-muted); margin-top: 4px; font-size: 13px; }
.lic-tile.good .v { color: var(--c-emerald); }
.lic-tile.warn .v { color: var(--c-amber); }
.lic-tile.bad .v { color: var(--c-rose); }
.lic-tile.info .v { color: var(--c-sky); }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-good { background: var(--c-emerald-soft); color: var(--c-emerald); }
.pill-warn { background: var(--c-amber-soft); color: var(--c-amber); }
.pill-bad  { background: var(--c-rose-soft); color: var(--c-rose); }
.pill-info { background: var(--c-sky-soft); color: var(--c-sky); }
.pill-mute { background: #eef1ef; color: var(--ink-muted); }

/* ---------- buttons & forms (Bootstrap re-toned) ---------- */
.btn { --bs-btn-border-radius: 8px; --bs-btn-font-weight: 500; --bs-btn-padding-y: .42rem; --bs-btn-padding-x: .85rem; font-family: var(--font); }
.btn-primary { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: #0b5f59; --bs-btn-hover-border-color: #0b5f59; --bs-btn-active-bg: #0b5f59; --bs-btn-active-border-color: #0b5f59; }
.btn-outline-secondary { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line-strong); --bs-btn-hover-bg: #eef1ef; --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: var(--line-strong); }
.btn-outline-danger { --bs-btn-color: var(--c-rose); --bs-btn-border-color: #f3c3cc; --bs-btn-hover-bg: var(--c-rose-soft); --bs-btn-hover-color: var(--c-rose); --bs-btn-hover-border-color: #f3c3cc; }
.btn-sm { --bs-btn-padding-y: .25rem; --bs-btn-padding-x: .6rem; --bs-btn-font-size: 12.5px; }
.form-control, .form-select { border-color: var(--line-strong); border-radius: 8px; font-size: 14px; font-family: var(--font); }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-label { font-size: 12px; font-weight: 600; color: var(--ink-muted); margin-bottom: 4px; }
.lic-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
.lic-form-grid .span-2 { grid-column: span 2; }
.lic-actions { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
.lic-inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.lic-inline-form > div { min-width: 0; }

/* ---------- key reveal ---------- */
.lic-key-box { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; }
.lic-key-box .k { font-family: var(--mono); font-size: 22px; font-weight: 500; letter-spacing: .06em; color: var(--ink); word-break: break-all; }
.lic-key-box .note { grid-column: 1 / -1; color: #0b5f59; font-size: 13px; }

/* ---------- client header ---------- */
.lic-client-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: start; margin-bottom: 20px; }
.lic-client-head h1 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.lic-client-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-muted); margin-top: 6px; }
.lic-client-meta span b { color: var(--ink); font-weight: 500; }
.lic-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .lic-two { grid-template-columns: minmax(0, 1fr); } }

/* ---------- toast ---------- */
.lic-toast { position: fixed; top: 18px; right: 22px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 50; transition: opacity .3s, transform .3s; }
.lic-toast.is-gone { opacity: 0; transform: translateY(-6px); pointer-events: none; }

/* ---------- login ---------- */
.lic-login { min-height: 100vh; display: grid; place-items: center; background: var(--paper); padding: 24px; }
.lic-login-card { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px 28px 24px; }
.lic-login-card .lic-brand { color: var(--ink); padding: 0 0 18px; }
.lic-login-card h1 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.lic-login-card p { color: var(--ink-muted); margin: 0 0 18px; }
.lic-error { background: var(--c-rose-soft); color: var(--c-rose); border-radius: 8px; padding: 9px 12px; font-weight: 500; margin-bottom: 14px; }

@media (max-width: 820px) {
    .lic-shell { grid-template-columns: minmax(0, 1fr); }
    .lic-rail { position: static; height: auto; flex-direction: row; align-items: center; padding: 12px 16px; gap: 12px; }
    .lic-brand { padding: 0; }
    .lic-nav { flex-direction: row; }
    .lic-rail-foot { margin-top: 0; margin-left: auto; border: 0; padding: 0; }
    .lic-main { padding: 20px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) { .lic-toast { transition: none; } }

/* ---------- guided steps (Add a shop, shop page, guide) ---------- */
.lic-rail-cta { margin: 14px 0 0; text-align: center; }
.lic-steps { display: flex; flex-direction: column; gap: 14px; }
.lic-steps + .lic-actions { margin-top: 20px; }
.lic-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; align-items: start; }
.lic-step.lic-card { padding: 18px 20px 18px 16px; }
form.lic-steps .lic-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 16px; max-width: 860px; }
.lic-step-no { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 600; display: grid; place-items: center; font-variant-numeric: tabular-nums; margin-top: 2px; }
.lic-step-body { min-width: 0; }
.lic-step-body h2 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.lic-step-body h2 .muted { font-weight: 500; font-size: 13px; margin-left: 6px; }
.lic-step-body p { margin: 0 0 8px; }
.lic-step-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lic-step-head h2 { margin-bottom: 4px; }
.lic-line { margin: 6px 0 0 !important; }
.lic-fold { margin-top: 12px; padding: 14px 16px; background: var(--paper); border-radius: 8px; }
.lic-more { margin-top: 10px; }
.lic-more summary { cursor: pointer; color: var(--ink-muted); font-size: 13px; }
.lic-more .lic-table td { padding: 8px 10px; }
.lic-cancel-line { margin-top: 8px; }
.lic-cancel-line .lic-link-btn { color: var(--ink-muted); font-size: 12.5px; }
.lic-table-tight td { padding: 8px 10px; }
.lic-pcs { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.lic-pc { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.lic-pc.is-off { opacity: .6; }
.lic-pc-actions { display: flex; gap: 6px; flex-shrink: 0; }
.lic-side { display: flex; flex-direction: column; gap: 14px; }
.lic-howto p { margin: 0 0 10px; font-size: 13.5px; }
.lic-details div { padding: 6px 0; border-bottom: 1px solid var(--line); }
.lic-details div:last-child { border-bottom: 0; }
.lic-details small { display: block; color: var(--ink-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.lic-welcome { margin-bottom: 20px; border-color: var(--accent); }
.lic-welcome h2 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.lic-welcome p { max-width: 70ch; }

/* plan cards and the cycle switch */
.lic-plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.lic-plan-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; background: var(--card); }
.lic-plan-card input { position: absolute; opacity: 0; pointer-events: none; }
.lic-plan-card.is-picked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lic-plan-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.lic-plan-name { font-weight: 600; font-size: 15px; }
.lic-plan-price b { font-size: 20px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.lic-plan-price small { color: var(--ink-muted); }
.lic-plan-feat { color: var(--ink-muted); font-size: 12.5px; line-height: 1.4; }
.lic-plan-seats { font-size: 12px; color: var(--accent); font-weight: 600; }
.lic-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; height: 38px; }
.lic-seg label { display: flex; }
.lic-seg input { position: absolute; opacity: 0; pointer-events: none; }
.lic-seg span { display: flex; align-items: center; padding: 0 14px; font-weight: 500; cursor: pointer; border-right: 1px solid var(--line-strong); }
.lic-seg label:last-child span { border-right: 0; }
.lic-seg input:checked + span { background: var(--accent); color: var(--accent-ink); }
.lic-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }

/* the guide */
.lic-guide { display: flex; flex-direction: column; gap: 14px; max-width: 860px; margin-bottom: 20px; }
.lic-guide .lic-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 16px; }
.lic-guide p { max-width: 70ch; }
.lic-callout { background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; }
.lic-state-table { display: grid; gap: 8px; margin-top: 10px; }
.lic-state-table > div { display: flex; align-items: center; gap: 10px; }
.lic-state-table .pill { min-width: 96px; justify-content: center; }
.lic-faq p { max-width: 75ch; }
.lic-faq p:last-child { margin-bottom: 0; }

/* software key row and limits */
.lic-keyrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.lic-keyrow > div:first-child { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lic-keyrow .mono { font-size: 15px; letter-spacing: .12em; }
.lic-keyrow .lic-pc-actions { grid-row: 1 / span 2; }
.lic-limits { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.lic-limits .lic-eyebrow { margin-bottom: 8px; }
.lic-step-head form { margin: 0; }

/* fixes seen in review: key row placement, cycle switch clipping */
.lic-keyrow > div:nth-child(1) { grid-column: 1; grid-row: 1; }
.lic-keyrow > div:nth-child(2) { grid-column: 1; grid-row: 2; }
.lic-keyrow .lic-pc-actions { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.lic-seg { overflow: visible; width: max-content; max-width: 100%; }
.lic-seg span { padding: 0 12px; white-space: nowrap; }
.lic-seg label:first-child span { border-radius: 7px 0 0 7px; }
.lic-seg label:last-child span { border-radius: 0 7px 7px 0; }
.lic-two { grid-template-columns: minmax(0, 1fr) 300px; }
@media (max-width: 1000px) { .lic-two { grid-template-columns: minmax(0, 1fr); } }
