/* ==========================================================================
   BeautyCRM — Design System (vanilla CSS, Tailwind-style utility feel)
   ========================================================================== */
:root {
    --primary: #d946ef;
    --primary-dark: #a21caf;
    --primary-soft: #fdf4ff;
    --bg: #f6f5fb;
    --card: #ffffff;
    --text: #17131f;
    --muted: #7c7a85;
    --border: #e9e7f0;
    --ok: #16a34a;
    --ok-soft: #ecfdf3;
    --warn: #f59e0b;
    --warn-soft: #fffbeb;
    --bad: #ef4444;
    --bad-soft: #fef2f2;
    --info: #0ea5e9;
    --info-soft: #f0f9ff;
    --sidebar-w: 248px;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(23, 19, 31, .04), 0 8px 24px rgba(23, 19, 31, .06);
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: none; }
h1 { font-size: 1.45rem; margin: 0 0 4px; letter-spacing: -.02em; }
h2 { font-size: 1.02rem; margin: 0; }
h3 { font-size: .95rem; margin: 0 0 6px; }
code { background: #f1eef7; padding: 1px 6px; border-radius: 6px; font-size: .82em; }

/* ---- layout ----------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w);
    background: #fff;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
}
.main-area { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.page { padding: 22px 26px 60px; max-width: 1320px; width: 100%; }

/* ---- sidebar ----------------------------------------------------------- */
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; font-weight: 800; font-size: 1.12rem; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), #f0abfc); color: #fff; font-weight: 800;
}
.brand-mark.big { width: 48px; height: 48px; font-size: 1.3rem; border-radius: 14px; }
.brand-mark.dark { background: linear-gradient(135deg, #1e293b, #475569); }
.brand-name .accent { color: var(--primary); }
.sidebar-nav { flex: 1; padding: 8px 12px; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
    color: #4b4653; font-weight: 600; font-size: .92rem; margin-bottom: 2px;
}
.nav-item:hover { background: var(--primary-soft); color: var(--primary-dark); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-dark); }
.nav-item .ico { width: 20px; text-align: center; }
.sidebar-footer { padding: 14px 16px; border-top: 1px solid var(--border); }
.user-chip { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; color: inherit; }
.user-chip small { display: block; color: var(--muted); font-size: .74rem; }
.sidebar-admin { background: #17131f; }
.sidebar-admin .nav-item { color: #c9c5d4; }
.sidebar-admin .nav-item:hover, .sidebar-admin .nav-item.active { background: #2b2438; color: #f0abfc; }
.sidebar-admin .sidebar-footer { border-top-color: #2b2438; }

/* ---- nav groups & sub-menus --------------------------------------------- */
.nav-group { margin-bottom: 2px; }
.nav-group .nav-item { cursor: pointer; justify-content: space-between; user-select: none; }
.nav-group .nav-item::after { content: "▾"; font-size: 0.8rem; transition: transform .2s ease; margin-left: auto; opacity: 0.7; }
.nav-group.open .nav-item::after { transform: rotate(180deg); }
.nav-sub { display: none; flex-direction: column; padding-left: 28px; margin-top: 2px; margin-bottom: 4px; }
.nav-group.open .nav-sub { display: flex; }
.nav-sub a {
    padding: 7px 12px; border-radius: 8px; color: #5b5566; font-size: .86rem; font-weight: 500;
    transition: background .15s, color .15s; display: block; margin-bottom: 1px;
}
.nav-sub a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.nav-sub a.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.sidebar-admin .nav-sub a { color: #a49fc1; }
.sidebar-admin .nav-sub a:hover, .sidebar-admin .nav-sub a.active { background: #2b2438; color: #f0abfc; }

/* ---- topbar ------------------------------------------------------------- */
.topbar {
    height: 60px; background: #fff; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 16px; padding: 0 26px; position: sticky; top: 0; z-index: 30;
}
.hamburger { display: none; background: none; border: 0; font-size: 1.3rem; cursor: pointer; }
.branch-select { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); }
.branch-select select { min-width: 130px; }
.global-search { position: relative; flex: 1; max-width: 440px; }
.global-search input {
    width: 100%; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--bg); font-size: .9rem;
}
.search-results {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--border);
    border-radius: 12px; box-shadow: var(--shadow); max-height: 380px; overflow-y: auto; z-index: 50;
}
.search-results .sr-group { padding: 8px 14px 2px; font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.search-results a { display: block; padding: 8px 14px; color: var(--text); font-size: .9rem; }
.search-results a:hover { background: var(--primary-soft); }
.search-results .sr-empty { padding: 14px; color: var(--muted); font-size: .88rem; }

/* ---- cards & grids ---------------------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-header.mt { margin-top: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; margin-bottom: 18px; }
.grid-2-1 > .card { margin-bottom: 0; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-header p { margin: 2px 0 0; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-grid.tight { margin-bottom: 0; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-label { display: block; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stat-value { display: block; font-size: 1.55rem; font-weight: 800; margin-top: 4px; letter-spacing: -.02em; }
.stat-value.ok { color: var(--ok); }
.stat-value.bad { color: var(--bad); }
.stat-sub { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.mini-stat { background: var(--bg); border-radius: 10px; padding: 10px 14px; }
.mini-stat span { display: block; font-size: .76rem; color: var(--muted); font-weight: 600; }
.mini-stat strong { font-size: 1.05rem; }

/* ---- buttons ---------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1px solid transparent; border-radius: 10px; padding: 9px 16px;
    font-weight: 700; font-size: .88rem; cursor: pointer; transition: .15s;
    background: #fff; color: var(--text); text-decoration: none;
}
.btn:hover { filter: brightness(.97); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(217, 70, 239, .28); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border-color: var(--border); }
.btn-ghost { background: transparent; color: #5b5566; }
.btn-ghost:hover { background: var(--bg); }
.btn-warning { background: var(--warn); color: #fff; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: .8rem; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---- forms ------------------------------------------------------------------ */
input, select, textarea {
    font: inherit; color: inherit; border: 1px solid var(--border); border-radius: 10px;
    padding: 9px 12px; background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(217, 70, 239, .25); border-color: var(--primary); }
input[type="checkbox"], input[type="color"] { width: auto; }
label { font-weight: 600; font-size: .84rem; display: block; margin-bottom: 5px; }
label small { color: var(--muted); font-weight: 400; }
.form-group { margin-bottom: 12px; }
.checkbox-row { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input, .inline-form select { width: auto; }
.grid-2 .form-group.span-2 { grid-column: 1 / -1; }
form.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: end; }
.filter-bar { padding: 12px 14px; }
.filter-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-form input, .filter-form select { width: auto; min-width: 140px; flex: 0 1 auto; }
.filter-form input[type="search"] { flex: 1 1 180px; }
.note-form { margin-bottom: 14px; }

/* ---- tables ------------------------------------------------------------------ */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
    text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-hover tbody tr:hover { background: #faf9fd; }
.table-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.table-link:hover { color: var(--primary-dark); }
.debt { color: var(--bad); font-weight: 700; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions select { width: auto; padding: 4px 8px; font-size: .8rem; }
.tag-cell { color: var(--muted); font-size: .82rem; }

/* ---- badges ------------------------------------------------------------------ */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap;
    background: var(--bg); color: var(--muted);
}
.badge-completed, .badge-active { background: var(--ok-soft); color: var(--ok); }
.badge-confirmed { background: var(--info-soft); color: var(--info); }
.badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-arrived { background: #f5f3ff; color: #7c3aed; }
.badge-cancelled, .badge-expired { background: var(--bad-soft); color: var(--bad); }
.badge-no_show { background: #f1f5f9; color: #64748b; }
.badge-inactive { background: #f1f5f9; color: #64748b; }

/* ---- alerts & toasts ------------------------------------------------------------ */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; font-size: .9rem; font-weight: 600; }
.alert-success { background: var(--ok-soft); color: var(--ok); }
.alert-danger { background: var(--bad-soft); color: var(--bad); }
.alert-warning { background: var(--warn-soft); color: var(--warn); }
.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: #17131f; color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow);
    font-size: .88rem; font-weight: 600;
}
.toast.ok { background: var(--ok); }
.toast.err { background: var(--bad); }

/* ---- empty states, loading ---------------------------------------------------------- */
.empty-state { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-state .empty-ico { font-size: 2rem; display: block; margin-bottom: 8px; }
.empty-state h3 { color: var(--text); }
.empty-state.small { padding: 22px 12px; }
.loading-spinner {
    display: inline-block; width: 26px; height: 26px; border: 3px solid var(--border);
    border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.content-loading { opacity: .55; pointer-events: none; transition: .15s; }

/* ---- pagination ------------------------------------------------------------------ */
.pagination { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.pagination ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.pagination a, .pagination span {
    display: inline-flex; min-width: 32px; height: 32px; align-items: center; justify-content: center;
    border-radius: 8px; font-size: .86rem; font-weight: 600; color: var(--text); padding: 0 8px;
}
.pagination a:hover { background: var(--primary-soft); }
.pagination .active { background: var(--primary); color: #fff; }
.pagination .disabled, .pagination .dots { color: var(--muted); }
.page-info { font-size: .8rem; color: var(--muted); }

/* ---- misc components ------------------------------------------------------------------ */
.avatar {
    display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f0abfc, #c084fc); color: #fff; font-weight: 800; font-size: .8rem; flex: none;
}
.avatar.sm { width: 28px; height: 28px; font-size: .72rem; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mt { margin-top: 16px; }
.link { font-weight: 600; font-size: .84rem; }
.session-bar { width: 130px; height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; margin-bottom: 3px; }
.session-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #f0abfc); }
.tag {
    display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--tag-color, #d946ef) 12%, white);
    color: var(--tag-color, #a21caf); border: 1px solid color-mix(in srgb, var(--tag-color, #d946ef) 35%, white);
    padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; margin: 2px;
}
.tag-cloud { display: flex; flex-wrap: wrap; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-check input { display: none; }
.tag-check span { cursor: pointer; opacity: .55; }
.tag-check input:checked + span { opacity: 1; outline: 2px solid var(--tag-color); }
.inline-delete { display: inline; }
.inline-delete button { background: none; border: 0; cursor: pointer; font-weight: 800; color: inherit; padding: 0 2px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { display: flex; gap: 14px; padding: 7px 0; position: relative; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--border); margin-top: 5px; flex: none; z-index: 1; }
.tl-payment .tl-dot { background: var(--ok); }
.tl-note .tl-dot { background: var(--warn); }
.tl-activity .tl-dot { background: #8b5cf6; }
.tl-body small, .tl-date { display: block; font-size: .76rem; color: var(--muted); }
.notes-list { list-style: none; margin: 0; padding: 0; }
.notes-list li { border-top: 1px solid var(--border); padding: 10px 0; font-size: .9rem; }
.note-meta { display: block; font-size: .76rem; color: var(--muted); margin-bottom: 2px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; margin: 0; }
.info-grid dt { font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.info-grid dd { margin: 2px 0 0; font-weight: 600; }
.form-card { max-width: 640px; }

.customer-head { display: flex; gap: 14px; align-items: center; }

/* ---- tabs ------------------------------------------------------------------ */
.tab-nav { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tab-btn {
    background: none; border: 0; padding: 10px 16px; font-weight: 700; font-size: .9rem; cursor: pointer;
    color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tab-btn.active { color: var(--primary-dark); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- chart ------------------------------------------------------------------ */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 170px; padding-top: 10px; overflow-x: auto; }
.bar-wrap { flex: 1; min-width: 14px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar { width: 70%; max-width: 26px; background: linear-gradient(180deg, #f0abfc, var(--primary)); border-radius: 6px 6px 2px 2px; min-height: 3px; transition: height .3s; }
.bar-wrap:hover .bar { filter: brightness(1.08); }
.bar-label { font-size: .62rem; color: var(--muted); margin-top: 4px; }

/* ---- agenda ------------------------------------------------------------------ */
.agenda-list { list-style: none; margin: 0; padding: 0; }
.agenda-list li { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--border); }
.agenda-list li:first-child { border-top: 0; }
.agenda-time { font-weight: 800; font-size: .86rem; width: 46px; flex: none; }
.agenda-body { flex: 1; min-width: 0; }
.agenda-body small { display: block; color: var(--muted); font-size: .78rem; }

/* ---- alerts dashboard ------------------------------------------------------------ */
.alert-groups { display: grid; gap: 14px; }
.alert-group h3 { margin-bottom: 4px; }
.alert-group ul { margin: 0; padding-left: 18px; font-size: .88rem; }
.alert-group li { margin: 3px 0; }

/* ---- calendar ------------------------------------------------------------------ */
.calendar-nav { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.calendar-nav .legend { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; font-size: .74rem; color: var(--muted); }
.calendar-nav .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; }
.day-row { border-top: 1px solid var(--border); padding: 12px 0; }
.day-row:first-child { border-top: 0; }
.day-row.today { background: var(--primary-soft); border-radius: 10px; padding: 12px; }
.day-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.day-appts { display: flex; flex-direction: column; gap: 8px; }
.appt-card {
    display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border);
    border-radius: 10px; padding: 9px 12px;
}
.appt-card.today { background: #fff; }
.appt-time { font-weight: 800; font-size: .84rem; width: 100px; flex: none; }
.appt-info { flex: 1; min-width: 0; }
.appt-info small { display: block; color: var(--muted); }
.appt-actions { display: flex; gap: 6px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.month-cell { min-height: 92px; border: 1px solid var(--border); border-radius: 8px; padding: 6px; font-size: .78rem; }
.month-cell.empty { background: transparent; border-style: dashed; }
.month-cell.today { border-color: var(--primary); background: var(--primary-soft); }
.day-num { font-weight: 800; font-size: .8rem; }
.cal-event {
    border-left: 3px solid var(--primary); background: var(--bg); border-radius: 4px;
    padding: 2px 5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- modal ------------------------------------------------------------------ */
.modal { position: fixed; inset: 0; background: rgba(23, 19, 31, .5); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 100; overflow-y: auto; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 16px; box-shadow: var(--shadow); width: 100%; max-width: 640px; padding: 20px 22px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-close { background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--muted); line-height: 1; }
.conflict-hint { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: .86rem; font-weight: 600; }

/* ---- auth ------------------------------------------------------------------ */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: radial-gradient(1200px 600px at 10% -10%, #fce7f3, transparent), var(--bg); padding: 20px; }
.auth-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 34px 34px 26px; width: 100%; max-width: 420px; }
.auth-card.wide { max-width: 640px; }
.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-brand h1 { font-size: 1.3rem; margin-top: 10px; }
.auth-brand p { color: var(--muted); margin: 2px 0 0; font-size: .9rem; }
.auth-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: .86rem; }
.dev-credentials { margin-top: 18px; background: var(--warn-soft); border-radius: 10px; padding: 10px 14px; font-size: .78rem; color: #92400e; line-height: 1.7; }
.dev-credentials code { background: #fff7; }

/* ---- view switch ------------------------------------------------------------------ */
.view-switch { display: flex; gap: 4px; }
.view-switch .btn { padding: 6px 12px; }

/* ---- responsive ------------------------------------------------------------------ */
@media (max-width: 1024px) {
    .grid-2, .grid-2-1, form.grid-2 { grid-template-columns: 1fr; }
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
    .sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.25); }
    .main-area { margin-left: 0; }
    .hamburger { display: block; }
    .page { padding: 16px; }
}
@media (max-width: 640px) {
    html { font-size: 14px; }
    .topbar { padding: 0 14px; gap: 10px; }
    .branch-select label { display: none; }
    .global-search { max-width: none; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; }
    .appt-card { flex-wrap: wrap; }
    .appt-time { width: auto; }
}

/* ==========================================================================
   Landing page (public) — .lp scope
   ========================================================================== */
.lp { background: var(--card); --muted: #66646f; /* AA: 5.8:1 on white (default 4.22 fails) */ }
.lp-skip {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--primary-dark); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0; font-weight: 600;
}
.lp-skip:focus { left: 0; }
.lp-container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.lp-narrow { max-width: 720px; }

/* nav */
.lp-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.lp-nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.lp-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.lp-nav-links { display: flex; gap: 22px; margin-left: auto; }
.lp-nav-links a { color: var(--muted); font-weight: 500; font-size: .95rem; padding: 12px 2px; /* 44px touch target */ }
.lp-nav-links a:hover { color: var(--primary-dark); }
.lp-nav-actions { display: flex; align-items: center; gap: 14px; }
.lp-link { color: var(--text); font-weight: 600; font-size: .95rem; padding: 12px 2px; }
.lp-link:hover { color: var(--primary-dark); }

/* hero */
.lp-hero {
    padding: 96px 0 88px; text-align: center;
    background:
        radial-gradient(60% 80% at 70% 10%, rgba(217, 70, 239, .10), transparent 60%),
        radial-gradient(50% 70% at 20% 20%, rgba(14, 165, 233, .07), transparent 60%);
}
.lp-eyebrow {
    display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--primary-dark);
    background: var(--primary-soft); border-radius: 999px; padding: 6px 14px; margin-bottom: 18px;
}
.lp-hero h1 {
    font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.12; letter-spacing: -.03em;
    margin: 0 auto 18px; max-width: 720px;
}
.lp-sub { font-size: 1.08rem; color: var(--muted); max-width: 640px; margin: 0 auto 30px; line-height: 1.65; }
.lp-cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.lp-micro { color: var(--muted); font-size: .85rem; margin-top: 14px; }

/* sections & cards */
.lp-section { padding: 72px 0; }
.lp-alt { background: var(--bg); }
.lp-h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; text-align: center; margin: 0 0 40px; }
.lp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lp-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.lp-gap { margin-top: 8px; }
.lp-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow);
}
.lp-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.lp-card p { color: var(--muted); line-height: 1.6; margin: 0; font-size: .95rem; }

/* plans */
.lp-plan { display: flex; flex-direction: column; position: relative; }
.lp-plan .btn { margin-top: auto; }
.lp-plan-featured { border-color: var(--primary); box-shadow: 0 10px 30px rgba(217, 70, 239, .14); }
.lp-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--primary-dark); color: #fff; font-size: .72rem; font-weight: 700;
    padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.lp-price { font-size: 1.7rem; font-weight: 800; color: var(--text); margin: 6px 0 14px !important; letter-spacing: -.02em; }
.lp-per { font-size: .85rem; font-weight: 500; color: var(--muted); }
.lp-list { list-style: none; margin: 0 0 18px; padding: 0; }
.lp-list li { padding: 6px 0 6px 24px; position: relative; color: var(--muted); font-size: .93rem; }
.lp-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

/* faq */
.lp-faq dt { font-weight: 700; margin-top: 22px; }
.lp-faq dd { margin: 6px 0 0; color: var(--muted); line-height: 1.65; }

/* final cta + footer */
.lp-cta { text-align: center; background: linear-gradient(135deg, var(--primary-soft), #fff); }
.lp-cta h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -.02em; margin: 0 0 10px; }
.lp-cta p { color: var(--muted); margin: 0 0 26px; }
.lp-footer { border-top: 1px solid var(--border); padding: 32px 0; background: var(--bg); }
.lp-footer-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.lp-footer-note { color: var(--muted); font-size: .88rem; margin: 0; }
.lp-footer-links { margin-left: auto; display: flex; gap: 18px; }
.lp-footer-links a { color: var(--muted); font-size: .9rem; }
.lp-footer-links a:hover { color: var(--primary-dark); }

/* large button (landing only) */
.lp .btn-lg { padding: 13px 28px; font-size: 1.02rem; border-radius: 12px; }
.lp .btn-primary { background: var(--primary-dark); /* AA: white text 6.3:1 (primary 3.5 fails) */ }
.lp .btn-primary:hover { background: #86198f; }

/* responsive */
@media (max-width: 960px) {
    .lp-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .lp-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .lp-nav-links { display: none; }
    .lp-hero { padding: 64px 0 56px; }
    .lp-section { padding: 52px 0; }
    .lp-grid-3, .lp-grid-4 { grid-template-columns: 1fr; }
    .lp-nav-actions { margin-left: auto; }
}

/* accessibility */
.lp :focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
    .lp * { animation: none !important; transition: none !important; }
    .lp-nav { backdrop-filter: none; }
}

/* ==========================================================================
   Motion tokens + reworked transitions (animate skill)
   ========================================================================== */
:root {
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* toast: transition (retargets on rapid fire), exits the way it entered */
.toast {
    animation: none;
    opacity: 0;
    transform: translateY(8px);
    transition:
        opacity .2s var(--ease-out),
        transform .2s var(--ease-out),
        translate .25s var(--ease-in-out);
    will-change: opacity, transform;
}
.toast.is-shown { opacity: 1; transform: none; }
.toast-wrap:hover .toast { translate: -14px 0; }
@media (hover: none) { .toast-wrap:hover .toast { translate: none; } }

/* modal: centered scale entrance (modals are exempt from transform-origin) */
.modal-box { animation: modalIn .22s var(--ease-out); }
@keyframes modalIn { from { opacity: 0; transform: scale(0.96); } }

@media (prefers-reduced-motion: reduce) {
    .toast, .modal-box { animation: none !important; transition: opacity .15s ease !important; transform: none !important; translate: none !important; }
}
