:root {
    --bg: #f6f2f4;
    --surface: #ffffff;
    --surface-2: #f1e9ee;
    --text: #23161d;
    --muted: #6f5d67;
    --border: #e2d5dc;
    --primary: #8e2f5c;
    --primary-text: #ffffff;
    --primary-soft: #f6dbe8;
    --danger: #b3261e;
    --ok: #1f7a4d;
    --warn-bg: #fff3d6;
    --warn-text: #6a4b00;
    --busy: #e5533a;
    --busy-soft: #fde3dc;
    --hold: #f2a516;
    --hold-soft: #fff0cc;
    --free-soft: #ffffff;
    --radius: 14px;
    --tap: 48px;
    --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 4px 14px rgb(0 0 0 / .05);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #161014;
        --surface: #21181d;
        --surface-2: #2b2026;
        --text: #f3e9ee;
        --muted: #b49fab;
        --border: #3b2e35;
        --primary: #e283b0;
        --primary-text: #23161d;
        --primary-soft: #43263a;
        --danger: #ff8a80;
        --ok: #6fd4a0;
        --warn-bg: #3c3015;
        --warn-text: #f5d98a;
        --busy: #ff7b63;
        --busy-soft: #4a2420;
        --hold: #ffc04d;
        --hold-soft: #45361a;
        --free-soft: #21181d;
        --shadow: none;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    -webkit-text-size-adjust: 100%;
}

h1 { font-size: 1.5rem; margin: 0 0 .5rem; }
h1:focus { outline: none; }
h2 { font-size: 1.15rem; margin: 1rem 0 .5rem; }
h3 { font-size: 1rem; margin: .75rem 0 .25rem; }
a { color: var(--primary); }
small { font-size: .85em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.empty { color: var(--muted); padding: 1.5rem 0; }
.warn { background: var(--warn-bg); color: var(--warn-text); padding: .6rem .8rem; border-radius: 10px; }
.ok { color: var(--ok); font-weight: 600; }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 1rem;
    padding: .5rem 1rem; padding-top: max(.5rem, env(safe-area-inset-top));
    background: var(--primary); color: var(--primary-text);
}
.brand { color: inherit; text-decoration: none; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: flex; gap: .25rem; margin-left: auto; overflow-x: auto; }
.topnav a {
    color: inherit; text-decoration: none; padding: .45rem .7rem; border-radius: 999px; white-space: nowrap;
    min-height: 40px; display: inline-flex; align-items: center;
}
.topnav a.active { background: rgb(255 255 255 / .2); }
.clock { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

@media (max-width: 640px) {
    .topbar { flex-wrap: wrap; gap: .25rem .75rem; }
    .topnav { order: 3; width: 100%; margin-left: 0; }
    .clock { margin-left: auto; }
}

.content { padding: 1rem; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
.page { max-width: 1100px; margin: 0 auto; }
.page-wide { max-width: 1500px; }
.page-narrow { max-width: 560px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actions form { margin: 0; }

/* ---------- Buttons & form controls ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    min-height: var(--tap); padding: .5rem 1rem;
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface); color: var(--text);
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
    touch-action: manipulation;
}
.btn:hover { border-color: var(--primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-sm { min-height: 40px; padding: .3rem .7rem; font-size: .9rem; }
.btn-lg { min-height: 56px; font-size: 1.1rem; padding: .6rem 1.4rem; }
.btn-block { width: 100%; }
.icon-btn {
    min-width: 40px; min-height: 40px; border: 0; border-radius: 10px;
    background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

input, select, textarea {
    font: inherit; color: var(--text); background: var(--surface);
    border: 1px solid var(--border); border-radius: 10px;
    min-height: var(--tap); padding: .45rem .7rem; width: 100%;
}
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; min-height: 0; padding: 0; accent-color: var(--primary); flex: none; }
input[type="color"] { padding: .2rem; }
.page-head input[type="date"] { width: auto; }
.select-sm { min-height: 36px; padding: .2rem .4rem; font-size: .9rem; width: auto; max-width: 100%; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .85rem; border: 0; padding: 0; }
.field label, .field legend { font-weight: 600; font-size: .95rem; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; margin-bottom: .85rem; }
.field-row .field { margin-bottom: 0; }
/* Nhãn có ô chọn: để chữ (kể cả <b>) chảy liền một dòng, ô chọn đứng đầu. */
.check { display: block; position: relative; padding: .6rem 0 .6rem 2.1rem; min-height: 44px; font-weight: 400 !important; cursor: pointer; }
.check > input { position: absolute; left: 0; top: .6rem; margin: 0; }
details summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; color: var(--muted); }

.chip {
    display: inline-flex; align-items: center; gap: .4rem;
    min-height: 44px; padding: .25rem .8rem .25rem .3rem;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
}
.chip-on { background: var(--primary-soft); border-color: var(--primary); font-weight: 700; }
.badge { display: inline-block; font-size: .78rem; padding: .1rem .5rem; border-radius: 999px; background: var(--primary-soft); margin-right: .25rem; }
.badge-danger { background: var(--busy-soft); color: var(--danger); }

.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg-btn { flex: 1 1 auto; min-height: var(--tap); border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; padding: 0 .8rem; }
.seg-on { background: var(--primary); color: var(--primary-text); border-color: var(--primary); font-weight: 700; }

/* ---------- Cards, lists, tables ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.card-head h2 { margin: 0; }
.two-col { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 1rem; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.list-row {
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem .75rem; min-height: 56px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.card .list-row { margin-bottom: .4rem; cursor: pointer; }
.row-on { border-color: var(--primary); background: var(--primary-soft); }
.swatch { width: 18px; height: 18px; border-radius: 6px; flex: none; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.card .table-wrap, .card > .table { border: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .55rem .65rem; border-bottom: 1px solid var(--border); text-align: left; }
.table th.num, .table td.num { text-align: right; }
.table thead th { background: var(--surface-2); font-size: .88rem; white-space: nowrap; }
.table tfoot th { background: var(--surface-2); }
.table td input[type="time"] { min-width: 110px; }

/* ---------- Home tiles ---------- */
.hero-title { text-align: center; margin: .5rem 0 1.25rem; font-size: clamp(1.4rem, 4vw, 2.2rem); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .9rem; }
.tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
    min-height: 130px; padding: 1rem; text-align: center;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 18px;
    font: inherit; font-size: 1.1rem; font-weight: 700; text-decoration: none; cursor: pointer;
    box-shadow: var(--shadow); touch-action: manipulation;
}
.tile:hover { border-color: var(--primary); }
.tile-icon { font-size: 2.2rem; line-height: 1; }
.tile-in { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
@media (max-width: 480px) {
    .tiles { grid-template-columns: 1fr 1fr; gap: .6rem; }
    .tile { min-height: 110px; font-size: 1rem; }
}

/* ---------- Avatars ---------- */
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.avatar-text { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary); }
.avatar-sm { width: 34px; height: 34px; font-size: .8rem; }
.avatar-lg { width: 96px; height: 96px; margin-top: .5rem; }

/* ---------- Turn board ---------- */
.turn-layout { display: grid; grid-template-columns: 1fr 280px; gap: 1rem; align-items: start; }
@media (max-width: 960px) { .turn-layout { grid-template-columns: 1fr; } .queue { order: -1; } }
.turn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
@media (max-width: 520px) { .turn-grid { grid-template-columns: 1fr; } }
.turn-card {
    position: relative; display: flex; flex-direction: column; gap: .5rem;
    padding: .8rem; border-radius: var(--radius);
    background: var(--free-soft); border: 2px solid var(--border); box-shadow: var(--shadow);
}
.turn-card.status-busy { background: var(--busy-soft); border-color: var(--busy); }
.turn-card.status-freehold { background: var(--hold-soft); border-color: var(--hold); }
.turn-card.is-next { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.next-badge { position: absolute; top: -10px; right: 10px; background: var(--primary); color: var(--primary-text); font-size: .72rem; font-weight: 800; padding: .15rem .55rem; border-radius: 999px; }
.turn-head { display: flex; align-items: center; gap: .65rem; cursor: pointer; }
.turn-name { display: flex; flex-direction: column; min-width: 0; }
.turn-name strong { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.turn-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; text-align: center; }
.turn-stats div { display: flex; flex-direction: column; background: rgb(127 127 127 / .08); border-radius: 8px; padding: .25rem; }
.turn-stats span { font-size: .72rem; }
.turn-status { font-size: .85rem; font-weight: 600; color: var(--muted); }
.turn-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.turn-actions .btn { flex: 1 1 auto; }
.queue { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; position: sticky; top: 70px; }
.queue h2 { margin-top: 0; }
.queue ol, .queue ul { margin: 0; padding-left: 1.3rem; }
.queue li { padding: .25rem 0; }
.queue li b, .queue li .muted { float: right; }
@media (max-width: 960px) { .queue { position: static; } }

/* ---------- Bill editor ---------- */
.bill-editor { display: grid; grid-template-columns: 1fr 380px; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .bill-editor { grid-template-columns: 1fr; } }
.be-services, .be-cart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem; }
.be-cart { position: sticky; top: 70px; }
@media (max-width: 1000px) { .be-cart { position: static; } }
.be-workers { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .75rem; }
.be-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: .6rem; -webkit-overflow-scrolling: touch; }
.tab {
    --tab-color: var(--primary);
    flex: none; min-height: var(--tap); padding: 0 1rem; border-radius: 12px;
    border: 2px solid var(--tab-color); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer;
}
.tab-on { background: var(--tab-color); color: #fff; }
.be-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .55rem; }
@media (max-width: 420px) { .be-items { grid-template-columns: 1fr 1fr; } }
.svc {
    display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
    min-height: 82px; padding: .6rem .7rem; text-align: left;
    border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text);
    font: inherit; cursor: pointer; touch-action: manipulation;
}
.svc:active { transform: scale(.98); }
.svc-name { font-weight: 600; }
.svc-price { font-weight: 800; color: var(--primary); }
.svc-off { font-size: .8rem; color: var(--danger); }
.be-cashier { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.cart { width: 100%; border-collapse: collapse; margin-bottom: .5rem; }
.cart td { padding: .4rem .2rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: .3rem .75rem; margin: .5rem 0 1rem; align-items: center; }
.totals dt { display: flex; gap: .4rem; align-items: center; }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.totals .grand { font-size: 1.35rem; font-weight: 800; }
.tip-split { background: var(--surface-2); border-radius: 10px; padding: .6rem; margin-bottom: .85rem; }
.tip-row { display: grid; grid-template-columns: 1fr 120px; gap: .5rem; align-items: center; margin-top: .4rem; }
.be-save { display: flex; gap: .5rem; }
.be-save .btn { flex: 1; }

/* ---------- Bills ---------- */
.summary-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: .75rem; }
.bill-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; }
@media (max-width: 420px) { .bill-list { grid-template-columns: 1fr; } }
.bill-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem; display: flex; flex-direction: column; gap: .4rem; }
.bill-card header, .bill-card footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; align-items: center; }
.bill-card ul { list-style: none; margin: 0; padding: 0; }
.bill-card li { display: flex; justify-content: space-between; gap: .5rem; padding: .15rem 0; }

/* ---------- Receipt ---------- */
.receipt { max-width: 340px; margin: 0 auto; background: #fff; color: #000; padding: 1rem; border: 1px dashed #999; font-size: 14px; }
.receipt h2 { margin: 0; }
.receipt p { margin: .3rem 0; }
.receipt-lines { width: 100%; border-collapse: collapse; margin: .5rem 0; border-top: 1px dashed #999; }
.receipt-lines td { padding: .2rem 0; }
.receipt-lines .grand td { font-weight: 800; font-size: 1.1rem; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / .45); z-index: 40; }
.modal {
    position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto;
    background: var(--surface); border-radius: 18px; box-shadow: 0 10px 40px rgb(0 0 0 / .3);
}
.modal-wide { width: min(760px, calc(100vw - 24px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h2 { margin: 0; font-size: 1.1rem; }
.modal-body { padding: 1rem; }
@media (max-width: 520px) {
    .modal { top: auto; bottom: 0; transform: translateX(-50%); width: 100vw; border-radius: 18px 18px 0 0; max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom); }
}

/* ---------- Keypad ---------- */
.keypad { display: flex; flex-direction: column; gap: .75rem; }
.keypad-display {
    min-height: 60px; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; letter-spacing: .3em; font-variant-numeric: tabular-nums;
    background: var(--surface-2); border-radius: 12px;
}
.keypad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.key {
    min-height: 64px; border-radius: 14px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font: inherit; font-size: 1.6rem; font-weight: 700;
    cursor: pointer; touch-action: manipulation; user-select: none;
}
.key:active { background: var(--primary-soft); }
.key-soft { background: var(--surface-2); font-size: 1.3rem; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
    bottom: max(1rem, env(safe-area-inset-bottom)); max-width: min(560px, calc(100vw - 24px));
    padding: .8rem 1.1rem; border-radius: 12px; font-weight: 600; color: #fff; box-shadow: 0 6px 24px rgb(0 0 0 / .25); cursor: pointer;
}
.toast-ok { background: #1f7a4d; }
.toast-error { background: #b3261e; }

/* ---------- Errors / print ---------- */
#blazor-error-ui {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    padding: .7rem 1rem; background: var(--warn-bg); color: var(--warn-text);
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

@media print {
    .topbar, .no-print, .toast, #blazor-error-ui { display: none !important; }
    body, .content { background: #fff; padding: 0; color: #000; }
    .receipt { border: 0; max-width: none; }
    .table-wrap { border: 0; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ---------- Giai đoạn 2 ---------- */
.section-gap { margin-top: 1rem; }
.two-col-even { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .two-col-even { grid-template-columns: 1fr; } }
.field-row-tight { grid-template-columns: 1fr auto; margin-bottom: .3rem; }
.danger-text { color: var(--danger); font-weight: 600; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; min-height: 32px; }
.print-only { display: none; }
code { background: var(--surface-2); padding: 0 .3rem; border-radius: 6px; font-size: .9em; }
textarea { min-height: 0; resize: vertical; }

.gift-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; margin: .75rem 0; }
.gift-info div { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 10px; padding: .5rem .7rem; }
.gift-info span { font-size: .8rem; }
.reward-box { display: flex; flex-direction: column; gap: .25rem; background: var(--primary-soft); border-radius: 10px; padding: .55rem .7rem; margin-top: .4rem; }

/* Lịch hẹn */
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; margin-bottom: 1rem; }
.day-chip { display: flex; flex-direction: column; align-items: center; gap: .05rem; min-height: 64px; padding: .35rem .2rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.day-chip span { font-size: .78rem; color: var(--muted); }
.day-chip b { font-size: 1.2rem; }
.day-chip small { font-size: .7rem; color: var(--primary); min-height: 1em; }
.day-today { border-color: var(--primary); }
.day-on { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.day-on span, .day-on small { color: inherit; }
.appt-list { display: flex; flex-direction: column; gap: .5rem; }
.appt-card { display: flex; gap: .9rem; align-items: flex-start; padding: .7rem .85rem; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--primary); border-radius: 12px; cursor: pointer; }
.appt-time { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 4.8rem; }

/* Máy check-in của khách */
.kiosk { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: linear-gradient(160deg, var(--primary-soft), var(--bg)); }
.kiosk-card { width: min(480px, 100%); background: var(--surface); border-radius: 24px; padding: 1.25rem; box-shadow: 0 10px 40px rgb(0 0 0 / .12); display: flex; flex-direction: column; gap: .9rem; }
.kiosk-title { text-align: center; margin: 0; color: var(--primary); }
.kiosk-sub { text-align: center; margin: 0; font-size: 1.1rem; }
.kiosk-phone { text-align: center; font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 700; letter-spacing: .05em; font-variant-numeric: tabular-nums; background: var(--surface-2); border-radius: 14px; padding: .6rem; }
.kiosk-keys .key { min-height: 72px; font-size: 1.9rem; }
.kiosk-done { text-align: center; font-size: 4rem; margin: 0; color: var(--ok); }
.rate-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.rate-btn { display: flex; flex-direction: column; align-items: center; gap: .3rem; min-height: 110px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.rate-btn span { font-size: 2.6rem; }

@media print {
    .print-only { display: block; }
    .modal-backdrop { display: none; }
    .modal { position: static; transform: none; box-shadow: none; width: auto; max-height: none; }
    .modal-head { display: none; }
}

/* Công thức tính */
.formula-card { margin-bottom: 1rem; }
.formula-card h2 { margin-top: 0; }
.formula-grid { display: grid; grid-template-columns: 1fr minmax(260px, 420px); gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .formula-grid { grid-template-columns: 1fr; } }
.example { background: var(--surface-2); border-radius: 12px; padding: .75rem .9rem; border-left: 4px solid var(--primary); }
.example h3 { margin-top: 0; }
.example ul { margin: .25rem 0 .5rem; padding-left: 1.2rem; }
.example .table { background: var(--surface); border-radius: 8px; }
.formula { margin: .35rem 0; font-variant-numeric: tabular-nums; }

/* Loại máy */
.device-badge { color: inherit; text-decoration: none; font-size: .78rem; font-weight: 700; padding: .2rem .55rem; border: 1px solid rgb(255 255 255 / .5); border-radius: 999px; white-space: nowrap; }
.kiosk-gear { position: fixed; right: 10px; bottom: 10px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--muted); opacity: .35; text-decoration: none; font-size: 1.2rem; }
.kiosk-gear:hover, .kiosk-gear:focus-visible { opacity: 1; }

/* Liên thông 3 máy: thông báo tức thì + hoạt động hôm nay */
.live-alerts { position: fixed; top: 70px; right: 12px; z-index: 55; display: flex; flex-direction: column; gap: .5rem; width: min(380px, calc(100vw - 24px)); }
.live-alert { display: flex; align-items: center; gap: .6rem; text-align: left; padding: .7rem .85rem; border-radius: 12px; border: 1px solid var(--border); border-left: 5px solid var(--primary); background: var(--surface); color: var(--text); font: inherit; box-shadow: 0 8px 24px rgb(0 0 0 / .18); cursor: pointer; animation: live-in .25s ease-out; }
.live-clockin { border-left-color: var(--ok); }
.live-clockout { border-left-color: var(--muted); }
.live-customercheckin { border-left-color: var(--hold); }
.live-billpaid { border-left-color: var(--primary); }
.live-icon { font-size: 1.3rem; flex: none; }
.live-text { flex: 1; font-weight: 600; }
.live-time { font-size: .8rem; color: var(--muted); white-space: nowrap; }
@keyframes live-in { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.activity-feed { margin-bottom: 1rem; }
.activity-feed ul { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow: auto; }
.activity-feed li { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--border); }
.activity-feed li:last-child { border-bottom: 0; }
.live-dot { color: var(--ok); font-size: .8rem; font-weight: 700; }
@media (max-width: 640px) { .live-alerts { top: auto; bottom: 12px; } }

/* Đồng ý nhận tin (TCPA) */
.check.consent { font-size: .82rem; line-height: 1.35; color: var(--muted); }
.consent-btn { border-color: var(--primary); color: var(--primary); }
.consent-note { font-size: .75rem; color: var(--muted); text-align: center; margin: -.4rem 0 0; }

/* Tiệm tự đăng ký (/dang-ky, /dat-mat-khau, /bat-dau) */
.signup .field small, .signup-step small { line-height: 1.35; }
.signup-notice { background: var(--primary-soft); padding: .6rem .8rem; border-radius: 10px; margin: 0; }
.field-error { color: var(--danger); font-weight: 600; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pow-box { font-size: .85rem; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: .45rem .7rem; margin: .4rem 0 .8rem; }
.pow-box.pow-ok { color: var(--ok); }
.pow-box.pow-fail { color: var(--danger); }
.code-input { font-size: 1.8rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.legal { max-width: 760px; }
.legal h2 { margin-top: 1.4rem; }
.draft-note { border: 2px dashed var(--hold); padding: .5rem .8rem; border-radius: 10px; }
.steps { display: flex; flex-direction: column; gap: 1rem; }
.signup-step h2 { margin-top: 0; display: flex; gap: .5rem; align-items: center; }
.step-no { display: inline-flex; width: 1.8rem; height: 1.8rem; border-radius: 50%; align-items: center; justify-content: center; background: var(--primary); color: var(--primary-text); font-size: .95rem; flex: none; }
.step-done .step-no { background: var(--ok); }
.status-pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); }
.status-done { background: #d8f3e4; color: #145a38; }
.status-failed { background: var(--busy-soft); color: var(--danger); }
.status-waitlist { background: var(--hold-soft); color: var(--warn-text); }

/* Máy cà thẻ */
.card-pay { display: flex; flex-direction: column; gap: .7rem; text-align: center; }
.card-amount { font-size: 2.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.card-wait { display: flex; align-items: center; justify-content: center; gap: .6rem; font-weight: 600; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--primary-soft); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tiện lợi: tip nhanh, tiền thối, số liệu hôm nay, bước bắt đầu */
.quick-tips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.quick-tips .chip { min-height: 38px; padding: .2rem .7rem; font-size: .88rem; }
.change-due { min-height: var(--tap); display: flex; align-items: center; font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.back-note { display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.kiosk-progress { text-align: center; margin: 0; padding: .6rem .8rem; border-radius: 12px; background: var(--primary-soft); font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.kpi { display: flex; flex-direction: column; gap: .1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem .9rem; }
.kpi span { font-size: .8rem; color: var(--muted); }
.kpi b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); }
.setup { margin-bottom: 1rem; border-left: 5px solid var(--primary); }
.setup ol { list-style: none; padding: 0; margin: 0 0 .8rem; }
.setup li { display: flex; gap: .6rem; padding: .35rem 0; }
.setup li.done { color: var(--muted); text-decoration: line-through; }
.keypad:focus { outline: none; }

/* Huỷ bill / hoàn tiền / chốt ca */
.refund-line { color: var(--danger); }
.cash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.cash-table td, .cash-table th { padding: .35rem .5rem; }
.cash-table .num input { width: 6rem; text-align: right; }
.cash-total { font-size: 1.15rem; }
.diff-ok { color: var(--ok); font-weight: 700; }
.diff-bad { color: var(--danger); font-weight: 700; }
.zreport { max-width: 420px; margin: 0 auto; font-variant-numeric: tabular-nums; }
.zreport h2 { text-align: center; margin: .2rem 0; }
.zreport dl { display: grid; grid-template-columns: 1fr auto; gap: .15rem .8rem; margin: .4rem 0; }
.zreport dt { color: var(--muted); }
.zreport dd { margin: 0; text-align: right; }
.zreport hr { border: 0; border-top: 1px dashed var(--border); margin: .5rem 0; }
.audit-json { white-space: pre-wrap; word-break: break-word; font-size: .78rem; max-width: 36rem; }
@media print { .zreport { max-width: none; } .zreport dt { color: #000; } }
.plain-list { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .5rem; margin-bottom: 1rem; }

/* Admin → Xuất dữ liệu */
.export-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.export-list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .2rem; border-bottom: 1px solid var(--border); }
.export-list li:last-child { border-bottom: 0; }
.export-list .ex-text { min-width: 0; overflow-wrap: anywhere; }
.export-list .ex-text small { display: block; color: var(--muted); }
.export-list .btn { flex: 0 0 auto; }
.export-all { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.export-recent li { display: block; }

/* Hướng dẫn sử dụng */
.hd { max-width: 980px; }
.hd .toc { columns: 2 260px; padding-left: 1.3rem; }
.hd .toc li { margin: .2rem 0; }
.hd section { scroll-margin-top: 70px; }
.hd video { width: 100%; border: 1px solid var(--border); border-radius: 12px; background: #000; margin: .4rem 0 .2rem; }
/* Video quay khổ điện thoại: giữ đúng cỡ, không kéo giãn hết chiều ngang (bị to và mờ). */
.hd video.v-phone { width: min(360px, 100%); display: block; margin-left: auto; margin-right: auto; }
.book-link-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.book-link-row code { flex: 1 1 220px; padding: .45rem .6rem; background: var(--surface-2); border-radius: 8px; overflow-wrap: anywhere; user-select: all; }
.hd .vcap { font-size: .85rem; color: var(--muted); margin-bottom: .8rem; }
.hd ol, .hd ul { padding-left: 1.3rem; }
.hd li { margin: .25rem 0; }
.hd .tip { background: var(--primary-soft); border-radius: 10px; padding: .6rem .8rem; margin: .6rem 0; }
.hd .formula { font-family: ui-monospace, Consolas, monospace; background: var(--surface-2); border-radius: 8px; padding: .5rem .7rem; display: block; margin: .4rem 0; }
.hd .table td, .hd .table th { vertical-align: top; }

/* Đặt lịch qua điện thoại: gợi ý khách + cảnh báo trùng giờ */
.appt-end { display: block; font-weight: 500; font-size: .8rem; color: var(--muted); }
.suggest { list-style: none; margin: -.4rem 0 .75rem; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.suggest li + li { border-top: 1px solid var(--border); }
.suggest button { display: flex; width: 100%; gap: .6rem; justify-content: space-between; align-items: center; padding: .55rem .75rem; min-height: 44px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.suggest button:hover, .suggest button:focus-visible { background: var(--primary-soft); }
.cust-info { background: var(--surface-2); border-radius: 10px; padding: .55rem .75rem; margin-bottom: .75rem; }
.cust-info ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.chip-warn { border-color: var(--danger); color: var(--danger); }
.conflicts { margin-bottom: .75rem; }
.conflicts ul { margin: .3rem 0 0; padding-left: 1.1rem; }

/* Cuộc gọi tới */
.call-pop-stack { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: .5rem; width: min(420px, calc(100vw - 32px)); }
.call-pop { background: var(--surface); color: var(--text); border: 2px solid var(--primary); border-radius: 16px; padding: .8rem .9rem; box-shadow: 0 12px 32px rgb(0 0 0 / .25); display: flex; flex-direction: column; gap: .35rem; animation: live-in .25s ease-out; }
.call-pop header { display: flex; gap: .7rem; align-items: center; }
.call-ring { font-size: 1.8rem; animation: call-ring 1s ease-in-out infinite; }
.call-name { font-weight: 800; font-size: 1.1rem; }
.call-phone { font-variant-numeric: tabular-nums; color: var(--muted); }
.call-appt { font-weight: 600; color: var(--danger); }
.call-pop .actions { justify-content: flex-end; margin-top: .3rem; }
@keyframes call-ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-15deg); } 75% { transform: rotate(15deg); } }
@media (prefers-reduced-motion: reduce) { .call-ring { animation: none; } }
.call-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.call-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .5rem .7rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.call-row.call-open { border-left: 5px solid var(--danger); }
.call-row .actions { margin-left: auto; }

/* Trang đặt lịch online /book */
.book { width: min(560px, 100%); min-width: 0; }
.book fieldset { min-width: 0; max-width: 100%; }
.book-days { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; scroll-snap-type: x proximity; }
.book-days .day-chip { flex: none; min-width: 62px; scroll-snap-align: start; }
.book-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .4rem; }
.book-slots .chip { justify-content: center; }
.center { text-align: center; }

/* Trạng thái lịch hẹn */
.appt-card.st-arrived { border-left-color: var(--ok); }
.appt-card.st-noshow, .appt-card.st-cancelled { border-left-color: var(--muted); opacity: .65; }
.appt-card.st-cancelled strong { text-decoration: line-through; }
.badge-ok { background: var(--primary-soft); color: var(--ok); }
.status-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }

/* Trang tính lương miễn phí /tinh-luong (công khai, không đăng nhập) */
.free-pay { width: min(1000px, 100%); display: flex; flex-direction: column; gap: 1rem; padding: 1rem 0 2rem; }
.free-pay-head h1 { margin: 0 0 .4rem; color: var(--primary); }
.free-pay-head p { margin: 0; }
.free-pay-box { background: var(--surface); border-radius: 16px; padding: 1rem; box-shadow: 0 4px 20px rgb(0 0 0 / .08); display: flex; flex-direction: column; gap: .6rem; }
.free-pay-box h2 { margin: 0; font-size: 1.15rem; }
.free-pay-tech-head { display: flex; gap: .5rem; align-items: center; }
.free-pay-name { flex: 1; font-size: 1.1rem; font-weight: 600; }
.free-pay-days input { width: 7.5rem; text-align: right; }
.free-pay-send { display: flex; flex-direction: column; gap: .35rem; padding-top: .4rem; border-top: 1px dashed var(--border); }
.free-pay-send h3 { margin: 0; font-size: 1rem; }
.free-pay-send p { margin: 0; }
#payslip-toast { width: max-content; overflow-wrap: anywhere; }
.free-pay-cta { border: 2px solid var(--primary); }
.free-pay-cta p { margin: 0; }
@media print { .free-pay { padding: 0; } .free-pay-box { box-shadow: none; padding: 0; } .kiosk { background: none; } }

/* Trang thợ tự xem /tho */
.tho-pin { display: flex; gap: .5rem; }
.tho-pin input { flex: 1; font-size: 1.4rem; text-align: center; letter-spacing: .3em; }
.tho-error { color: var(--danger, #c62828); }
.tho-box { display: flex; flex-direction: column; gap: .4rem; }
.tho-box h2 { margin: 0; font-size: 1.05rem; }
.tho-box p { margin: 0; }
.tho-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.tho-stats div { background: var(--surface-2); border-radius: 12px; padding: .5rem; display: flex; flex-direction: column; align-items: center; }
.tho-stats b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }

/* ---------- Dòng liên hệ Nail POS Việt (chỉ bản demo / Promo:Enabled) ---------- */
.promo-foot { margin: 1.5rem auto .5rem; max-width: 720px; text-align: center; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.promo-foot a { white-space: nowrap; }
.kiosk-card .promo-foot { margin: .25rem 0 0; }

/* ---------- Trang giới thiệu tiếng Anh /about ---------- */
.about { width: min(1040px, 100%); min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; padding: .5rem 0 2rem; overflow-wrap: anywhere; }
.about h2 { font-size: 1.35rem; margin: 0 0 .75rem; color: var(--primary); }
.about h3 { font-size: 1.02rem; margin: 0 0 .35rem; }
.about p { margin: 0; }
.ab-hero { background: var(--surface); border-radius: 24px; padding: clamp(1.25rem, 4vw, 2.5rem); box-shadow: 0 10px 40px rgb(0 0 0 / .1); display: flex; flex-direction: column; gap: .9rem; }
.ab-hero h1 { font-size: clamp(1.55rem, 4.6vw, 2.4rem); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.ab-eyebrow { color: var(--primary); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.ab-lead { font-size: 1.08rem; max-width: 62ch; }
.ab-cta { display: flex; flex-wrap: wrap; gap: .6rem; }
.ab-cta .btn { text-decoration: none; }
.ab-cta-center { justify-content: center; margin-top: .25rem; }
.ab-note { font-size: .9rem; color: var(--muted); }
.ab-status { background: var(--surface-2); border-radius: 12px; padding: .7rem .9rem; font-size: .92rem; }
.ab-section { background: var(--surface); border-radius: 20px; padding: clamp(1rem, 3vw, 1.75rem); box-shadow: 0 4px 20px rgb(0 0 0 / .06); display: flex; flex-direction: column; gap: .75rem; }
.ab-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.ab-grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.ab-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.ab-card { border: 1px solid var(--border); border-radius: 14px; padding: .9rem 1rem; background: var(--bg); }
.ab-card p { color: var(--text); font-size: .95rem; }
.ab-card code, .about li code { font-size: .9em; background: var(--surface-2); padding: 0 .25em; border-radius: 4px; }
.ab-two { display: grid; gap: 0 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.ab-list { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .55rem; }
.ab-video { margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.ab-video video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; display: block; }
.ab-video figcaption { font-size: .9rem; color: var(--muted); }
.ab-links { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: baseline; }
.ab-work { border: 2px solid var(--primary); }
.ab-foot { display: flex; justify-content: center; gap: .5rem; color: var(--muted); font-size: .9rem; }

/* Bảng lương: cảnh báo trừ trễ/sớm (chỉ trên màn hình, không in) */
.late-warn { margin-bottom: .75rem; }
.late-warn ul { margin: .3rem 0 .4rem; padding-left: 1.2rem; }
.row-warn td { background: var(--busy-soft); }
.row-warn .badge { white-space: nowrap; margin: .2rem 0 0; }
@media print { .row-warn td { background: none; } }
/* Công thức tính: dòng ví dụ ngay dưới ô nhập / lựa chọn */
.example-line { margin: .2rem 0 .6rem; font-size: .9rem; }
/* Link giới thiệu ?ref= (dòng đầu trang công cụ miễn phí) + khối Cảm ơn + trang so sánh cách trả lương /so-sanh-luong */
.ref-line { margin: 0 0 .5rem; padding: .4rem .7rem; border-radius: 10px; background: var(--surface); border: 1px dashed var(--border); font-size: .9rem; display: flex; flex-direction: column; gap: .15rem; }
.ref-line small { color: var(--muted); }
.ref-thanks ul { margin: 0; padding-left: 1.2rem; }
.ref-thanks p { margin: 0; }
.compare-table td { vertical-align: top; }
.compare-base { background: color-mix(in srgb, var(--primary) 8%, transparent); }
/* Điện thoại: mỗi cách trả lương thành 1 thẻ, khỏi cuộn ngang mất cột "Chênh" */
@media (max-width: 640px) {
    .compare-table thead { display: none; }
    .compare-table, .compare-table tbody, .compare-table tr, .compare-table td { display: block; width: 100%; }
    .compare-table tr { border-bottom: 1px solid var(--border); padding: .5rem 0; }
    .compare-table td { border: 0; padding: .15rem .6rem; }
    .compare-table td[data-label] { display: flex; justify-content: space-between; gap: .8rem; text-align: right; }
    .compare-table td[data-label]::before { content: attr(data-label); color: var(--muted); text-align: left; font-weight: 400; }
}

/* ---------- Trang giới thiệu /gioi-thieu (app chính) ---------- */
.kiosk:has(> .lp) { display: block; padding: 0; background: var(--bg); min-height: 100dvh; }
.lp { --lp-brand: #8e2f5c; --lp-brand-2: #5e1c3d; color: var(--text); overflow-x: clip; }
.lp-wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 16px; }
.lp h1, .lp h2, .lp h3, .lp p { margin: 0; }
.lp a { color: inherit; }
.lp-nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.lp-nav-in { display: flex; align-items: center; gap: 1rem; min-height: 62px; }
.lp-brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.08rem; text-decoration: none; letter-spacing: -.01em; }
.lp-logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--lp-brand), var(--lp-brand-2)); color: #fff; font-weight: 800; }
.lp-nav-links { display: flex; gap: 1.4rem; margin-left: auto; font-weight: 600; font-size: .95rem; }
.lp-nav-links a { text-decoration: none; color: var(--muted); }
.lp-nav-links a:hover { color: var(--primary); }
.lp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.3rem; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; transition: transform .12s ease, box-shadow .12s ease; white-space: nowrap; }
.lp-btn:hover { transform: translateY(-1px); }
.lp .lp-btn-sm { min-height: 40px; padding: 0 1rem; font-size: .92rem; background: var(--lp-brand); color: #fff; }
.lp .lp-btn-light { background: #fff; color: var(--lp-brand-2); box-shadow: 0 6px 20px rgb(0 0 0 / .18); }
.lp .lp-btn-ghost { border-color: rgb(255 255 255 / .7); color: #fff; }
.lp-hero { background: radial-gradient(1200px 500px at 85% -10%, #b2477c 0%, transparent 60%), linear-gradient(135deg, var(--lp-brand) 0%, var(--lp-brand-2) 100%); color: #fff; padding: clamp(2.5rem, 7vw, 5rem) 0; }
.lp-hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.lp-hero-text { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.lp-eyebrow { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.lp-hero h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.12; letter-spacing: -.02em; }
.lp-lead { font-size: clamp(1.02rem, 1.8vw, 1.15rem); line-height: 1.6; opacity: .93; max-width: 56ch; }
.lp-cta { display: flex; flex-wrap: wrap; gap: .7rem; }
.lp-trust { list-style: none; margin: .3rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem 1.2rem; font-size: .92rem; opacity: .9; }
.lp-trust li::before { content: "✓"; margin-right: .4rem; font-weight: 800; }
.lp-demo-note { font-size: .88rem; opacity: .8; }
.lp-hero-media { margin: 0; min-width: 0; }
.lp-hero-media video { width: 100%; aspect-ratio: 16 / 9; display: block; border-radius: 16px; background: #000; box-shadow: 0 30px 60px rgb(0 0 0 / .35), 0 0 0 8px rgb(255 255 255 / .1); }
.lp-hero-media figcaption { margin-top: .7rem; font-size: .85rem; opacity: .8; text-align: center; }
.lp-section { padding: clamp(3rem, 7vw, 5rem) 0; scroll-margin-top: 62px; }
.lp-band { scroll-margin-top: 62px; }
.lp-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lp-kicker { color: var(--primary); font-weight: 700; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .5rem !important; }
.lp-section h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.2; letter-spacing: -.015em; margin-bottom: 1.8rem; max-width: 30ch; }
.lp-sub { color: var(--muted); margin: -1rem 0 1.6rem !important; }
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.lp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1.4rem; display: flex; flex-direction: column; gap: .55rem; box-shadow: var(--shadow); }
.lp-card h3 { font-size: 1.1rem; }
.lp-card p { color: var(--muted); line-height: 1.55; font-size: .96rem; }
.lp-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: .3rem; }
.lp-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; counter-reset: none; }
.lp-steps li { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 18px; padding: 1.4rem; display: flex; flex-direction: column; gap: .5rem; }
.lp-steps p { color: var(--muted); line-height: 1.55; font-size: .96rem; }
.lp-step-n { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--lp-brand); color: #fff; font-weight: 800; margin-bottom: .2rem; }
.lp-videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem 1.1rem; }
.lp-video { margin: 0; display: flex; flex-direction: column; gap: .55rem; min-width: 0; }
.lp-video video { width: 100%; aspect-ratio: 16 / 9; display: block; border-radius: 14px; background: #000; box-shadow: var(--shadow); }
.lp-video figcaption { font-weight: 600; font-size: .95rem; }
.lp-more { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; margin-top: 1.8rem !important; font-weight: 700; }
.lp-more a { color: var(--primary); text-decoration: none; }
.lp-tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.lp-tool { display: flex; flex-direction: column; gap: .55rem; padding: 1.5rem; border-radius: 18px; border: 1px solid var(--border); background: var(--bg); text-decoration: none; transition: border-color .12s ease, transform .12s ease; }
.lp-tool:hover { border-color: var(--primary); transform: translateY(-2px); }
.lp-tool h3 { font-size: 1.15rem; }
.lp-tool p { color: var(--muted); line-height: 1.55; }
.lp-tool-go { color: var(--primary); font-weight: 700; margin-top: auto; }
.lp-free .lp-card { border-top: 4px solid var(--primary); }
.lp-free-note { margin: 1.4rem 0 0 !important; font-size: .92rem; }
.lp-free-note a { color: var(--primary); }
.lp-band { background: linear-gradient(135deg, var(--lp-brand) 0%, var(--lp-brand-2) 100%); color: #fff; padding: clamp(2.5rem, 6vw, 3.8rem) 0; }
.lp-band-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.lp-band h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: .4rem; }
.lp-band p { opacity: .9; }
.lp-foot { padding: 2rem 0 2.5rem; border-top: 1px solid var(--border); }
.lp-foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.lp-foot-links { display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; font-size: .92rem; }
.lp-foot-links a { color: var(--muted); text-decoration: none; }
.lp-foot-links a:hover { color: var(--primary); }
@media (max-width: 900px) {
    .lp-hero-in { grid-template-columns: 1fr; }
    .lp-features, .lp-videos { grid-template-columns: repeat(2, 1fr); }
    .lp-nav-links { display: none; }
    .lp-nav .lp-btn-sm { margin-left: auto; }
}
@media (max-width: 600px) {
    .lp-features, .lp-videos, .lp-steps, .lp-tools { grid-template-columns: 1fr; }
    .lp-cta .lp-btn { flex: 1 1 100%; }
}
@media (prefers-color-scheme: dark) {
    .lp .lp-btn-light { color: #5e1c3d; }
}
