:root {
    --canvas: #f3f4f6;
    --surface: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --faint: #9ca3af;
    --line: #e5e7eb;
    --line-strong: #d1d5db;
    --accent: #111827;
    --accent-soft: #f3f4f6;
    --good: #047857;
    --good-bg: #ecfdf5;
    --bad: #b91c1c;
    --bad-bg: #fef2f2;
    --warn: #92400e;
    --warn-bg: #fffbeb;
    --info: #1d4ed8;
    --info-bg: #eff6ff;
    --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(17, 24, 39, 0.04);
    --sans: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
    --radius: 12px;
    --surface-2: #f9fafb;
    --soft: #f3f4f6;
    --line-soft: #f3f4f6;
    --ink-2: #374151;
    --ink-3: #4b5563;
    --solid: #111827;
    --solid-hover: #000000;
    --focus: #111827;
    --focus-ring: rgba(17, 24, 39, 0.08);
    --violet-soft: #f5f3ff;
    --violet-softer: #faf7ff;
    --violet-line: #e9e1f4;
    --violet-ink: #6d28d9;
    --violet-deep: #3b1764;
    --rose-soft: #fff5f7;
    --rose-line: #fde2e8;
    --teal-soft: #ecfeff;
    --glass: rgba(255, 255, 255, 0.84);
    --glass-strong: rgba(255, 255, 255, 0.94);
    --editor-bg: #f6f3fb;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --canvas: #0e0c14;
    --surface: #17141f;
    --surface-2: #1c1926;
    --soft: #231f2e;
    --ink: #eeebf5;
    --ink-2: #d6d2e0;
    --ink-3: #bdb7ca;
    --muted: #9c96ad;
    --faint: #6f6982;
    --line: #2d2939;
    --line-strong: #3d3750;
    --line-soft: #24202f;
    --accent: #eeebf5;
    --accent-soft: #221e2c;
    --good: #34d399;
    --good-bg: rgba(16, 185, 129, 0.14);
    --bad: #fb7185;
    --bad-bg: rgba(244, 63, 94, 0.14);
    --warn: #fbbf24;
    --warn-bg: rgba(245, 158, 11, 0.14);
    --info: #60a5fa;
    --info-bg: rgba(59, 130, 246, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --solid: #7c3aed;
    --solid-hover: #6d28d9;
    --focus: #a78bfa;
    --focus-ring: rgba(167, 139, 250, 0.22);
    --violet-soft: rgba(139, 92, 246, 0.14);
    --violet-softer: rgba(139, 92, 246, 0.08);
    --violet-line: rgba(167, 139, 250, 0.22);
    --violet-ink: #c4b5fd;
    --violet-deep: #ddd6fe;
    --rose-soft: rgba(244, 63, 94, 0.1);
    --rose-line: rgba(251, 113, 133, 0.28);
    --teal-soft: rgba(20, 184, 166, 0.12);
    --glass: rgba(23, 20, 31, 0.8);
    --glass-strong: rgba(23, 20, 31, 0.94);
    --editor-bg: #13101b;
    color-scheme: dark;
}
:root[data-theme="dark"] a:hover { color: var(--ink); }
:root[data-theme="dark"] img { opacity: 0.94; }
:root[data-theme="dark"] .overlay-backdrop, :root[data-theme="dark"] .tab-sheet-backdrop { background: rgba(0, 0, 0, 0.72); }
:root[data-theme="dark"] .dialog { box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line); }


* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: var(--sans);
    font-size: 14.5px;
    line-height: 1.5;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--ink); }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; }
h1 { margin: 0; font-size: 1.65rem; line-height: 1.15; }
h2 { margin: 0 0 0.85rem; font-size: 1rem; }

button, input, select, textarea { font: inherit; color: inherit; }

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.shell {
    display: grid;
    grid-template-columns: 200px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    padding: 1rem 0.65rem 0.8rem;
    background: var(--surface);
    border-right: 1px solid var(--line);
}
.sidebar::-webkit-scrollbar { display: none; }

.brand {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    min-width: 0;
    padding: 0.2rem 0.35rem 0.3rem;
    color: inherit;
    text-decoration: none;
}
.brand > span:last-child { min-width: 0; }
.brand strong { display: block; font-size: 0.94rem; letter-spacing: -0.03em; }
.brand small, .sidebar-foot small, .col-head small {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 500;
}
.brand small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 9px;
    background: var(--solid);
    color: white;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.nav { display: flex; flex-direction: column; gap: 0.1rem; }
.nav-label {
    margin: 0.75rem 0 0.2rem;
    padding: 0 0.6rem;
    color: var(--faint);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.nav-label:first-child { margin-top: 0; }
.nav a {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    padding: 0.44rem 0.6rem;
    border-radius: 8px;
    color: var(--ink-2);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}
.nav a svg { width: 16px; height: 16px; flex: 0 0 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { background: var(--accent-soft); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--solid); color: white; }

.sidebar-foot {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    align-items: center;
    margin-top: auto;
    padding: 0.7rem 0.3rem 0.1rem;
    border-top: 1px solid var(--line);
}
.sidebar-foot p { margin: 0; min-width: 0; }
.sidebar-foot strong { display: block; font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--violet-soft);
    color: var(--violet-ink);
    font-size: 0.7rem;
    font-weight: 700;
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-foot button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
}
.sidebar-foot button svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-foot button:hover { color: var(--bad); border-color: var(--line-strong); }

.location-switch select {
    width: 100%;
    padding: 0.42rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--canvas);
    font-size: 0.84rem;
}

.theme-toggle {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: auto;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--soft);
}
.theme-toggle::before {
    content: "";
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s cubic-bezier(0.3, 0.8, 0.3, 1);
}
:root[data-theme="dark"] .theme-toggle::before { transform: translateX(100%); background: #2a2538; }
.theme-toggle button {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    height: 30px;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}
.theme-toggle button svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle button[aria-pressed="true"] { color: var(--ink); }
.theme-toggle button[data-theme-set="light"][aria-pressed="true"] svg { color: #f59e0b; }
.theme-toggle button[data-theme-set="dark"][aria-pressed="true"] svg { color: #a78bfa; }
.theme-toggle button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 8px; }
.sidebar .theme-toggle + .sidebar-foot { margin-top: 0.2rem; }
.tab-sheet .theme-toggle { margin-top: 0; }
.tab-sheet .theme-toggle button { height: 38px; font-size: 0.86rem; }
html.theme-shift *, html.theme-shift *::before, html.theme-shift *::after { transition: background-color 0.3s ease, border-color 0.3s ease, color 0.2s ease !important; }

.tabbar, .tab-sheet { display: none; }

.main {
    padding: 1.6rem 1.75rem 3rem;
    min-width: 0;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.15rem;
}
.page-title { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.page-title h1 { margin: 0; }
.page-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.6rem; }
.page-head.is-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    align-items: center;
    margin: -1.6rem -1.75rem 1.15rem;
    padding: 0.8rem 1.75rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    background: var(--glass);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    transition: box-shadow 0.2s ease, background 0.2s ease;
}
body.is-scrolled .page-head.is-bar { background: var(--glass-strong); box-shadow: 0 8px 24px rgba(17, 24, 39, 0.07); }
.page-head.is-bar h1 { font-size: 1.3rem; letter-spacing: -0.03em; line-height: 1.15; }
.page-head.is-bar .eyebrow { margin-bottom: 0.1rem; font-size: 0.68rem; }
.page-icon {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: white;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.25);
}
.page-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.page-head.is-bar .page-actions { padding-right: 0.6rem; border-right: 1px solid var(--line); }
.page-head.is-bar .page-actions:last-child { padding-right: 0; border-right: 0; }
.head-location {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    max-width: 240px;
    padding: 0.3rem 0.65rem 0.3rem 0.35rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.head-location:not(.is-static) { cursor: pointer; }
.head-location:not(.is-static):hover, .head-location:focus-within { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18); }
.head-location-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px; background: var(--violet-soft); color: var(--violet-ink); }
.head-location-icon svg, .head-location-chevron svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.head-location-text { display: grid; min-width: 0; line-height: 1.15; }
.head-location-text small { color: var(--faint); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.head-location-text strong { overflow: hidden; font-size: 0.84rem; text-overflow: ellipsis; white-space: nowrap; }
.head-location-chevron { color: var(--muted); }
.head-location select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.page-actions, .actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.eyebrow {
    margin: 0 0 0.2rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.stat, .panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat { padding: 0.95rem 1rem 0.85rem; }
.stat span { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.stat strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.panel { margin-top: 0.85rem; padding: 1.05rem 1.1rem 1.15rem; }
.panel > h2:not(.when) {
    margin: 0 0 0.85rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
}
.form.panel { display: grid; gap: 0.9rem; max-width: 760px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.detail { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr); gap: 0.85rem; align-items: start; }
.stack { display: grid; gap: 0.85rem; }
.stack .panel, .detail > .panel { margin-top: 0; }
.detail > .panel { padding: 1.1rem 1.15rem; }
.detail .eyebrow { margin-top: 0; }
.when { margin: 0.1rem 0 0.25rem; font-size: 1.7rem; }

.field { display: grid; gap: 0.35rem; }
.field > span, .checks legend { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); }
.field small { color: var(--bad); font-weight: 600; }
.field input, .field select, .field textarea, .filters input, .filters select, .day-nav input, .pos-search, .pos-line select {
    width: 100%;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { height: auto; padding: 0.6rem 0.75rem; }
.field input:focus, .field select:focus, .field textarea:focus, .filters input:focus, .filters select:focus, .day-nav input:focus, .pos-search:focus, .pos-line select:focus {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px var(--focus-ring);
}
.field input[type="color"] { width: 64px; padding: 0.2rem; }
.field textarea { resize: vertical; }

.choice { display: flex; gap: 0.55rem; align-items: center; font-weight: 600; color: var(--ink-2); }
.choice input { width: 16px; height: 16px; accent-color: var(--ink); }
.checks { margin: 0; padding: 0.2rem 0 0; border: 0; }
.checks .choice { margin: 0.3rem 0; font-weight: 500; }

.btn, button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.btn-primary { background: var(--solid); border-color: var(--solid); color: white; }
.btn-primary:hover { background: var(--solid-hover); color: white; }
.btn-danger { color: var(--bad); border-color: #fecaca; background: var(--surface); }
.btn-danger:hover { background: var(--bad-bg); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
    padding: 0.55rem 0.85rem;
    text-align: left;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--faint);
    font-weight: 700;
}
.table td {
    padding: 0.78rem 0.85rem;
    border-top: 1px solid var(--line);
    vertical-align: middle;
}
.table tbody tr:hover { background: var(--surface-2); }
.table a { font-weight: 700; }
.table small { display: block; color: var(--muted); font-weight: 500; }
.muted { color: var(--muted); }
p.muted, .panel > p.muted { margin: 0.35rem 0; }

.pill {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.status-booked { background: var(--soft); color: var(--ink-2); }
.status-confirmed { background: var(--info-bg); color: var(--info); }
.status-arrived { background: var(--warn-bg); color: #c2410c; }
.status-in_service { background: var(--good-bg); color: var(--good); }
.status-completed { background: var(--soft); color: var(--ink-3); }
.status-cancelled, .status-no_show { background: var(--bad-bg); color: var(--bad); }
.pill.on { background: var(--good-bg); color: var(--good); }
.pill.off { background: var(--soft); color: var(--muted); }

.flash {
    margin: 0 0 0.9rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    background: var(--good-bg);
    color: var(--good);
    font-weight: 600;
}
.flash.bad { border-color: #fecaca; background: var(--bad-bg); color: var(--bad); }
.flash p { margin: 0; }
.warn {
    padding: 0.7rem 0.85rem;
    border: 1px solid #fde68a;
    border-radius: 10px;
    background: var(--warn-bg);
    color: var(--warn);
    font-weight: 600;
}

.empty { padding: 1.4rem 0.2rem 1rem; color: var(--muted); }
.filter-empty {
    display: grid;
    justify-items: center;
    gap: 0.4rem;
    padding: 2.1rem 1.25rem 1.85rem;
    text-align: center;
}
.filter-empty h2 { margin: 0; }
.filter-empty p { margin: 0; color: var(--muted); }
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin: 0.35rem 0 0.55rem;
    padding: 0;
    list-style: none;
}
.filter-chips li {
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: var(--violet-soft);
    color: var(--violet-ink);
    font-size: 0.8rem;
    font-weight: 700;
}
.team-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.team-stat {
    position: relative;
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.team-stat::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--tone);
}
.team-stat span { color: var(--muted); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.team-stat strong { color: var(--tone); font-size: 1.6rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.team-stat.tone-violet { --tone: #7c3aed; }
.team-stat.tone-teal { --tone: #0f766e; }
.team-stat.tone-pink { --tone: #db2777; }
.team-stat.tone-slate { --tone: #64748b; }

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 0.9rem;
    margin-top: 0.85rem;
}
.member {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 4px solid var(--member);
    border-radius: 14px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.member:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09); }
.member.is-inactive { background: var(--surface-2); }
.member.is-inactive .member-avatar { filter: grayscale(1); opacity: 0.6; }
.member-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; }
.member-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--member), color-mix(in srgb, var(--member) 55%, var(--surface)));
    color: white;
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--member) 18%, var(--surface));
}
.member-who { display: grid; min-width: 0; }
.member-who strong { overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.member-who em {
    margin-left: 0.3rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: var(--violet-soft);
    color: var(--violet-ink);
    font-size: 0.66rem;
    font-style: normal;
    font-weight: 800;
    vertical-align: middle;
}
.member-who > span { overflow: hidden; color: var(--muted); font-size: 0.82rem; text-overflow: ellipsis; white-space: nowrap; }
.member-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.member-role, .member-tag {
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}
.member-role { background: var(--violet-soft); color: var(--violet-ink); }
.member-role.role-owner { background: var(--rose-soft); color: #9d174d; }
.member-role.role-manager { background: var(--info-bg); color: #1d4ed8; }
.member-role.role-receptionist { background: var(--warn-bg); color: #b45309; }
.member-tag { background: var(--soft); color: #475569; }
.member-tag.is-busy { background: var(--good-bg); color: #047857; }
.member-contact { display: grid; gap: 0.3rem; margin: 0; padding: 0.6rem 0.7rem; border-radius: 10px; background: var(--surface-2); }
.member-contact div { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0.5rem; font-size: 0.82rem; }
.member-contact dt { color: var(--muted); font-weight: 600; }
.member-contact dd { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.member-contact a { color: var(--ink); font-weight: 600; text-decoration: none; }
.member-contact a:hover { color: var(--violet-ink); }
.member-services { display: grid; gap: 0.4rem; }
.member-label { color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.member-services p { margin: 0; font-size: 0.82rem; }
.member-services ul { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.member-services li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.55rem 0.15rem 0.2rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}
.member-services li .service-photo { width: 20px; height: 20px; border-radius: 50%; font-size: 0.6rem; }
.member-services li.is-more { position: relative; padding-left: 0.55rem; background: var(--surface-2); color: var(--muted); cursor: default; }
.member-services li.is-more:hover, .member-services li.is-more:focus { border-color: #c4b5fd; background: var(--violet-soft); color: var(--violet-ink); outline: none; }
.more-pop {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 20;
    display: grid;
    gap: 0.3rem;
    min-width: 180px;
    max-height: 240px;
    overflow: auto;
    padding: 0.5rem;
    border: 1px solid var(--violet-line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 16px 36px rgba(59, 23, 100, 0.18);
    color: var(--ink);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 4px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
}
.more-pop::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    border: 6px solid transparent;
    border-top-color: var(--surface);
    transform: translateX(-50%);
}
.more-pop > span { display: flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.more-pop .service-photo { width: 22px; height: 22px; border-radius: 50%; font-size: 0.6rem; }
.member-services li.is-more:hover .more-pop,
.member-services li.is-more:focus .more-pop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.member-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}
.member-actions .btn { height: 32px; padding: 0 0.9rem; }
.member-actions .link-btn { color: var(--bad); }
@media (max-width: 900px) {
    .team-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.banner {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    margin-top: 0.85rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    background: var(--good-bg);
    font-weight: 600;
}
.banner .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}
.banner a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

.day-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.75rem; }
.day-nav input { width: auto; height: 36px; }
.view-switch {
    display: inline-flex;
    margin-left: auto;
    padding: 3px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
}
.view-switch a {
    padding: 0.28rem 0.75rem;
    border-radius: 7px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}
.view-switch a.active { background: var(--solid); color: white; }
.view-switch a:hover { text-decoration: none; }

.week-scroll { overflow-x: auto; }
.week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 0.55rem; min-width: 980px; }
.week-day {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 320px;
    padding: 0.7rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.week-day.is-today { border-color: var(--solid); }
.week-day header a { display: flex; justify-content: space-between; align-items: baseline; color: inherit; }
.week-day header span { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.week-day header strong { font-size: 1.15rem; }
.week-day.is-today header strong {
    display: inline-grid;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background: var(--solid);
    color: white;
    font-size: 0.85rem;
}
.week-list { display: flex; flex-direction: column; gap: 0.35rem; }
.week-appt, .month-appt {
    border-left: 3px solid var(--c, var(--ink));
    color: var(--ink);
    text-decoration: none;
}
.week-appt {
    display: grid;
    padding: 0.35rem 0.45rem 0.35rem 0.5rem;
    border: 1px solid var(--line);
    border-left-width: 3px;
    border-radius: 8px;
    background: var(--surface);
}
.week-appt small, .week-appt span { color: var(--muted); font-size: 0.72rem; font-weight: 600; }
.week-appt strong { font-size: 0.82rem; }
.week-appt:hover, .month-appt:hover { text-decoration: none; }
.week-add { margin-top: auto; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.week-appt[data-status="arrived"], .month-appt[data-status="arrived"] { background: var(--warn-bg); }
.week-appt[data-status="in_service"], .month-appt[data-status="in_service"] { background: var(--good-bg); }
.week-appt[data-status="completed"], .month-appt[data-status="completed"] { background: var(--soft); }
.week-appt[data-status="confirmed"], .month-appt[data-status="confirmed"] { background: var(--surface-2); }

.month { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.month-head, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-head span {
    padding: 0.6rem 0.45rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    color: var(--faint);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.month-cell { min-height: 112px; padding: 0.35rem 0.4rem 0.5rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.month-cell:nth-child(7n + 1) { border-left: 0; }
.month-cell.is-outside { background: var(--surface-2); }
.month-cell.is-outside .day-num { color: var(--faint); }
.day-num {
    display: inline-grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    font-weight: 700;
}
.month-cell.is-today .day-num { background: var(--solid); color: white; }
.month-appt {
    display: block;
    margin-top: 0.22rem;
    padding: 0.08rem 0.28rem;
    border-radius: 4px;
    background: var(--surface-2);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.month-more { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.72rem; font-weight: 700; }

.board-scroll { overflow-x: auto; }
.board {
    display: grid;
    min-width: 760px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.gutter-head, .col-head {
    min-height: 64px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
}
.col-head {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border-left: 1px solid var(--line);
}
.col-head b {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
}
.col-head strong { display: block; font-size: 0.86rem; }
.times, .track { position: relative; background: var(--surface); }
.track {
    border-left: 1px solid var(--line);
    background-image: repeating-linear-gradient(to bottom, transparent, transparent 47px, var(--soft) 47px, var(--soft) 48px, transparent 48px, transparent 95px, var(--line) 95px, var(--line) 96px);
}
.times span {
    position: absolute;
    left: 0.55rem;
    color: var(--faint);
    font-size: 0.7rem;
    font-weight: 700;
    transform: translateY(-0.45em);
}
.slot, .appt { position: absolute; left: 4px; right: 4px; }
.slot { z-index: 1; border-radius: 8px; }
.slot:hover { background: rgba(17, 24, 39, 0.05); }
.appt {
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.05rem;
    overflow: hidden;
    padding: 0.2rem 0.45rem 0.2rem 0.55rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--c, var(--ink));
    border-radius: 8px;
    color: var(--ink);
    background: var(--surface);
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
}
.appt:hover { text-decoration: none; color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
.appt strong, .appt small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.appt strong { font-size: 0.8rem; }
.appt small { color: var(--muted); font-size: 0.7rem; font-weight: 600; }
.appt.is-compact { flex-direction: row; align-items: center; gap: 0.35rem; padding-top: 0; padding-bottom: 0; }
.appt.is-compact strong { flex: 1 1 auto; min-width: 0; font-size: 0.75rem; }
.appt.is-compact small { flex: 0 0 auto; }
.appt[data-status="arrived"] { background: var(--warn-bg); }
.appt[data-status="in_service"] { background: var(--good-bg); }
.appt[data-status="completed"] { background: var(--surface-2); }
.appt[data-status="confirmed"] { background: var(--surface-2); }

.called-off ul, .visits { list-style: none; margin: 0; padding: 0; }
.called-off li, .visits li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
}
.called-off li:last-child, .visits li:last-child { border-bottom: 0; }
.visits a { display: grid; color: inherit; }
.visits a span { color: var(--muted); font-size: 0.82rem; }

.facts, .money { display: grid; gap: 0; margin: 0.9rem 0 0.2rem; }
.facts div, .money div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--line);
}
.facts div:last-child, .money div:last-child { border-bottom: 0; font-weight: 700; }
.facts dt, .money dt { color: var(--muted); font-weight: 600; }
.money dd, .facts dd { margin: 0; font-variant-numeric: tabular-nums; }

.filters { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin-bottom: 0.15rem; }
.filters input { max-width: 320px; height: 36px; }
.filters select { width: auto; min-width: 150px; height: 36px; }
.pager { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.85rem; font-weight: 600; }
.pager a { text-decoration: underline; text-underline-offset: 2px; }

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(circle at top, rgba(17, 24, 39, 0.04), transparent 28rem),
        var(--canvas);
}
.login-card {
    width: min(420px, 100%);
    padding: 1.6rem 1.5rem 1.35rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.login-card .mark { margin-bottom: 1rem; }
.login-card h1 { font-size: 1.45rem; }
.login-card .lede { margin: 0.3rem 0 1.15rem; color: var(--muted); }
.login-card form { display: grid; gap: 0.8rem; }
.login-card .btn-primary { width: 100%; height: 40px; margin-top: 0.2rem; }
.seed-logins {
    margin-top: 1.15rem;
    padding-top: 0.95rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.82rem;
}
.seed-logins p { margin: 0 0 0.4rem; }
.seed-logins ul { margin: 0; padding-left: 1.05rem; }
.seed-logins li { margin: 0.15rem 0; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

body.site-studio { overflow: hidden; }
body.site-studio .sidebar,
body.site-studio .tabbar { display: none; }
body.site-studio .shell { display: block; height: 100vh; height: 100dvh; }
body.site-studio .main { display: flex; flex-direction: column; height: 100%; padding: 0; overflow: hidden; }
body.site-studio .flash { margin: 0; border-radius: 0; }
.studio { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.studio-bar { display: flex; align-items: center; gap: 0.7rem; min-height: 64px; padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.studio-bar strong { font-size: 0.95rem; }
.studio-back { display: inline-flex; align-items: center; height: 32px; padding: 0 0.7rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: 0.78rem; font-weight: 700; text-decoration: none; }
.studio-back:hover { color: var(--ink); }
.studio-bar .web-tabs { flex: 1; min-width: 0; margin: 0; flex-wrap: nowrap; overflow-x: auto; }
.studio-bar .web-tabs-settings { margin-left: auto; }
.studio-bar .web-tabs-view { margin-left: 0.4rem; }
.studio-themes { display: flex; align-items: center; gap: 0.3rem; margin-left: auto; }
.studio-themes button { display: inline-flex; align-items: center; gap: 0.35rem; height: 32px; padding: 0 0.55rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.studio-themes button.is-on { border-color: var(--ink); color: var(--ink); background: var(--surface-2); }
.studio-themes i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.16); }
.studio-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); flex: 1; min-height: 0; }
.studio-edit { min-height: 0; overflow: auto; padding: 0.55rem 0.6rem 1.4rem; }
.studio-edit .web-tabs { display: none; }
.studio > .page-head.is-bar {
    flex-wrap: nowrap;
    gap: 0.6rem;
    margin: 0;
    padding: 0.4rem 0.75rem;
}
.studio > .page-head.is-bar h1 { font-size: 1.05rem; }
.studio > .page-head .page-icon { width: 32px; height: 32px; flex-basis: 32px; border-radius: 9px; }
.studio > .page-head .page-tools,
.studio > .page-head .page-actions { flex-wrap: nowrap; flex-shrink: 0; }
.studio > .page-head .page-actions .btn-primary { background: #b9965a; border-color: #b9965a; color: #1c1c1c; }
.studio > .page-head .page-actions .btn-primary:hover { background: #a68448; border-color: #a68448; color: #1c1c1c; }
.studio > .page-head .head-location { max-width: none; flex-shrink: 0; }
.studio > .page-head .head-location-text { display: flex; align-items: baseline; gap: 0.35rem; }
.studio > .page-head .head-location-text small { font-size: 0.72rem; letter-spacing: 0; text-transform: none; }
.studio-edit .service-editor { gap: 0.45rem; }
.studio-edit .editor-block { gap: 0.45rem; padding: 0.6rem; border-radius: 12px; }
.studio-edit .split { grid-template-columns: 1fr; gap: 0.45rem; }
.studio-edit .field { gap: 0.2rem; }
.studio-edit .field > span { font-size: 0.74rem; }
.studio-edit .field input,
.studio-edit .field select,
.studio-edit .field textarea { height: 34px; padding: 0 0.55rem; font-size: 0.84rem; }
.studio-edit .field textarea { height: auto; padding: 0.45rem 0.55rem; }
.studio-edit p.muted,
.studio-edit .muted { font-size: 0.76rem; line-height: 1.4; }
.studio-edit .web-header-opacity input { width: 100%; }
.font-pick { position: relative; }
.font-pick-native { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.font-pick-value,
.font-pick-menu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}
.font-pick-value {
    height: 34px;
    padding: 0 0.55rem;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    font-size: 0.95rem;
}
.font-pick-value span:first-child,
.font-pick-menu button span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.font-pick-sample { flex: 0 0 auto; color: var(--muted); font-size: 0.95rem; }
.font-pick-menu {
    z-index: 40;
    overflow: auto;
    padding: 0.25rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.14);
}
.font-pick-menu p {
    margin: 0.35rem 0.45rem 0.1rem;
    color: var(--faint);
    font-family: var(--sans);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.font-pick-menu button { height: auto; padding: 0.35rem 0.45rem; border-radius: 8px; }
.font-pick-menu button[aria-selected="true"],
.font-pick-menu button:hover { background: var(--surface-2); }
.banner-field { display: grid; gap: 0.35rem; }
.banner-field > span { font-size: 0.74rem; font-weight: 700; color: var(--ink-2); }
.banner-field > small { color: var(--bad); font-weight: 600; }
.banner-drop { position: relative; display: grid; gap: 0.45rem; }
.service-editor .banner-file { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); }
.studio-edit .banner-stage {
    display: grid;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 7;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    background: var(--surface-2);
    color: inherit;
    font: inherit;
    cursor: pointer;
    box-sizing: border-box;
}
.studio-edit .banner-stage.has-photo { border-style: solid; border-color: var(--line); }
.service-editor .banner-stage img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    border-radius: 0;
}
.banner-empty { display: grid; gap: 0.15rem; place-self: center; padding: 0.7rem; text-align: center; }
.banner-empty strong { color: var(--ink); font-size: 0.84rem; }
.banner-empty span { color: var(--muted); font-size: 0.72rem; line-height: 1.35; }
.banner-drop.is-over .banner-stage { border-color: #b9965a; box-shadow: 0 0 0 3px rgba(185, 150, 90, 0.22); }
.banner-bar { display: flex; gap: 0.4rem; }
.banner-bar button {
    height: 32px;
    padding: 0 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}
.banner-bar .banner-pick { background: #1c1c1c; border-color: #1c1c1c; color: #fff; }
.banner-bar .banner-pick:hover { background: #b9965a; border-color: #b9965a; color: #1c1c1c; }
.banner-bar .banner-clear { color: var(--bad); }
.studio-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-left: 1px solid var(--line); background: var(--canvas); }
.studio-viewports { display: flex; align-items: center; justify-content: flex-end; gap: 0.3rem; padding: 0; border: 0; background: transparent; }
.studio-stage:fullscreen .studio-viewports { justify-content: center; padding: 0.45rem 0.7rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.studio-viewports button { height: 32px; padding: 0 0.75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.studio-viewports button.is-on { border-color: var(--ink); color: var(--ink); background: var(--surface-2); }
.studio-width { display: inline-flex; align-items: center; gap: 0.2rem; height: 32px; padding: 0 0.65rem 0 0.35rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 0.75rem; font-weight: 700; }
.studio-width input { width: 4.4rem; height: 100%; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-align: right; }
.studio-width input:focus { outline: none; }
.studio-stage[data-viewport="custom"] .studio-width { border-color: var(--ink); color: var(--ink); background: var(--surface-2); }
.studio-frame { position: relative; flex: 1; min-height: 0; }
.studio-preview { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.studio-stage[data-viewport="tablet"] .studio-preview,
.studio-stage[data-viewport="mobile"] .studio-preview,
.studio-stage[data-viewport="custom"] .studio-preview { left: 50%; height: 100%; max-width: 100%; transform: translateX(-50%); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.studio-stage[data-viewport="tablet"] .studio-preview { width: 768px; }
.studio-stage[data-viewport="mobile"] .studio-preview { width: 390px; }
.studio-stage[data-viewport="custom"] .studio-preview { width: var(--preview-width, 1024px); }
.studio-stage:fullscreen { width: 100%; height: 100%; border: 0; background: var(--canvas); }
.studio-stage:fullscreen .studio-frame { flex: 1; height: auto; min-height: 0; }
body.site-studio .web-editor { max-width: none; }
@media (max-width: 980px) {
    body.site-studio { overflow: auto; }
    body.site-studio .main { height: auto; overflow: visible; }
    .studio { height: auto; }
    .studio-bar { flex-wrap: wrap; align-items: flex-start; }
    .studio-themes { width: 100%; margin-left: 0; overflow-x: auto; }
    .studio-split { grid-template-columns: 1fr; }
    .studio-stage { border-left: 0; border-top: 1px solid var(--line); }
    .studio-frame { height: 100dvh; }
}

body.pos-mode { overflow: hidden; }
body.pos-mode .sidebar { display: none; }
body.pos-mode .shell { display: block; height: 100vh; height: 100dvh; }
body.pos-mode .main {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    overflow: hidden;
}
body.pos-mode .flash { margin: 0; border-radius: 0; }
body.pos-mode #page-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.pos-screen {
    --rose: #e11d48;
    --violet: #7c3aed;
    --teal: #0f766e;
    --amber: #d97706;
    --blue: #2563eb;
    --pink: #db2777;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background:
        radial-gradient(900px 420px at 0% -10%, rgba(124, 58, 237, 0.16), transparent 60%),
        radial-gradient(700px 380px at 100% 0%, rgba(225, 29, 72, 0.12), transparent 55%),
        var(--editor-bg);
}
.pos-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(110deg, #3b1764 0%, #7c3aed 48%, #db2777 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 23, 100, 0.18);
}
.pos-brand { display: flex; gap: 0.7rem; align-items: center; min-width: 0; }
.pos-brand > span:last-child { display: grid; min-width: 0; }
.pos-mark {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--surface);
    color: var(--violet-ink);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}
.pos-brand strong { color: white; font-size: 0.92rem; letter-spacing: -0.03em; }
.pos-brand span span { color: rgba(255, 255, 255, 0.78); font-size: 0.72rem; font-weight: 600; }
.pos-bar-actions { display: flex; flex-wrap: nowrap; gap: 0.3rem; margin-left: auto; }
.pos-bar .btn {
    height: 30px;
    padding: 0 0.65rem;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    color: white;
}
.pos-bar .btn:hover { background: var(--surface); color: var(--violet-deep); }
.pos-location select {
    height: 30px;
    padding: 0 0.55rem;
    border: 0;
    border-radius: 8px;
    background: var(--surface);
    color: var(--violet-deep);
    font-weight: 700;
}

.pos {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    flex: 1;
    min-height: 0;
}
.pos-menu, .pos-ticket {
    min-height: 0;
    overflow: auto;
}
.pos-menu { padding: 0.55rem 0.7rem 0.7rem; }
.pos-ticket {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.45rem;
    padding: 0.7rem;
    background: var(--violet-softer);
    border: 1px solid var(--violet-line);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(59, 23, 100, 0.1);
    overflow: hidden;
}
.ticket-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0 0.15rem;
}
.ticket-head h2 { margin: 0; color: var(--violet-deep); font-size: 1.05rem; }
.ticket-head [data-line-count] { color: var(--muted); font-size: 0.76rem; font-weight: 700; }
.ticket-reset {
    height: 28px;
    padding: 0 0.7rem;
    border: 1px solid var(--violet-line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--violet-ink);
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
}
.ticket-reset:hover { background: var(--violet-soft); border-color: #c4b5fd; }
.ticket-card {
    position: relative;
    padding: 0.55rem 0.6rem 0.6rem;
    background: var(--surface);
    border: 1px solid var(--violet-line);
    border-radius: 12px;
}
.ticket-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    color: var(--ink-2);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
.ticket-hint { color: var(--faint); font-size: 0.68rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.ticket-items { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.pos-search {
    height: 34px;
    margin-bottom: 0.45rem;
    background: var(--surface);
    box-shadow: 0 4px 12px rgba(59, 23, 100, 0.05);
}
.pos-group { margin-top: 0.55rem; --tone: var(--violet); }
.pos-group:first-of-type { margin-top: 0.15rem; }
.pos-group h2 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.3rem;
    color: var(--ink-2);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.pos-group h2::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 99px;
    background: var(--tone);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 18%, var(--surface));
}
.tone-rose { --tone: var(--rose); }
.tone-violet { --tone: var(--violet); }
.tone-teal { --tone: var(--teal); }
.tone-amber { --tone: var(--amber); }
.tone-blue { --tone: var(--blue); }
.tone-pink { --tone: var(--pink); }
.pos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.35rem;
}
.pos-tile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.45rem;
    padding: 0.28rem 0.45rem 0.28rem 0.35rem;
    border: 0;
    border-radius: 8px;
    border-left: 3px solid var(--tone);
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(59, 23, 100, 0.05);
    text-align: left;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.pos-tile:hover, .pos-tile:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(59, 23, 100, 0.14);
}
.pos-tile.is-added {
    position: relative;
    background: color-mix(in srgb, var(--tone) 10%, var(--surface));
    box-shadow: inset 0 0 0 2px var(--tone);
}
.pos-tile.is-added::after {
    content: "✓";
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 99px;
    background: var(--tone);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
}
.pos-tile.is-unavailable {
    border-left-color: var(--line-strong);
    background: var(--violet-softer);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
    filter: grayscale(1);
}
.pos-tile.is-unavailable:hover { transform: none; box-shadow: none; }
.pos-tile.is-unavailable small { color: #b45309; font-weight: 700; }
.pos-line.is-flash { animation: pos-flash 0.7s ease; }
@keyframes pos-flash {
    0%, 100% { box-shadow: none; }
    35% { box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.45); }
}
.pos-tile-copy { display: grid; min-width: 0; }
.pos-tile strong { font-size: 0.82rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-tile-price { color: var(--tone); font-size: 0.78rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pos-tile small { color: var(--muted); font-size: 0.68rem; line-height: 1.1; }
.pos-tile .service-photo { width: 36px; height: 36px; border-radius: 8px; }
.service-photo {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    overflow: hidden;
    border-radius: 7px;
    background: var(--violet-soft);
    color: var(--violet-ink);
    font-size: 0.75rem;
    font-weight: 800;
}
.service-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-name { display: inline-flex; gap: 0.45rem; align-items: center; min-width: 0; }
.service-name small { display: block; }
.service-upload { display: flex; gap: 0.7rem; align-items: center; }
.service-upload input[type="file"] { height: auto; padding: 0.35rem 0; }
[data-image-preview]:empty { display: none; }
[data-image-preview] img,
.service-preview img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}
.service-preview { margin-top: 0.4rem; }
.service-preview[hidden] { display: none; }
.pos-customer {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr;
    gap: 0.3rem;
}
.ticket-customer { padding: 0.4rem 0.45rem 0.45rem; }
.ticket-customer .ticket-card-head { min-height: 18px; margin-bottom: 0.3rem; }
.pos-customer .field > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.pos-ticket .pos-customer .field input { height: 28px; font-size: 0.8rem; }
.pos-ticket .field { gap: 0.15rem; }
.pos-ticket .field > span { font-size: 0.68rem; }
.pos-ticket .field input,
.pos-ticket .field select,
.pos-line select {
    height: 30px;
    padding: 0 0.5rem;
}
.pos-lines-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}
.pos-foot {
    display: grid;
    gap: 0.35rem;
    flex: none;
    padding: 0.45rem;
    background: var(--surface);
    border: 1px solid var(--violet-line);
    border-radius: 12px;
}
.pos-line {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) minmax(0, 0.9fr) auto auto;
    gap: 0.45rem;
    align-items: center;
    padding: 0.3rem 0.1rem 0.3rem 0;
    border-bottom: 1px solid var(--violet-line);
}
.pos-line:last-child { border-bottom: 0; }
.line-thumb {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border-radius: 9px;
    background: var(--violet-soft);
    color: var(--violet-ink);
    font-weight: 800;
}
.line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-body { display: grid; gap: 0.1rem; min-width: 0; }
.line-body strong { overflow: hidden; font-size: 0.84rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.line-body small { color: var(--muted); font-size: 0.7rem; }
.line-stylist { min-width: 0; }
.pos-ticket .line-stylist select {
    width: 100%;
    height: 28px;
    padding: 0 0.45rem;
    border: 1px solid var(--violet-line);
    border-radius: 7px;
    background: var(--violet-softer);
    font-size: 0.76rem;
    font-weight: 700;
}
.line-price { color: var(--violet-deep); font-weight: 800; font-variant-numeric: tabular-nums; }
.pos-remove {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 1.25rem;
    cursor: pointer;
}
.pos-remove:hover { background: var(--bad-bg); color: var(--bad); }
.pos-methods { display: flex; gap: 0.3rem; }
.pos-methods label { position: relative; flex: 1; }
.pos-methods input {
    position: absolute;
    opacity: 0;
    inset: 0;
}
.pos-methods span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    height: 28px;
    padding: 0 0.3rem;
    border: 1px solid var(--violet-line);
    border-radius: 7px;
    background: var(--violet-softer);
    text-align: center;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
}
.pos-methods input:checked + .pay-cash,
.pos-methods input:focus-visible + .pay-cash { background: #047857; border-color: #047857; color: white; }
.pos-methods input:checked + .pay-card,
.pos-methods input:focus-visible + .pay-card { background: #1d4ed8; border-color: #1d4ed8; color: white; }
.pos-methods input:checked + .pay-upi,
.pos-methods input:focus-visible + .pay-upi { background: #7c3aed; border-color: #7c3aed; color: white; }
.pos-methods svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pos-discount {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.35rem;
}
.pos-discount-label { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--ink-2); font-size: 0.74rem; font-weight: 800; }
.pos-discount-label svg { width: 14px; height: 14px; fill: none; stroke: #db2777; stroke-width: 2; stroke-linejoin: round; }
.pos-discount-kind { display: inline-flex; padding: 2px; border-radius: 7px; background: var(--violet-soft); }
.pos-discount-kind label { position: relative; }
.pos-discount-kind input { position: absolute; opacity: 0; }
.pos-discount-kind span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 22px;
    border-radius: 5px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
}
.pos-discount-kind input:checked + span { background: var(--surface); color: #db2777; box-shadow: 0 1px 3px rgba(59, 23, 100, 0.15); }
.pos-discount-kind input:focus-visible + span { outline: 2px solid #db2777; }
.pos-ticket .pos-discount-value {
    width: 100%;
    height: 26px;
    padding: 0 0.5rem;
    border: 1px solid var(--violet-line);
    border-radius: 7px;
    background: var(--surface);
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.pos-discount-value:focus { outline: none; border-color: #db2777; box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.12); }
.pos-discount-quick { display: inline-flex; gap: 0.2rem; }
.pos-discount-quick button {
    height: 26px;
    padding: 0 0.4rem;
    border: 1px solid var(--rose-line);
    border-radius: 7px;
    background: var(--rose-soft);
    color: #be185d;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
}
.pos-discount-quick button:hover { border-color: #db2777; }
.pos-discount-quick button.is-on { background: #db2777; border-color: #db2777; color: white; }
.ticket-totals .is-discount dd { color: #be185d; }
.ticket-totals [hidden] { display: none; }
.money-discount dd { color: #be185d; }
.ticket-totals { display: flex; justify-content: space-between; gap: 0.75rem; margin: 0; padding: 0 0.2rem; }
.ticket-totals div { display: flex; gap: 0.35rem; color: var(--muted); font-size: 0.76rem; }
.ticket-totals dt { font-weight: 600; }
.ticket-totals dd { margin: 0; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.ticket-checkout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.25rem 0.25rem 0.65rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #4c1d95, #be185d);
}
.ticket-total { display: grid; margin: 0; line-height: 1.1; }
.ticket-total span { color: rgba(255, 255, 255, 0.75); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.ticket-total strong { color: white; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.btn.btn-primary.pos-pay {
    height: 34px;
    padding: 0 1rem;
    border: 0;
    border-radius: 8px;
    background: var(--surface);
    color: var(--violet-ink);
    font-size: 0.85rem;
    font-weight: 800;
}
.btn.btn-primary.pos-pay:hover { background: var(--violet-soft); color: var(--violet-ink); }
.btn.btn-primary.pos-pay:disabled {
    background: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.8);
    opacity: 1;
    cursor: not-allowed;
}
.pos-empty[hidden] { display: none; }
.pos-matches {
    position: absolute;
    top: calc(100% - 0.35rem);
    left: 0.6rem;
    right: 0.6rem;
    z-index: 6;
    display: grid;
    gap: 0.1rem;
    max-height: 220px;
    overflow: auto;
    padding: 0.3rem;
    background: var(--surface);
    border: 1px solid var(--violet-line);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(59, 23, 100, 0.18);
}
.pos-matches[hidden] { display: none; }
.pos-matches button {
    display: grid;
    gap: 0.05rem;
    padding: 0.45rem 0.6rem;
    border: 0;
    border-radius: 8px;
    background: var(--surface);
    text-align: left;
    cursor: pointer;
}
.pos-matches button:hover, .pos-matches button:focus-visible { background: var(--violet-soft); }
.pos-matches span { color: var(--muted); font-size: 0.78rem; }
.pos-customer-note {
    margin: 0;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}
.pos-customer-note:empty { display: none; }
.ticket-card-tools { display: inline-flex; align-items: center; gap: 0.35rem; }
.customer-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    height: 20px;
    padding: 0 0.45rem;
    border: 1px solid var(--rose-line);
    border-radius: 999px;
    background: var(--surface);
    color: #be185d;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}
.customer-clear[hidden] { display: none; }
.customer-clear:hover { background: var(--rose-soft); border-color: #db2777; }
.customer-clear svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.pos-customer-note.is-known { background: var(--good-bg); color: #047857; }
.pos-customer-note.is-new { background: var(--warn-bg); color: #b45309; }
.pos-empty {
    display: grid;
    justify-items: center;
    gap: 0.15rem;
    margin: 0;
    padding: 1.1rem 0.7rem;
    border: 1px dashed var(--violet-line);
    border-radius: 10px;
    background: var(--violet-softer);
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}
.pos-empty strong { color: var(--violet-deep); font-size: 0.85rem; }
.tabbar {
    position: fixed;
    left: 0.6rem;
    right: 0.6rem;
    bottom: calc(0.6rem + env(safe-area-inset-bottom));
    z-index: 30;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    padding: 0.35rem 0.3rem;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 20px;
    background: var(--glass);
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    padding: 0.3rem 0 0.2rem;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.66rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.tab:hover { text-decoration: none; color: var(--ink); }
.tab-icon { display: grid; place-items: center; width: 44px; height: 28px; border-radius: 999px; transition: background 0.15s ease; }
.tab svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.active { color: var(--violet-ink); }
.tab.active .tab-icon { background: var(--violet-soft); }
.tab-pos .tab-icon {
    width: 50px;
    height: 50px;
    margin-top: -1.3rem;
    border: 3px solid var(--surface);
    border-radius: 18px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: white;
    box-shadow: 0 10px 22px rgba(124, 58, 237, 0.35);
}
.tab-pos.active .tab-icon { background: linear-gradient(135deg, #5b21b6, #be185d); }
.tab-pos { color: var(--violet-ink); }

.tab-sheet { position: fixed; inset: 0; z-index: 60; }
.tab-sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 8, 20, 0.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: sheet-fade 0.18s ease; }
.tab-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    gap: 0.9rem;
    padding: 0.6rem 1rem calc(1rem + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: var(--surface);
    box-shadow: 0 -12px 32px rgba(17, 24, 39, 0.18);
    animation: sheet-up 0.22s ease;
}
.tab-sheet-grip { justify-self: center; width: 40px; height: 4px; border-radius: 999px; background: var(--line); }
.tab-sheet-who { display: flex; align-items: center; gap: 0.7rem; }
.tab-sheet-who .avatar { width: 40px; height: 40px; }
.tab-sheet-who p { margin: 0; }
.tab-sheet-who small { display: block; color: var(--muted); font-size: 0.78rem; }
.tab-sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 0.5rem; }
.tab-sheet-grid a {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    padding: 0.8rem 0.3rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink-2);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}
.tab-sheet-grid a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab-sheet-grid a .tab-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--violet-soft); color: var(--violet-ink); }
.tab-sheet-grid a.active { border-color: #a78bfa; background: var(--violet-softer); color: var(--violet-ink); }
.tab-sheet-location label { display: grid; gap: 0.3rem; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.tab-sheet-location select { width: 100%; height: 42px; padding: 0 0.7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); }
.tab-sheet-out {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 44px;
    border: 1px solid var(--rose-line);
    border-radius: 12px;
    background: var(--rose-soft);
    color: #be123c;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.tab-sheet-out svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.sheet-open { overflow: hidden; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes sheet-fade { from { opacity: 0; } to { opacity: 1; } }

.receipt-lines { list-style: none; margin: 0.85rem 0 0; padding: 0; }
.receipt-lines li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--line);
}
.receipt-lines strong { font-variant-numeric: tabular-nums; }

@media (max-width: 980px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    body:not(.pos-mode) .main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
    body:not(.pos-mode) .tabbar { display: grid; }
    .tab-sheet:not([hidden]) { display: block; }
    body:not(.pos-mode) .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
    .detail, .stats { grid-template-columns: 1fr; }
    .main { padding: 1.1rem; }
    .page-head.is-bar { margin: -1.1rem -1.1rem 1rem; padding: 0.7rem 1.1rem; }
}

@media (max-width: 860px) {
    .pos { grid-template-columns: 1fr; }
    .pos-ticket { margin: 0.75rem; }
}

@media (max-width: 720px) {
    .split, .stats, .detail, .editor-top, .editor-metrics { grid-template-columns: 1fr; }
    .view-switch { margin-left: 0; }
    .month-cell { min-height: 76px; }
    .month-appt { font-size: 0.65rem; }
}

.row-actions { display: flex; gap: 0.35rem; align-items: center; justify-content: flex-end; white-space: nowrap; }
.act {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    height: 30px;
    padding: 0 0.6rem 0 0.5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink-2);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.act svg { width: 14px; height: 14px; flex: 0 0 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.act:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); text-decoration: none; }
.act:focus-visible { outline: 2px solid #7c3aed; outline-offset: 2px; }
.act-primary { border-color: var(--violet-line); background: var(--violet-soft); color: var(--violet-ink); }
.act-primary:hover { border-color: #7c3aed; background: #7c3aed; color: white; }
.act-danger { border-color: var(--rose-line); background: var(--rose-soft); color: #be123c; }
.act-danger:hover { border-color: #e11d48; background: #e11d48; color: white; }
.page-actions .act { height: 34px; padding: 0 0.75rem 0 0.6rem; font-size: 0.8rem; }
.table td.row-actions { text-align: right; }
form.inline { display: inline; margin: 0; }
.link-btn {
    border: 0;
    background: none;
    padding: 0;
    color: var(--bad);
    font-weight: 700;
    cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.btn-danger-solid { background: var(--bad); border-color: var(--bad); color: white; }
.btn-danger-solid:hover { background: #991b1b; border-color: #991b1b; color: white; }

body.overlay-open { overflow: hidden; }
.overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}
.overlay[hidden] { display: none !important; }
#confirm { z-index: 70; }
.overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 20, 0.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: sheet-fade 0.18s ease;
}
.dialog {
    position: relative;
    width: min(680px, 100%);
    max-height: min(88vh, 860px);
    overflow: auto;
    padding: 1.25rem 1.35rem 1.4rem;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(17, 24, 39, 0.28);
}
.confirm-dialog {
    width: min(400px, 100%);
    padding: 1.6rem 1.5rem 1.3rem;
    border-radius: 22px;
    text-align: center;
    animation: confirm-pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.confirm-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 0.9rem;
    border-radius: 20px;
    background: var(--rose-soft);
    color: #e11d48;
    box-shadow: 0 0 0 8px var(--rose-soft);
}
.confirm-icon > span { display: none; }
.confirm-icon svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.confirm-dialog[data-tone="danger"] .confirm-icon-danger,
.confirm-dialog[data-tone="logout"] .confirm-icon-logout,
.confirm-dialog[data-tone="plain"] .confirm-icon-plain { display: grid; }
.confirm-dialog[data-tone="logout"] .confirm-icon { background: linear-gradient(135deg, #7c3aed, #db2777); color: white; box-shadow: 0 0 0 8px var(--violet-soft), 0 10px 24px rgba(124, 58, 237, 0.3); }
.confirm-dialog[data-tone="plain"] .confirm-icon { background: var(--info-bg); color: #2563eb; box-shadow: 0 0 0 8px var(--info-bg); }
.confirm-dialog h2 { margin: 0 0 0.4rem; font-size: 1.2rem; letter-spacing: -0.02em; }
.confirm-dialog p { margin: 0 auto 1.3rem; max-width: 30ch; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.confirm-dialog p:empty { display: none; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.confirm-actions .btn { justify-content: center; height: 42px; border-radius: 12px; font-weight: 700; }
.confirm-dialog[data-tone="logout"] [data-confirm-ok] { border: 0; background: linear-gradient(135deg, #7c3aed, #db2777); color: white; box-shadow: 0 8px 18px rgba(124, 58, 237, 0.28); }
.confirm-dialog[data-tone="logout"] [data-confirm-ok]:hover { filter: brightness(1.08); }
@keyframes confirm-pop { from { opacity: 0; transform: translateY(8px) scale(0.94); } to { opacity: 1; transform: none; } }
.dialog-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.dialog-close:hover { background: var(--canvas); color: var(--ink); }
.dialog:has(.service-editor) {
    width: min(760px, 100%);
    background:
        radial-gradient(420px 180px at 100% 0%, rgba(219, 39, 119, 0.12), transparent 60%),
        var(--editor-bg);
}
.editor-lead { margin: -0.45rem 0 0.85rem; color: var(--muted); }
.service-editor { display: grid; gap: 0.75rem; }
.editor-block {
    display: grid;
    gap: 0.8rem;
    padding: 0.95rem;
    background: var(--surface);
    border: 1px solid var(--violet-line);
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(59, 23, 100, 0.05);
}
.editor-top {
    grid-template-columns: 148px minmax(0, 1fr);
    align-items: start;
}
.editor-fields { display: grid; gap: 0.75rem; align-content: start; }
.photo-drop { display: grid; gap: 0.35rem; }
.service-editor .photo-frame {
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
    overflow: hidden;
    border: 1px dashed #d8b4fe;
    border-radius: 16px;
    background: linear-gradient(160deg, var(--violet-soft), var(--rose-soft));
    color: var(--violet-ink);
    font-size: 1.8rem;
    font-weight: 800;
}
.service-editor [data-image-preview] img {
    width: 132px;
    height: 132px;
    object-fit: cover;
    border-radius: 16px;
}
.service-editor .banner-stage[data-image-preview] img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    border-radius: 0;
}
.service-editor input[type="file"] {
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--violet-ink);
}
.photo-remove { margin-top: -0.2rem; }
.location-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
    background:
        radial-gradient(260px 120px at 100% 0%, rgba(236, 72, 153, 0.35), transparent 70%),
        linear-gradient(135deg, #2e1065, #6d28d9 65%, #be185d);
    box-shadow: 0 12px 28px rgba(59, 23, 100, 0.2);
}
.location-mark {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    color: white;
    font-size: 1.7rem;
    font-weight: 800;
}
.location-hero-fields { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0.6rem; }
.location-hero .field > span { color: rgba(255, 255, 255, 0.82); }
.location-hero .field input { border-color: rgba(255, 255, 255, 0.35); background: var(--surface); }
.location-hero .field small { color: #fecdd3; }
.hours-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; }
.hours-tools-label { color: var(--muted); font-size: 0.76rem; font-weight: 700; }
.hours-week { display: grid; border: 1px solid var(--violet-line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.hours-day {
    display: grid;
    grid-template-columns: 96px 104px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem 0.75rem;
    padding: 0.55rem 0.8rem;
    border-top: 1px solid var(--violet-line);
}
.hours-day:first-child { border-top: 0; }
.hours-day:hover { background: var(--violet-softer); }
.hours-name { font-size: 0.88rem; }
.hours-toggle { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; font-weight: 700; color: var(--violet-ink); cursor: pointer; }
.hours-toggle input[type="checkbox"] { grid-row: auto; flex: 0 0 auto; }
.hours-ranges { display: grid; gap: 0.35rem; }
.hours-range { display: flex; align-items: center; gap: 0.4rem; }
.hours-range[hidden] { display: none; }
.hours-range input[type="time"] { width: 118px; height: 34px; padding: 0 0.5rem; font-size: 0.85rem; }
.hours-dash { color: #a78bfa; font-weight: 800; }
.hours-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--violet-line);
    border-radius: 50%;
    background: var(--violet-softer);
    color: var(--violet-ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.hours-icon:hover { border-color: #7c3aed; background: #7c3aed; color: white; }
.hours-day.is-split [data-range-add] { visibility: hidden; }
.hours-closed-note { display: none; color: var(--muted); font-size: 0.84rem; font-weight: 600; }
.hours-day.is-closed .hours-range { display: none; }
.hours-day.is-closed .hours-closed-note { display: block; }
.hours-day.is-closed .hours-name, .hours-day.is-closed .hours-toggle { color: var(--muted); }
.hours-copy {
    padding: 0.25rem 0.5rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #7c3aed;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.hours-day:hover .hours-copy, .hours-copy:focus-visible { opacity: 1; }
.hours-copy:hover { background: var(--violet-soft); }
.hours-day.is-bad, .hours-day.is-invalid { background: var(--rose-soft); }
.hours-day.is-bad .hours-range input, .hours-day.is-invalid .hours-range input { border-color: #f9a8b8; }
.hours-error { grid-column: 1 / -1; margin: 0; color: var(--bad); font-size: 0.78rem; font-weight: 600; }
.board-closed {
    margin: 0 0 0.75rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--rose-line);
    border-radius: 12px;
    background: var(--rose-soft);
    color: #9f1239;
    font-weight: 600;
}
.track.is-closed { background: repeating-linear-gradient(135deg, var(--violet-softer) 0 10px, var(--violet-soft) 10px 20px); }
.track-break {
    position: absolute;
    left: 0;
    right: 0;
    display: grid;
    place-items: center;
    background: repeating-linear-gradient(135deg, var(--violet-softer) 0 10px, var(--violet-soft) 10px 20px);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    pointer-events: none;
}
.location-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.location-chip {
    height: 30px;
    padding: 0 0.75rem;
    border: 1px solid var(--violet-line);
    border-radius: 999px;
    background: var(--violet-softer);
    color: var(--violet-ink);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}
.location-chip:hover { border-color: #a78bfa; }
.location-chip.is-on { border-color: #7c3aed; background: #7c3aed; color: white; }
.location-tax { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) auto; align-items: end; gap: 0.6rem; }
.location-tax .location-chips { padding-bottom: 0.3rem; }
.location-tax-example { color: var(--muted); font-size: 0.76rem; font-weight: 700; }
.member-count.is-bad { background: var(--bad-bg); color: var(--bad); }
@media (max-width: 640px) {
    .location-hero, .location-hero-fields, .location-tax { grid-template-columns: 1fr; }
    .hours-day { grid-template-columns: 1fr auto; }
    .hours-ranges { grid-column: 1 / -1; }
    .hours-copy { opacity: 1; grid-column: 1 / -1; justify-self: start; }
}
.combo { position: relative; }
.combo > label { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); }
.combo-box { position: relative; }
.field .combo-box input { padding: 0 2.4rem 0 2.1rem; }
.combo-icon {
    position: absolute;
    top: 50%;
    left: 0.7rem;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #8b7aa8;
    stroke-width: 2;
    stroke-linecap: round;
    transform: translateY(-50%);
    pointer-events: none;
}
.combo-toggle {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transform: translateY(-50%);
}
.combo-toggle:hover { background: var(--violet-soft); color: var(--violet-ink); }
.combo-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.combo-list {
    position: absolute;
    top: calc(100% - 0.9rem);
    left: 0;
    right: 0;
    z-index: 30;
    display: grid;
    gap: 0.1rem;
    max-height: 220px;
    margin: 0;
    padding: 0.3rem;
    overflow: auto;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--violet-line);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(59, 23, 100, 0.18);
}
.combo-list[hidden], .combo-list [hidden] { display: none; }
.combo-list li[role="option"] {
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
}
.combo-list li[role="option"]:hover, .combo-list li.is-active { background: var(--violet-soft); color: var(--violet-ink); }
.combo-list li[aria-selected="true"]::after { content: "✓"; float: right; color: #7c3aed; }
.combo-list mark { background: #fde68a; color: inherit; border-radius: 3px; }
.combo-list .combo-create { color: var(--violet-ink); font-weight: 800; }
.combo-none { padding: 0.5rem 0.65rem; color: var(--muted); font-size: 0.82rem; }
.field small.combo-note { color: var(--muted); font-size: 0.74rem; }
.field small.combo-note:empty { display: none; }
.field small.combo-note.is-new { color: #b45309; }
.editor-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.editor-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.95rem;
    background: var(--surface);
    border: 1px solid var(--violet-line);
    border-radius: 16px;
}
.menu-switch {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.05rem 0.6rem;
    align-items: center;
    font-weight: 700;
}
.menu-switch small { grid-column: 2; color: var(--muted); font-weight: 600; }
.service-editor .btn.btn-primary {
    height: 42px;
    padding: 0 1.15rem;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
}
.service-editor .btn.btn-primary:hover { background: linear-gradient(135deg, #6d28d9, #be185d); color: white; }
.dialog:has(.member-editor) {
    width: min(760px, 100%);
    background:
        radial-gradient(420px 180px at 100% 0%, color-mix(in srgb, var(--member-tint, #7c3aed) 14%, transparent), transparent 60%),
        var(--editor-bg);
}
.member-editor { display: grid; gap: 0.75rem; }
.member-editor .btn.btn-primary {
    height: 42px;
    padding: 0 1.15rem;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
}
.member-editor .btn.btn-primary:hover { background: linear-gradient(135deg, #6d28d9, #be185d); color: white; }
.editor-title { margin: 0; color: var(--violet-deep); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.editor-title-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.member-profile { grid-template-columns: 170px minmax(0, 1fr); align-items: center; }
.member-preview { display: grid; justify-items: center; gap: 0.55rem; }
.member-preview .member-avatar {
    width: 76px;
    height: 76px;
    font-size: 1.5rem;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--member) 18%, var(--surface)), 0 12px 24px color-mix(in srgb, var(--member) 30%, transparent);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.member-preview small { color: var(--muted); font-size: 0.7rem; font-weight: 700; }
.member-photo { position: relative; display: block; border-radius: 50%; cursor: pointer; }
.member-photo input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.member-photo-cam {
    position: absolute;
    right: -2px;
    bottom: -2px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: white;
    box-shadow: 0 4px 10px rgba(59, 23, 100, 0.25);
    pointer-events: none;
}
.member-photo-cam svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.member-photo:hover .member-avatar { filter: brightness(0.92); }
.member-photo:focus-within { outline: 2px solid #7c3aed; outline-offset: 4px; }
.member-photo-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.2rem 0.5rem; font-size: 0.7rem; }
.member-photo-hint { color: var(--muted); font-weight: 600; }
.member-photo-remove { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--bad); font-weight: 700; cursor: pointer; }
.member-photo-remove input { width: 12px; height: 12px; accent-color: var(--bad); }
.member-avatar.has-photo { overflow: hidden; background: var(--soft); }
.member-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-swatches { display: grid; grid-template-columns: repeat(6, 20px); gap: 0.35rem; justify-content: center; }
.member-swatch {
    position: relative;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--swatch);
    box-shadow: 0 0 0 1px var(--line);
    cursor: pointer;
}
.member-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--swatch); }
.member-swatch.is-custom {
    overflow: hidden;
    background: conic-gradient(#ef4444, #f59e0b, #22c55e, #0ea5e9, #8b5cf6, #ef4444);
}
.member-swatch.is-custom input {
    position: absolute;
    inset: -6px;
    width: 32px;
    height: 32px;
    opacity: 0;
    cursor: pointer;
}
.role-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.role-card { position: relative; cursor: pointer; }
.role-card input { position: absolute; opacity: 0; }
.role-card > span {
    display: grid;
    gap: 0.15rem;
    height: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--violet-line);
    border-radius: 12px;
    background: var(--violet-softer);
    transition: border-color 0.12s ease, background 0.12s ease;
}
.role-card strong { font-size: 0.86rem; }
.role-card small { color: var(--muted); font-size: 0.72rem; line-height: 1.3; }
.role-card:hover > span { border-color: #c4b5fd; }
.role-card input:checked + span { border-color: var(--role); background: color-mix(in srgb, var(--role) 8%, var(--surface)); box-shadow: inset 0 0 0 1px var(--role); }
.role-card input:checked + span strong { color: var(--role); }
.role-card input:focus-visible + span { outline: 2px solid var(--role); outline-offset: 2px; }
.role-card.role-owner { --role: #be185d; }
.role-card.role-manager { --role: #1d4ed8; }
.role-card.role-receptionist { --role: #b45309; }
.role-card.role-stylist { --role: #6d28d9; }
.role-error { color: var(--bad); font-size: 0.78rem; font-weight: 600; }
.member-count { padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--violet-soft); color: var(--violet-ink); font-size: 0.72rem; font-weight: 800; }
.service-picks { display: grid; gap: 0.35rem; }
.service-picks .eyebrow { margin: 0; }
.service-picks > div { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.service-pick { position: relative; cursor: pointer; }
.service-pick input { position: absolute; opacity: 0; }
.service-pick > span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.7rem 0.2rem 0.22rem;
    border: 1px solid var(--violet-line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.8rem;
    font-weight: 700;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.service-pick .service-photo { width: 24px; height: 24px; border-radius: 50%; font-size: 0.65rem; }
.service-pick:hover > span { border-color: #c4b5fd; }
.service-pick input:checked + span { border-color: #7c3aed; background: var(--violet-soft); color: var(--violet-ink); }
.service-pick input:checked + span::after { content: "✓"; font-size: 0.72rem; }
.service-pick input:focus-visible + span { outline: 2px solid #7c3aed; outline-offset: 2px; }
.member-switches { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; }
.location-editor .menu-switch input,
.hours-toggle input[type="checkbox"],
.member-editor .menu-switch input {
    appearance: none;
    position: relative;
    width: 36px;
    height: 20px;
    margin: 0;
    border-radius: 999px;
    background: var(--line-strong);
    cursor: pointer;
    transition: background 0.15s ease;
    grid-row: span 2;
}
.location-editor .menu-switch input::after,
.hours-toggle input[type="checkbox"]::after,
.member-editor .menu-switch input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}
.location-editor .menu-switch input:checked,
.hours-toggle input[type="checkbox"]:checked,
.member-editor .menu-switch input:checked { background: linear-gradient(135deg, #7c3aed, #db2777); }
.location-editor .menu-switch input:checked::after,
.hours-toggle input[type="checkbox"]:checked::after,
.member-editor .menu-switch input:checked::after { transform: translateX(16px); }
.location-editor .menu-switch input:focus-visible,
.hours-toggle input[type="checkbox"]:focus-visible,
.member-editor .menu-switch input:focus-visible { outline: 2px solid #7c3aed; outline-offset: 2px; }
@media (max-width: 720px) {
    .member-profile { grid-template-columns: 1fr; }
    .role-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dialog .panel { margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
.dialog .visit-sheet .panel { margin-top: 0.75rem; padding: 0.95rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.dialog .detail { grid-template-columns: 1fr; }
.dialog .page-head { margin-bottom: 1rem; padding-right: 2rem; }
.dialog .modal-back { display: none; }
.dialog .flash { margin-bottom: 0.9rem; }
#live[aria-busy="true"] { opacity: 0.55; }

.toasts {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    display: grid;
    gap: 0.5rem;
    width: min(360px, calc(100vw - 2rem));
}
.toast {
    padding: 0.75rem 0.9rem;
    background: var(--solid);
    color: white;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.2);
    font-weight: 700;
}
.toast.bad { background: var(--bad); }

.receipt-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.receipt-actions .btn { display: inline-flex; align-items: center; gap: 0.4rem; }
.receipt-actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.receipt-whatsapp { border-color: #25d366; background: #25d366; color: white; text-decoration: none; }
.receipt-whatsapp:hover { border-color: #1ebe5b; background: #1ebe5b; color: white; }
#print-root { display: none; }

.sku { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; color: var(--muted); font-size: 0.8rem; }
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: var(--good-bg);
    color: #047857;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}
.stock-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock-badge.is-low { background: var(--warn-bg); color: #b45309; }
.stock-badge.is-out { background: var(--bad-bg); color: var(--bad); }
.product-photo { background: linear-gradient(160deg, var(--teal-soft), var(--violet-soft)); }
.pos-menu-top { display: flex; align-items: center; gap: 0.5rem; }
.pos-menu-top .pos-search { flex: 1; min-width: 0; }
.pos-tabs { display: inline-flex; flex: none; padding: 3px; border-radius: 10px; background: var(--violet-soft); }
.pos-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 32px;
    padding: 0 0.8rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}
.pos-tabs button span { padding: 0.05rem 0.4rem; border-radius: 999px; background: rgba(109, 40, 217, 0.1); font-size: 0.7rem; }
.pos-tabs button.is-on { background: var(--surface); color: var(--violet-ink); box-shadow: 0 2px 6px rgba(59, 23, 100, 0.12); }
.pos-tabs button.is-on span { background: #6d28d9; color: white; }
.pos-panel[hidden] { display: none; }
.pos-line.is-product { grid-template-columns: 34px minmax(0, 1fr) auto auto auto; }
.line-qty {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--violet-line);
    border-radius: 8px;
    background: var(--surface);
}
.line-qty button {
    width: 26px;
    height: 26px;
    border: 0;
    background: var(--violet-softer);
    color: var(--violet-ink);
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
}
.line-qty button:hover:not(:disabled) { background: var(--violet-soft); }
.line-qty button:disabled { color: #c4b5d9; cursor: not-allowed; }
.line-qty output { min-width: 26px; font-size: 0.82rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }

.dialog:has(.invoice-sheet) { width: min(780px, 100%); padding: 0; background: var(--violet-softer); }
.dialog:has(.invoice-sheet) .dialog-close { top: 0.9rem; right: 0.9rem; z-index: 2; color: rgba(255, 255, 255, 0.85); }
.dialog:has(.invoice-sheet) .dialog-close:hover { background: rgba(255, 255, 255, 0.16); color: white; }
.invoice-sheet { display: grid; max-width: 780px; overflow: hidden; background: var(--violet-softer); border: 1px solid var(--violet-line); border-radius: 18px; box-shadow: var(--shadow); }
.dialog .invoice-sheet { max-width: none; border: 0; border-radius: 0; box-shadow: none; }
.invoice-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.5rem 1.3rem;
    background:
        radial-gradient(360px 160px at 100% 0%, rgba(236, 72, 153, 0.45), transparent 70%),
        linear-gradient(135deg, #2e1065, #6d28d9 60%, #be185d);
    color: white;
}
.invoice-brand { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.invoice-mark {
    display: grid;
    place-items: center;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 1.3rem;
    font-weight: 800;
}
.invoice-brand > div { display: grid; gap: 0.1rem; min-width: 0; }
.invoice-brand strong { font-size: 1.05rem; letter-spacing: 0.01em; }
.invoice-brand span { color: rgba(255, 255, 255, 0.75); font-size: 0.78rem; }
.invoice-id { display: grid; justify-items: end; gap: 0.2rem; padding-right: 2rem; text-align: right; }
.invoice-id h1 { margin: 0; color: white; font-size: 1.55rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.invoice-id > span:last-child { color: rgba(255, 255, 255, 0.78); font-size: 0.8rem; }
.invoice-status {
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.invoice-status.is-paid { background: #34d399; color: #064e3b; }
.invoice-parties {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1.1rem 1.5rem 0;
}
.invoice-parties > div {
    display: grid;
    align-content: start;
    gap: 0.15rem;
    padding: 0.8rem 0.95rem;
    background: var(--surface);
    border: 1px solid var(--violet-line);
    border-radius: 14px;
    font-size: 0.84rem;
}
.invoice-parties strong { font-size: 0.98rem; }
.invoice-parties span, .invoice-parties a { color: var(--muted); }
.invoice-parties a { font-weight: 600; text-decoration: none; }
.invoice-parties a:hover { color: var(--violet-ink); }
.invoice-label { margin-bottom: 0.2rem; color: #8b7aa8 !important; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.invoice-method::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 0.4rem; border-radius: 50%; background: #7c3aed; vertical-align: middle; }
.invoice-method.method-cash::before { background: #047857; }
.invoice-method.method-card::before { background: #1d4ed8; }
.invoice-items {
    margin: 0.75rem 1.5rem 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--violet-line);
    border-radius: 14px;
}
.invoice-items-head, .invoice-item {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0.95rem;
}
.invoice-items-head {
    background: var(--violet-softer);
    border-bottom: 1px solid var(--violet-line);
    color: #8b7aa8;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.invoice-items-head span:last-child { text-align: right; }
.invoice-item + .invoice-item { border-top: 1px solid var(--line-soft); }
.invoice-service { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.invoice-service .service-photo { width: 40px; height: 40px; border-radius: 10px; }
.invoice-service > span { display: grid; min-width: 0; }
.invoice-service strong { overflow: hidden; font-size: 0.9rem; text-overflow: ellipsis; white-space: nowrap; }
.invoice-service small { color: var(--muted); font-size: 0.74rem; }
.invoice-stylist { display: flex; align-items: center; gap: 0.45rem; min-width: 0; color: var(--ink-2); font-size: 0.84rem; font-weight: 600; }
.invoice-stylist .member-avatar { width: 26px; height: 26px; font-size: 0.62rem; box-shadow: none; }
.invoice-retail { padding: 0.12rem 0.5rem; border-radius: 999px; background: var(--teal-soft); color: #0e7490; font-size: 0.72rem; font-weight: 800; }
.invoice-amount { font-size: 0.92rem; font-variant-numeric: tabular-nums; text-align: right; }
.invoice-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
    align-items: end;
    gap: 1rem;
    padding: 0.9rem 1.5rem 0;
}
.invoice-thanks { margin: 0; color: #8b7aa8; font-size: 0.82rem; font-style: italic; }
.invoice-totals { display: grid; gap: 0.3rem; margin: 0; }
.invoice-totals div { display: flex; justify-content: space-between; gap: 1rem; padding: 0 0.2rem; color: var(--muted); font-size: 0.86rem; }
.invoice-totals dt { font-weight: 600; }
.invoice-totals dd { margin: 0; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.invoice-totals .money-discount dd { color: #be185d; }
.invoice-totals .invoice-grand {
    align-items: center;
    margin-top: 0.35rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #4c1d95, #be185d);
    color: rgba(255, 255, 255, 0.85);
}
.invoice-totals .invoice-grand dt { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.invoice-totals .invoice-grand dd { color: white; font-size: 1.4rem; }
.invoice-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 1.1rem;
    padding: 0.9rem 1.5rem 1.1rem;
    background: var(--surface);
    border-top: 1px solid var(--violet-line);
}
.invoice-foot .receipt-actions { margin: 0; }
.invoice-foot .receipt-print { border: 0; background: linear-gradient(135deg, #7c3aed, #db2777); color: white; }
.invoice-foot .receipt-print:hover { background: linear-gradient(135deg, #6d28d9, #be185d); color: white; }
.invoice-links { display: flex; gap: 0.5rem; }
.dialog .invoice-links .modal-back { display: none; }
@media (max-width: 640px) {
    .invoice-parties, .invoice-summary { grid-template-columns: 1fr; }
    .invoice-items-head { display: none; }
    .invoice-item { grid-template-columns: minmax(0, 1fr) auto; }
    .invoice-stylist { grid-column: 1; grid-row: 2; }
    .invoice-id { justify-items: start; padding-right: 0; text-align: left; }
}

.thermal {
    width: 72mm;
    margin: 0 auto;
    padding: 2mm 0 6mm;
    color: var(--ink);
    font: 11px/1.35 "Courier New", ui-monospace, monospace;
}
.thermal-head { display: grid; justify-items: center; gap: 1px; padding-bottom: 2mm; text-align: center; }
.thermal-head strong { font-size: 15px; letter-spacing: 0.02em; text-transform: uppercase; }
.thermal-title {
    margin: 0 0 2mm;
    padding: 1mm 0;
    border-top: 1px dashed #000;
    border-bottom: 1px dashed #000;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-align: center;
}
.thermal dl { margin: 0; }
.thermal dl div { display: flex; justify-content: space-between; gap: 3mm; }
.thermal dt { font-weight: 400; }
.thermal dd { margin: 0; text-align: right; }
.thermal-meta { padding-bottom: 2mm; border-bottom: 1px dashed #000; }
.thermal-items { width: 100%; margin: 1.5mm 0; border-collapse: collapse; }
.thermal-items th { padding-bottom: 1mm; border-bottom: 1px solid #000; font-weight: 700; text-align: left; }
.thermal-items th:last-child, .thermal-items td:last-child { text-align: right; white-space: nowrap; vertical-align: top; }
.thermal-items td { padding: 1mm 0; }
.thermal-items small { display: block; font-size: 10px; }
.thermal-sum { padding-top: 1.5mm; border-top: 1px dashed #000; }
.thermal-total {
    margin-top: 1.5mm;
    padding: 1.5mm 0;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    font-size: 14px;
    font-weight: 700;
}
.thermal-paid { margin: 2mm 0 0; text-align: center; }
.thermal-foot { display: grid; justify-items: center; margin-top: 3mm; padding-top: 2mm; border-top: 1px dashed #000; }

@page thermal { margin: 0; }

@media print {
    body.print-thermal > :not(#print-root) { display: none !important; }
    body.print-thermal { margin: 0; background: var(--surface); }
    body.print-thermal #print-root { display: block; page: thermal; }
    .sidebar, .tabbar, .tab-sheet, .page-actions, .no-print, .flash, .actions, .overlay, .toasts { display: none !important; }
    .shell, .detail { display: block; }
    body, .panel, .stat { background: var(--surface); box-shadow: none; }
}

.btn-icon { width: 15px; height: 15px; margin-right: 0.3rem; vertical-align: -2px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.report-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; padding: 0.7rem 0.8rem; }
.report-periods, .report-scope { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.report-scope { margin-left: auto; padding-left: 0.8rem; border-left: 1px solid var(--line); }
.report-period {
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    color: var(--ink-3);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}
.report-period:hover { background: var(--accent-soft); color: var(--ink); text-decoration: none; }
.report-period.is-on { background: var(--solid); color: white; }
.report-custom { display: flex; align-items: center; gap: 0.4rem; color: var(--faint); }
.report-custom input[type="date"] { height: 34px; padding: 0 0.5rem; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 0.82rem; }
.report-custom .btn { height: 34px; padding: 0 0.8rem; }
.report-jump { position: sticky; top: var(--head-h, 66px); z-index: 4; display: flex; gap: 0.3rem; margin: 0.85rem -0.2rem 0; padding: 0.45rem 0.2rem; overflow-x: auto; background: var(--canvas); scrollbar-width: none; }
.report-jump a { flex: 0 0 auto; padding: 0.32rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-3); font-size: 0.76rem; font-weight: 700; text-decoration: none; }
.report-jump a:hover { border-color: #a78bfa; color: var(--violet-ink); text-decoration: none; }
[id="sales"], [id="menu"], [id="team"], [id="clients"], [id="bookings"], [id="tax"], [id="daily"] { scroll-margin-top: calc(var(--head-h, 66px) + 3.2rem); }

.report-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.6rem; margin-top: 0.6rem; }
.report-kpi {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.report-kpi-label { color: var(--muted); font-size: 0.74rem; font-weight: 700; cursor: help; }
.report-kpi strong { font-size: 1.35rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.report-kpi small { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; font-size: 0.72rem; }
.report-kpi.is-lead {
    grid-column: span 2;
    border: 0;
    background: radial-gradient(260px 140px at 100% 0%, rgba(236, 72, 153, 0.4), transparent 70%), linear-gradient(135deg, #2e1065, #6d28d9 65%, #be185d);
    color: white;
}
.report-kpi.is-lead strong { font-size: 2rem; }
.report-kpi.is-lead .report-kpi-label, .report-kpi.is-lead .report-prev { color: rgba(255, 255, 255, 0.78); }
.report-delta { padding: 0.1rem 0.4rem; border-radius: 999px; font-weight: 800; }
.report-delta.is-good { background: var(--good-bg); color: var(--good); }
.report-delta.is-bad { background: var(--bad-bg); color: var(--bad); }
.report-delta.is-flat { background: var(--accent-soft); color: var(--muted); }
.report-prev { color: var(--faint); font-weight: 600; }

.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; margin-top: 0.85rem; }
.report-grid > .panel { margin-top: 0; }
.report-wide { grid-column: span 2; }
.report-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.9rem; }
.report-card-head h2 { margin: 0; font-size: 0.98rem; letter-spacing: -0.02em; }
.report-card-head p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.78rem; }
.report-link { flex: 0 0 auto; color: var(--violet-ink); font-size: 0.78rem; font-weight: 700; }
.report-empty { margin: 0.4rem 0; padding: 1.4rem 1rem; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; font-size: 0.85rem; }
.report-subhead { margin: 1rem 0 0.5rem; color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.report-note { margin: 0.8rem 0 0; color: var(--muted); font-size: 0.8rem; }

.report-chart { display: grid; grid-template-columns: repeat(var(--bars), minmax(0, 1fr)); align-items: end; gap: clamp(2px, 0.6vw, 8px); height: 220px; padding-top: 1.4rem; }
.report-bar { display: grid; grid-template-rows: 1fr auto; height: 100%; min-width: 0; }
.report-bar-fill {
    position: relative;
    align-self: end;
    min-height: 2px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #a78bfa, #7c3aed);
    transition: filter 0.15s ease;
}
.report-bar:hover .report-bar-fill { filter: brightness(1.1) saturate(1.2); }
.report-bar.is-top .report-bar-fill { background: linear-gradient(180deg, #f472b6, #db2777); }
.report-bar.is-zero .report-bar-fill { background: var(--line); }
.report-bar-fill em { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); color: #be185d; font-size: 0.68rem; font-style: normal; font-weight: 800; white-space: nowrap; }
.report-bar small { padding-top: 0.35rem; color: var(--faint); font-size: 0.64rem; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; }

.report-stack { display: flex; height: 12px; overflow: hidden; margin-bottom: 0.8rem; border-radius: 999px; background: var(--soft); }
.report-stack span { height: 100%; }
.report-list { display: grid; gap: 0.1rem; margin: 0; padding: 0; list-style: none; }
.report-list li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-top: 1px solid var(--line-soft); }
.report-list li:first-child { border-top: 0; }
.report-list-name { min-width: 0; font-weight: 600; font-size: 0.86rem; }
.report-list-name small { display: block; color: var(--faint); font-size: 0.72rem; font-weight: 600; }
.report-list strong { font-variant-numeric: tabular-nums; }
.report-share { min-width: 3rem; color: var(--muted); font-size: 0.76rem; font-weight: 700; text-align: right; }
.report-list-foot { grid-template-columns: 1fr auto !important; color: var(--muted); }
.report-dot { width: 10px; height: 10px; border-radius: 3px; }
.pay-cash { background: #10b981; }
.pay-card { background: #3b82f6; }
.pay-upi { background: #8b5cf6; }
.report-dot.is-services { background: #7c3aed; }
.report-dot.is-products { background: #14b8a6; }
.report-donut {
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    margin: 0.2rem auto 0.9rem;
    border-radius: 50%;
    background: conic-gradient(#7c3aed calc(var(--a) * 1%), #14b8a6 0);
}
.report-donut > div { display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; background: var(--surface); text-align: center; }
.report-donut strong { font-size: 1.35rem; letter-spacing: -0.03em; line-height: 1; }
.report-donut small { color: var(--muted); font-size: 0.72rem; font-weight: 700; }

.report-rank { display: flex; gap: 0.7rem; padding: 0.5rem 0; border-top: 1px solid var(--line-soft); }
.report-rank:first-of-type { border-top: 0; }
.report-rank-no { display: grid; place-items: center; flex: 0 0 24px; height: 24px; border-radius: 8px; background: var(--violet-soft); color: var(--violet-ink); font-size: 0.74rem; font-weight: 800; }
.report-rank-body { flex: 1; min-width: 0; }
.report-rank-body p { display: flex; justify-content: space-between; gap: 0.6rem; margin: 0 0 0.3rem; font-size: 0.86rem; }
.report-rank-body p strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-rank-body p span { font-weight: 800; font-variant-numeric: tabular-nums; }
.report-rank-body small { color: var(--faint); font-size: 0.72rem; font-weight: 600; }
.report-meter { height: 6px; overflow: hidden; margin-bottom: 0.25rem; border-radius: 999px; background: var(--soft); }
.report-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #a78bfa, #7c3aed); }
.report-meter.is-violet span { background: linear-gradient(90deg, #f0abfc, #c026d3); }
.report-meter.is-teal span { background: linear-gradient(90deg, #5eead4, #0d9488); }
.report-meter.is-good span { background: linear-gradient(90deg, #6ee7b7, #059669); }
.report-meter.is-warn span { background: linear-gradient(90deg, #fcd34d, #d97706); }
.report-meter.is-inline { width: 110px; margin: 0 0 0.2rem; }
.report-alerts { display: grid; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.report-alerts li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.84rem; font-weight: 600; }
.report-alerts small { color: var(--faint); font-size: 0.72rem; }

.report-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-table tfoot th { padding: 0.7rem 0.85rem; border-top: 2px solid var(--line); color: var(--ink); font-size: 0.82rem; letter-spacing: 0; text-transform: none; }
.report-person { display: flex; align-items: center; gap: 0.6rem; }
.report-person .member-avatar { width: 34px; height: 34px; font-size: 0.74rem; }
.report-person small { display: block; color: var(--muted); font-size: 0.72rem; }

.report-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.report-mini.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report-mini > div { display: grid; gap: 0.1rem; padding: 0.7rem; border-radius: 12px; background: var(--violet-softer); }
.report-mini strong { font-size: 1.15rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.report-mini small { color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.report-clients { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.2rem 1.2rem; margin: 0; padding: 0; list-style: none; }
.report-clients li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-top: 1px solid var(--line-soft); }
.report-client-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--violet-soft), var(--rose-soft)); color: var(--violet-ink); font-size: 0.78rem; font-weight: 800; }

.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 0.45rem; border-radius: 50%; background: #9ca3af; vertical-align: 1px; }
.status-dot[data-status="completed"], .status-meter[data-status="completed"] span { background: #059669; }
.status-dot[data-status="booked"], .status-meter[data-status="booked"] span { background: #6366f1; }
.status-dot[data-status="confirmed"], .status-meter[data-status="confirmed"] span { background: #3b82f6; }
.status-dot[data-status="arrived"], .status-meter[data-status="arrived"] span { background: #f59e0b; }
.status-dot[data-status="in_service"], .status-meter[data-status="in_service"] span { background: #14b8a6; }
.status-dot[data-status="cancelled"], .status-meter[data-status="cancelled"] span { background: #9ca3af; }
.status-dot[data-status="no_show"], .status-meter[data-status="no_show"] span { background: #e11d48; }

.report-heat-wrap { overflow-x: auto; }
.report-heat td.is-hot { color: white; }
.report-heat { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.report-heat th { color: var(--faint); font-size: 0.64rem; font-weight: 700; text-align: center; }
.report-heat tbody th { width: 38px; text-align: left; color: var(--muted); font-size: 0.72rem; }
.report-heat td {
    height: 30px;
    min-width: 26px;
    border-radius: 6px;
    background: color-mix(in srgb, #7c3aed calc(var(--heat) * 100%), var(--violet-soft));
    color: var(--violet-ink);
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
}

@media (max-width: 1180px) {
    .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-wide { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .report-grid, .report-clients { grid-template-columns: 1fr; }
    .report-kpi.is-lead { grid-column: 1 / -1; }
    .report-scope { margin-left: 0; padding-left: 0; border-left: 0; }
    .report-chart { height: 170px; }
}
@media print {
    .report-jump, .report-filters { display: none !important; }
    .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-card, .report-kpi { break-inside: avoid; box-shadow: none; }
}

@media (max-width: 640px) {
    .page-head.is-bar { gap: 0.6rem; }
    .page-head.is-bar .page-icon { display: none; }
    .page-head.is-bar h1 { font-size: 1.12rem; }
    .page-tools { width: 100%; justify-content: space-between; }
    .page-head.is-bar .page-actions { order: 2; padding-right: 0; border-right: 0; }
    .head-location { max-width: 100%; flex: 1 1 100%; order: 1; }
}
@media print {
    .page-head.is-bar { position: static; margin: 0 0 1rem; padding: 0; border: 0; background: none; backdrop-filter: none; box-shadow: none; }
    .head-location, .page-icon { display: none !important; }
}

/* POS in dark mode */
:root[data-theme="dark"] .pos-screen {
    background:
        radial-gradient(900px 420px at 0% -10%, rgba(124, 58, 237, 0.2), transparent 60%),
        radial-gradient(700px 380px at 100% 0%, rgba(219, 39, 119, 0.12), transparent 55%),
        #0c0a12;
}
:root[data-theme="dark"] .pos-bar {
    background: linear-gradient(110deg, #1c0d36 0%, #4c1d95 55%, #831843 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.45);
}
:root[data-theme="dark"] .pos-mark { background: rgba(255, 255, 255, 0.12); color: white; }
:root[data-theme="dark"] .pos-bar .btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); }
:root[data-theme="dark"] .pos-bar .btn:hover { background: rgba(255, 255, 255, 0.18); color: white; }
:root[data-theme="dark"] .pos-location select { background: rgba(255, 255, 255, 0.1); color: white; }
:root[data-theme="dark"] .pos-location select option { background: #17141f; color: var(--ink); }

:root[data-theme="dark"] .pos-search,
:root[data-theme="dark"] .pos-ticket .field input,
:root[data-theme="dark"] .pos-ticket .field select,
:root[data-theme="dark"] .pos-line select,
:root[data-theme="dark"] .pos-discount-value { background: #13101b; border-color: #2e2940; box-shadow: none; }
:root[data-theme="dark"] .pos-search:focus,
:root[data-theme="dark"] .pos-ticket .field input:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2); }

:root[data-theme="dark"] .pos-tabs { background: #16131f; border-color: #2a2537; }
:root[data-theme="dark"] .pos-tabs button.is-on { background: #262036; color: white; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
:root[data-theme="dark"] .pos-tabs button span { background: rgba(167, 139, 250, 0.16); color: #c4b5fd; }
:root[data-theme="dark"] .pos-tabs button.is-on span { background: #7c3aed; color: white; }

:root[data-theme="dark"] .pos-group h2 { color: var(--ink-3); }
:root[data-theme="dark"] .pos-group h2::before { box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 22%, transparent); }
:root[data-theme="dark"] .pos-tile {
    background: #1a1624;
    box-shadow: inset 0 0 0 1px #2a2537;
}
:root[data-theme="dark"] .pos-tile:hover,
:root[data-theme="dark"] .pos-tile:focus-visible {
    background: #201b2d;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 55%, transparent), 0 10px 26px rgba(0, 0, 0, 0.45), 0 0 18px color-mix(in srgb, var(--tone) 18%, transparent);
}
:root[data-theme="dark"] .pos-tile.is-added {
    background: color-mix(in srgb, var(--tone) 16%, #1a1624);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 60%, transparent);
}
:root[data-theme="dark"] .pos-tile-price { color: color-mix(in srgb, var(--tone) 70%, white); }
:root[data-theme="dark"] .pos-tile.is-unavailable { background: #14111c; opacity: 0.55; }
:root[data-theme="dark"] .pos-tile.is-unavailable small { color: var(--warn); }
:root[data-theme="dark"] .pos-tile .service-photo img,
:root[data-theme="dark"] .line-thumb img { filter: brightness(0.92) saturate(1.05); }

:root[data-theme="dark"] .pos-ticket {
    background: #15121d;
    border-color: #2a2537;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
:root[data-theme="dark"] .ticket-card,
:root[data-theme="dark"] .pos-foot { background: #1b1726; border-color: #2a2537; }
:root[data-theme="dark"] .ticket-reset { background: transparent; border-color: #3a3350; }
:root[data-theme="dark"] .ticket-reset:hover { background: rgba(167, 139, 250, 0.12); border-color: #a78bfa; }
:root[data-theme="dark"] .pos-line { border-bottom-color: #2a2537; }
:root[data-theme="dark"] .line-price { color: #ede9fe; }
:root[data-theme="dark"] .pos-ticket .line-stylist select { background: #13101b; border-color: #2e2940; }
:root[data-theme="dark"] .line-qty { background: #13101b; border-color: #2e2940; }
:root[data-theme="dark"] .line-qty button:disabled { color: #4a4360; }
:root[data-theme="dark"] .pos-empty { border-color: #3a3350; color: var(--muted); }
:root[data-theme="dark"] .pos-empty strong { color: var(--ink-2); }

:root[data-theme="dark"] .pos-methods span { background: #13101b; border-color: #2e2940; color: var(--ink-3); }
:root[data-theme="dark"] .pos-methods input:checked + .pay-cash { background: rgba(16, 185, 129, 0.18); border-color: #10b981; color: #6ee7b7; }
:root[data-theme="dark"] .pos-methods input:checked + .pay-card { background: rgba(59, 130, 246, 0.18); border-color: #3b82f6; color: #93c5fd; }
:root[data-theme="dark"] .pos-methods input:checked + .pay-upi { background: rgba(139, 92, 246, 0.2); border-color: #8b5cf6; color: #c4b5fd; }

:root[data-theme="dark"] .pos-discount-kind { background: #13101b; border-color: #2e2940; }
:root[data-theme="dark"] .pos-discount-kind input:checked + span { background: #2a1f33; color: #f9a8d4; box-shadow: none; }
:root[data-theme="dark"] .pos-discount-quick button { background: transparent; border-color: #3a3350; color: #f9a8d4; }
:root[data-theme="dark"] .pos-discount-quick button.is-on { background: #db2777; border-color: #db2777; color: white; }
:root[data-theme="dark"] .ticket-totals .is-discount dd { color: #f9a8d4; }

:root[data-theme="dark"] .ticket-checkout {
    background: linear-gradient(135deg, #3b0f73, #9d174d);
    box-shadow: 0 10px 28px rgba(157, 23, 77, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
:root[data-theme="dark"] .btn.btn-primary.pos-pay { background: #ffffff; color: #4c1d95; }
:root[data-theme="dark"] .btn.btn-primary.pos-pay:hover { background: #f3e8ff; color: #3b0764; }
:root[data-theme="dark"] .btn.btn-primary.pos-pay:disabled { background: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.6); }

:root[data-theme="dark"] .pos-matches { background: #1b1726; border-color: #2e2940; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); }
:root[data-theme="dark"] .pos-matches button:hover,
:root[data-theme="dark"] .pos-matches button:focus-visible { background: rgba(167, 139, 250, 0.12); }
:root[data-theme="dark"] .pos-customer-note.is-known { color: var(--good); }
:root[data-theme="dark"] .pos-customer-note.is-new { color: var(--warn); }

@media print {
    :root[data-theme="dark"] {
        --canvas: #ffffff; --surface: #ffffff; --surface-2: #f9fafb; --soft: #f3f4f6;
        --ink: #111827; --ink-2: #374151; --ink-3: #4b5563; --muted: #6b7280; --faint: #9ca3af;
        --line: #e5e7eb; --line-strong: #d1d5db; --line-soft: #f3f4f6;
        --violet-soft: #f5f3ff; --violet-softer: #faf7ff; --violet-line: #e9e1f4; --violet-ink: #6d28d9; --violet-deep: #3b1764;
        --rose-soft: #fff5f7; --rose-line: #fde2e8; --good-bg: #ecfdf5; --bad-bg: #fef2f2; --warn-bg: #fffbeb; --info-bg: #eff6ff;
        color-scheme: light;
    }
}

.dialog:has(.booking-editor) {
    width: min(980px, 100%);
    padding: 1.3rem 1.4rem 1.4rem;
    background: linear-gradient(180deg, var(--violet-softer), var(--surface) 180px);
}
.booking-editor { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 1rem; align-items: start; }
.booking-main { display: grid; gap: 0.75rem; min-width: 0; }
.booking-editor .editor-block { margin: 0; }
.booking-editor .editor-title { display: inline-flex; align-items: center; gap: 0.5rem; }
.booking-step {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: white;
    font-size: 0.72rem;
    letter-spacing: 0;
}
.booking-link { color: var(--violet-ink); font-size: 0.78rem; font-weight: 700; }
button.booking-link { padding: 0; border: 0; background: none; cursor: pointer; }
.ss-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden; clip: rect(0 0 0 0); border: 0 !important; opacity: 0; pointer-events: none; }
.ss { position: relative; }
.field .ss-input { padding-right: 2.4rem; font-weight: 600; text-overflow: ellipsis; }
.field .ss-input::placeholder { color: var(--faint); font-weight: 500; }
.ss-toggle { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--faint); cursor: pointer; }
.ss-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s; }
.ss.is-open .ss-toggle svg { transform: rotate(180deg); }
.ss-toggle:hover { background: var(--soft); color: var(--ink); }
.ss-list { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px; margin: 0; padding: 0.35rem; overflow-y: auto; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 18px 40px rgba(20, 12, 40, 0.18); }
.ss-group { padding: 0.55rem 0.6rem 0.25rem; color: var(--faint); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.ss-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem; border-radius: 8px; cursor: pointer; }
.ss-item.is-active { background: var(--violet-soft); }
.ss-item.is-selected .ss-text strong { color: var(--violet-ink); }
.ss-item.is-selected::after { content: ""; flex: none; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--violet-ink); }
.ss-text { display: grid; min-width: 0; line-height: 1.25; }
.ss-text strong { overflow: hidden; color: var(--ink); font-size: 0.86rem; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.ss-text small { overflow: hidden; color: var(--muted); font-size: 0.74rem; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.ss-avatar { flex: none; display: grid; place-items: center; width: 28px; height: 28px; overflow: hidden; border-radius: 50%; background: var(--member); color: white; font-size: 0.68rem; font-weight: 800; }
.ss-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ss-create { margin-top: 0.25rem; border: 1px dashed var(--violet-line); }
.ss-create .ss-text strong { color: var(--violet-ink); }
.ss-plus { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--violet-soft); color: var(--violet-ink); font-size: 1.1rem; font-weight: 800; }
.ss-empty { padding: 0.7rem 0.6rem; color: var(--muted); font-size: 0.82rem; }
.field.is-muted .ss-input { border-style: dashed; }
.new-client { margin-top: 0.75rem; padding: 0.85rem; border: 1px solid var(--violet-line); border-radius: 12px; background: var(--violet-softer); }
.new-client[hidden] { display: none; }
.new-client-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.6rem; }
.new-client-head strong { color: var(--violet-deep); font-size: 0.85rem; }
.new-client .field { margin-bottom: 0.55rem; }
.new-client .field:last-child { margin-bottom: 0; }
.booking-editor .location-chips { margin-top: 0.55rem; }
.booking-alert { margin: 0.6rem 0 0; padding: 0.55rem 0.75rem; border: 1px solid var(--rose-line); border-radius: 10px; background: var(--rose-soft); color: var(--bad); font-size: 0.82rem; font-weight: 600; }
.booking-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
.booking-source { position: relative; cursor: pointer; }
.booking-source input { position: absolute; opacity: 0; pointer-events: none; }
.booking-source span {
    display: grid;
    place-items: center;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-3);
    font-size: 0.82rem;
    font-weight: 700;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.booking-source:hover span { border-color: #a78bfa; }
.booking-source input:checked + span { border-color: #7c3aed; background: var(--violet-soft); color: var(--violet-ink); box-shadow: inset 0 0 0 1px #7c3aed; }
.booking-source input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.booking-summary {
    position: sticky;
    top: 0;
    display: grid;
    overflow: hidden;
    border: 1px solid var(--violet-line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 16px 40px rgba(76, 29, 149, 0.1);
}
.booking-photo {
    position: relative;
    display: grid;
    place-items: center;
    height: 132px;
    background: radial-gradient(220px 120px at 100% 0%, rgba(236, 72, 153, 0.45), transparent 70%), linear-gradient(135deg, #2e1065, #6d28d9 65%, #be185d);
    color: rgba(255, 255, 255, 0.85);
}
.booking-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.booking-photo.has-image .booking-photo-empty { display: none; }
.booking-photo-empty svg { width: 38px; height: 38px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.booking-summary-body { padding: 0.95rem 1rem 0.4rem; }
.booking-summary-kicker { margin: 0; color: var(--violet-ink); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.booking-summary h3 { margin: 0.1rem 0 0.7rem; font-size: 1.12rem; letter-spacing: -0.02em; }
.booking-facts { display: grid; gap: 0.05rem; margin: 0; padding: 0; list-style: none; }
.booking-facts li { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.42rem 0; border-top: 1px dashed var(--line); font-size: 0.83rem; }
.booking-facts li:first-child { border-top: 0; }
.booking-facts span { color: var(--muted); }
.booking-facts strong { min-width: 0; overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.booking-stylist { display: inline-flex; align-items: center; gap: 0.4rem; }
.booking-avatar {
    display: inline-grid;
    place-items: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--member);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
}
.booking-avatar img { width: 100%; height: 100%; object-fit: cover; }
.booking-allergy { margin: 0.5rem 0 0; padding: 0.45rem 0.6rem; border-radius: 9px; background: var(--warn-bg); color: var(--warn); font-size: 0.78rem; font-weight: 700; }
.booking-bill { display: grid; gap: 0.25rem; margin: 0.8rem 0 0; padding: 0.7rem 0.8rem; border-radius: 12px; background: var(--violet-softer); }
.booking-bill div { display: flex; justify-content: space-between; font-size: 0.82rem; }
.booking-bill dt { color: var(--muted); }
.booking-bill dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.booking-bill .booking-total { margin-top: 0.2rem; padding-top: 0.4rem; border-top: 1px solid var(--violet-line); font-size: 0.95rem; }
.booking-bill .booking-total dt { color: var(--ink); font-weight: 800; }
.booking-bill .booking-total dd { color: var(--violet-ink); font-size: 1.1rem; font-weight: 800; }
.booking-submit {
    margin: 0.8rem 1rem 0;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: white;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(124, 58, 237, 0.28);
}
.booking-submit:hover { background: linear-gradient(135deg, #6d28d9, #be185d); filter: none; }
.booking-hours { margin: 0.55rem 1rem 0.85rem; color: var(--faint); font-size: 0.72rem; text-align: center; }
@media (max-width: 860px) {
    .booking-editor { grid-template-columns: 1fr; }
    .booking-summary { position: static; }
}
@media (max-width: 520px) {
    .booking-sources { grid-template-columns: 1fr; }
}

/* Today's schedule */
.agenda-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.agenda-head h2 { margin: 0; }
.agenda-sub { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.82rem; }
.agenda-progress { flex: 0 1 220px; height: 8px; overflow: hidden; border-radius: 999px; background: var(--soft); }
.agenda-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8b5cf6, #14b8a6); transition: width 0.3s; }
.agenda-tabs { display: flex; gap: 0.35rem; margin-bottom: 0.9rem; padding-bottom: 0.1rem; overflow-x: auto; scrollbar-width: none; }
.agenda-tab { display: inline-flex; align-items: center; gap: 0.4rem; flex: none; padding: 0.38rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: 0.8rem; font-weight: 650; }
.agenda-tab span { min-width: 1.35rem; padding: 0.05rem 0.4rem; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 0.7rem; font-weight: 800; text-align: center; }
.agenda-tab:hover { border-color: var(--violet-line); color: var(--violet-ink); text-decoration: none; }
.agenda-tab.is-on { border-color: var(--solid); background: var(--solid); color: var(--surface); }
.agenda-tab.is-on span { background: rgba(255, 255, 255, 0.2); color: inherit; }
.agenda-empty { margin: 0; padding: 1.5rem 0; color: var(--muted); text-align: center; }
.agenda-list { position: relative; display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.agenda-list::before { content: ""; position: absolute; top: 0.6rem; bottom: 0.6rem; left: 81px; width: 2px; border-radius: 2px; background: var(--line-soft); }
.agenda-item { position: relative; display: grid; grid-template-columns: 64px 36px minmax(0, 1fr); align-items: start; }
.agenda-time { padding-top: 0.75rem; text-align: right; }
.agenda-time strong { display: block; color: var(--ink); font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.agenda-time small { margin-left: 0.15rem; color: var(--muted); font-size: 0.66rem; font-weight: 700; }
.agenda-time span { color: var(--faint); font-size: 0.72rem; font-weight: 600; }
.agenda-dot { position: relative; z-index: 1; justify-self: center; width: 12px; height: 12px; margin-top: 1.05rem; border: 3px solid var(--surface); border-radius: 50%; background: #9ca3af; box-shadow: 0 0 0 1px var(--line); }
.agenda-item[data-status="booked"] .agenda-dot { background: #6366f1; }
.agenda-item[data-status="confirmed"] .agenda-dot { background: #3b82f6; }
.agenda-item[data-status="arrived"] .agenda-dot { background: #f59e0b; }
.agenda-item[data-status="in_service"] .agenda-dot { background: #14b8a6; box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.22); animation: agenda-pulse 1.8s ease-in-out infinite; }
.agenda-item[data-status="completed"] .agenda-dot { background: #059669; }
.agenda-item[data-status="no_show"] .agenda-dot { background: #e11d48; }
@keyframes agenda-pulse { 50% { box-shadow: 0 0 0 7px rgba(20, 184, 166, 0.08); } }
.agenda-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.85rem; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.agenda-card:hover { border-color: var(--violet-line); box-shadow: 0 8px 24px rgba(40, 20, 80, 0.08); }
.agenda-item[data-status="booked"] .agenda-card { border-left-color: #6366f1; }
.agenda-item[data-status="confirmed"] .agenda-card { border-left-color: #3b82f6; }
.agenda-item[data-status="arrived"] .agenda-card { border-left-color: #f59e0b; }
.agenda-item[data-status="in_service"] .agenda-card { border-color: rgba(20, 184, 166, 0.45); border-left-color: #14b8a6; background: linear-gradient(90deg, var(--teal-soft), var(--surface) 55%); }
.agenda-item[data-status="completed"] .agenda-card { border-left-color: #059669; }
.agenda-item[data-status="completed"] .agenda-time strong,
.agenda-item[data-status="cancelled"] .agenda-time strong,
.agenda-item[data-status="no_show"] .agenda-time strong { color: var(--muted); }
.agenda-item[data-status="cancelled"] .agenda-card,
.agenda-item[data-status="no_show"] .agenda-card { border-left-color: #e11d48; background: var(--surface-2); opacity: 0.72; }
.agenda-item[data-status="cancelled"] .agenda-service,
.agenda-item[data-status="no_show"] .agenda-service { text-decoration: line-through; }
.agenda-card .agenda-photo { width: 46px; height: 46px; border-radius: 10px; }
.agenda-body { display: grid; gap: 0.15rem; min-width: 0; }
.agenda-line { display: flex; align-items: center; gap: 0.45rem; min-width: 0; }
.agenda-client { overflow: hidden; color: var(--ink); font-size: 0.95rem; font-weight: 750; white-space: nowrap; text-overflow: ellipsis; }
.agenda-client:hover { color: var(--violet-ink); }
.agenda-flag { flex: none; padding: 0.08rem 0.45rem; border: 1px solid var(--rose-line); border-radius: 999px; background: var(--rose-soft); color: #be123c; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; cursor: help; }
.agenda-service { margin: 0; overflow: hidden; color: var(--ink-2); font-size: 0.84rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.agenda-service span { margin-left: 0.3rem; color: var(--muted); font-weight: 500; }
.agenda-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; margin-top: 0.2rem; color: var(--muted); font-size: 0.76rem; }
.agenda-stylist { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ink-2); font-weight: 600; }
.agenda-avatar { display: inline-grid; place-items: center; width: 20px; height: 20px; overflow: hidden; border-radius: 50%; background: var(--member); color: white; font-size: 0.56rem; font-weight: 800; }
.agenda-avatar img { width: 100%; height: 100%; object-fit: cover; }
.agenda-phone { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--muted); }
.agenda-phone:hover { color: var(--violet-ink); }
.agenda-phone svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.agenda-side { display: grid; justify-items: end; gap: 0.35rem; }
.agenda-hint { font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.agenda-hint.is-muted { color: var(--muted); }
.agenda-hint.is-soon { color: var(--violet-ink); }
.agenda-hint.is-warn { color: #c2410c; }
.agenda-hint.is-live { color: #0f766e; }
.agenda-hint.is-good { color: var(--good); }
.agenda-actions { display: flex; gap: 0.3rem; }
.agenda-actions form { margin: 0; }
.agenda-now { position: relative; display: grid; grid-template-columns: 64px 36px minmax(0, 1fr); align-items: center; height: 18px; }
.agenda-now::before { content: ""; grid-column: 2; justify-self: center; z-index: 1; width: 10px; height: 10px; border-radius: 50%; background: #e11d48; box-shadow: 0 0 0 3px var(--rose-soft); }
.agenda-now::after { content: ""; position: absolute; left: 82px; right: 0; top: 50%; border-top: 2px dashed rgba(225, 29, 72, 0.55); }
.agenda-now span { grid-column: 1; grid-row: 1; justify-self: end; color: #e11d48; font-size: 0.68rem; font-weight: 800; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.03em; }
:root[data-theme="dark"] .agenda-hint.is-warn { color: #fdba74; }
:root[data-theme="dark"] .agenda-hint.is-live { color: #5eead4; }
:root[data-theme="dark"] .agenda-flag { color: #fda4af; }
:root[data-theme="dark"] .agenda-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
@media (max-width: 720px) {
    .agenda-head { flex-direction: column; align-items: stretch; }
    .agenda-progress { flex-basis: auto; }
    .agenda-list::before { left: 61px; }
    .agenda-item, .agenda-now { grid-template-columns: 48px 28px minmax(0, 1fr); }
    .agenda-now::after { left: 62px; }
    .agenda-time strong { font-size: 0.9rem; }
    .agenda-card { grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
    .agenda-card .agenda-photo { display: none; }
    .agenda-side { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
    .agenda-actions { margin-left: auto; }
    .agenda-service span { display: block; margin: 0; }
}

/* Visit with several services */
.visit-services { margin: 0.9rem 0; padding: 0.75rem 0.85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.visit-services h3 { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.visit-services ol { display: grid; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.visit-services li { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; padding: 0.4rem 0.5rem; border-radius: 8px; }
.visit-services li.is-current { background: var(--violet-soft); }
.visit-services-time { color: var(--ink-2); font-size: 0.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.visit-services-name { display: grid; min-width: 0; }
.visit-services-name small { color: var(--muted); font-size: 0.74rem; }

/* Several services in one booking */
.service-rows { display: grid; gap: 0.6rem; }
.service-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: start; gap: 0.7rem; padding: 0.7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.service-row-num { display: grid; place-items: center; width: 26px; height: 26px; margin-top: 1.55rem; border-radius: 50%; background: var(--violet-soft); color: var(--violet-ink); font-size: 0.75rem; font-weight: 800; }
.service-row-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0.6rem; }
.service-row-fields .field { margin: 0; }
.service-row-side { display: grid; justify-items: end; gap: 0.35rem; min-width: 84px; padding-top: 1.55rem; }
.service-row-time { color: var(--muted); font-size: 0.74rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.service-row-remove { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--rose-line); border-radius: 8px; background: var(--rose-soft); color: #be123c; cursor: pointer; }
.service-row-remove[hidden] { display: none; }
.service-row-remove:hover { border-color: #e11d48; background: #e11d48; color: white; }
.service-row-remove svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.booking-add { display: flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%; margin-top: 0.6rem; padding: 0.6rem; border: 1.5px dashed var(--violet-line); border-radius: 12px; background: transparent; color: var(--violet-ink); font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.booking-add span { font-size: 1.1rem; line-height: 1; }
.booking-add:hover { border-style: solid; background: var(--violet-softer); }
.booking-hint { margin: 0.45rem 0 0; color: var(--faint); font-size: 0.74rem; }
.booking-count { color: var(--violet-ink); font-size: 0.76rem; font-weight: 700; }
.booking-lines { display: grid; gap: 0.35rem; margin: -0.3rem 0 0.7rem; padding: 0; list-style: none; counter-reset: line; }
.booking-lines[hidden] { display: none; }
.booking-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.5rem; padding: 0.4rem 0.55rem; border-radius: 8px; background: var(--soft); counter-increment: line; }
.booking-lines span { overflow: hidden; font-size: 0.82rem; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.booking-lines span::before { content: counter(line) ". "; color: var(--violet-ink); font-weight: 800; }
.booking-lines strong { font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.booking-lines small { grid-column: 1 / -1; color: var(--muted); font-size: 0.72rem; }
@media (max-width: 720px) {
    .service-row { grid-template-columns: minmax(0, 1fr) auto; }
    .service-row-num { display: none; }
    .service-row-fields { grid-template-columns: minmax(0, 1fr); }
    .service-row-side { min-width: 0; padding-top: 1.55rem; }
}

/* Online booking links */
.online-switch { margin: 0; }
.share-links { display: grid; gap: 0.5rem; }
.share-link { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto auto; align-items: center; gap: 0.5rem; padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.share-link > span { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.share-link code { overflow: hidden; color: var(--ink-2); font-size: 0.78rem; white-space: nowrap; text-overflow: ellipsis; }
.share-link .act:only-of-type { grid-column: span 2; }
.share-hint { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.78rem; }
@media (max-width: 720px) {
    .share-link { grid-template-columns: minmax(0, 1fr) auto auto; }
    .share-link > span { grid-column: 1 / -1; }
}

/* Google Business */
.google-connect-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; }
.google-connect-head h2 { margin: 0; }
.google-connect-head p { margin: 0.15rem 0 0; }
.google-connect-head > div:nth-child(2) { flex: 1 1 260px; }
.google-logo { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.google-logo svg { width: 26px; height: 26px; }
.google-connect-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.google-connect-actions form { margin: 0; }
.google-setup { display: grid; gap: 0.6rem; margin: 1rem 0 0; padding: 0.9rem 1rem 0.9rem 2.2rem; border: 1px dashed var(--violet-line); border-radius: 12px; background: var(--violet-softer); color: var(--ink-2); font-size: 0.86rem; }
.google-setup strong { color: var(--ink); }
.google-uri { display: flex !important; margin-top: 0.35rem; }
.google-uri code { flex: 1; }
.google-salons { display: grid; gap: 0.6rem; }
.google-salon { display: grid; grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1.4fr) auto; align-items: center; gap: 0.9rem; padding: 0.8rem 0.9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.google-salon-main { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.google-salon-main h3 { margin: 0; font-size: 0.95rem; }
.google-salon-main p { margin: 0; font-size: 0.74rem; }
.google-salon-mark { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--violet-soft); color: var(--violet-ink); font-weight: 800; }
.google-salon-link { display: grid; gap: 0.2rem; min-width: 0; font-size: 0.84rem; }
.google-linked { display: inline-flex; align-items: center; gap: 0.4rem; }
.google-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18); }
.google-rating-mini { color: #b45309; font-size: 0.76rem; font-weight: 700; }
.google-sync-note { color: var(--muted); font-size: 0.74rem; }
.google-sync-note.is-stale { color: #c2410c; font-weight: 700; }
.google-link-form { display: flex; gap: 0.4rem; margin: 0; }
.google-link-form .ss { flex: 1; min-width: 0; }
.google-link-form .ss-input { width: 100%; height: 38px; padding: 0 2.4rem 0 0.75rem; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.google-salon-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.3rem; }
.google-salon-actions form { margin: 0; }
.google-score { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.5rem; margin-bottom: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.google-score-big { display: grid; justify-items: center; }
.google-score-big strong { font-size: 2.4rem; line-height: 1; letter-spacing: -0.04em; }
.google-score-big small, .google-score-side small { color: var(--muted); font-size: 0.74rem; }
.google-stars { color: #f59e0b; letter-spacing: 0.08em; }
.google-bars { display: grid; gap: 0.25rem; }
.google-bar { display: grid; grid-template-columns: 28px minmax(0, 1fr) 32px; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.76rem; font-weight: 700; }
.google-bar-track { height: 8px; overflow: hidden; border-radius: 999px; background: var(--soft); }
.google-bar-track span { display: block; height: 100%; border-radius: inherit; background: #f59e0b; }
.google-score-side { display: grid; justify-items: center; padding-left: 1.2rem; border-left: 1px solid var(--line); }
.google-score-side strong { font-size: 1.6rem; color: var(--violet-ink); }
.google-reviews { display: grid; gap: 0.6rem; }
.google-review { padding: 0.85rem 0.95rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.google-review.is-low { border-left: 3px solid #f59e0b; }
.google-review header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; }
.google-review header strong { display: block; font-size: 0.9rem; }
.google-review time { color: var(--muted); font-size: 0.74rem; }
.google-avatar { display: grid; place-items: center; width: 36px; height: 36px; overflow: hidden; border-radius: 50%; background: var(--violet-soft); color: var(--violet-ink); font-weight: 800; }
.google-avatar img { width: 100%; height: 100%; object-fit: cover; }
.google-comment { margin: 0.55rem 0 0; font-size: 0.88rem; line-height: 1.5; white-space: pre-line; }
.google-reply { margin-top: 0.7rem; padding: 0.6rem 0.75rem; border-left: 3px solid var(--violet-line); border-radius: 0 10px 10px 0; background: var(--violet-softer); }
.google-reply span { color: var(--violet-ink); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.google-reply p { margin: 0.25rem 0 0.5rem; font-size: 0.86rem; }
.google-reply form { margin: 0; }
.google-reply-form { display: grid; gap: 0.45rem; margin: 0.7rem 0 0; }
.google-reply-form textarea { width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; resize: vertical; }
.google-reply-form textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.google-reply-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.google-reply-tools .btn { margin-left: auto; }
@media (max-width: 860px) {
    .google-salon { grid-template-columns: minmax(0, 1fr); }
    .google-salon-actions { justify-content: flex-start; }
    .google-score { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; }
    .google-score-side { padding: 0.6rem 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Google setup guide */
.google-guide { margin-top: 1rem; border: 1px solid var(--violet-line); border-radius: 14px; background: var(--violet-softer); }
.google-guide summary { display: grid; gap: 0.1rem; padding: 0.85rem 1rem; list-style: none; cursor: pointer; }
.google-guide summary::-webkit-details-marker { display: none; }
.google-guide summary span { display: flex; align-items: center; justify-content: space-between; color: var(--violet-deep); font-weight: 800; }
.google-guide summary span::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.2s; }
.google-guide[open] summary span::after { transform: rotate(-135deg); }
.google-guide summary small { color: var(--muted); font-size: 0.78rem; }
.google-steps { display: grid; gap: 0.5rem; margin: 0; padding: 0 0.8rem 0.9rem; list-style: none; }
.google-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0.7rem; padding: 0.75rem 0.8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.google-step-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--violet-soft); color: var(--violet-ink); font-size: 0.78rem; font-weight: 800; }
.google-steps li.is-done .google-step-num { background: #16a34a; color: white; }
.google-step-body strong { font-size: 0.9rem; }
.google-step-body p { margin: 0.2rem 0 0.5rem; color: var(--ink-2); font-size: 0.83rem; line-height: 1.45; }
.google-step-links { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.google-step-link { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.7rem; border: 1px solid var(--violet-line); border-radius: 999px; background: var(--surface); color: var(--violet-ink); font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.google-step-link:hover { border-color: #7c3aed; background: var(--violet-soft); text-decoration: none; }
.google-step-link svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.google-step-link.is-solid { border-color: #7c3aed; background: #7c3aed; color: white; }
.google-step-link.is-solid:hover { background: #6d28d9; }
.google-code { margin: 0 0 0.5rem; padding: 0.6rem 0.75rem; overflow-x: auto; border-radius: 10px; background: #1e1b2e; color: #e9d5ff; font-size: 0.78rem; line-height: 1.5; }
.google-uri { margin: 0 0 0.5rem; }
.google-quick { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.7rem; margin-top: 0.9rem; padding: 0.8rem 0.95rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.google-quick strong { font-size: 0.88rem; }
.google-quick p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.8rem; }
@media (max-width: 720px) {
    .google-steps { padding: 0 0.5rem 0.6rem; }
    .google-steps li { grid-template-columns: minmax(0, 1fr); }
}

.home-top { display: grid; gap: 0.75rem; }
.home-search {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.4rem 0.4rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.home-search:focus-within { border-color: #a78bfa; box-shadow: 0 0 0 3px var(--violet-soft); }
.home-search > svg { flex: none; width: 19px; height: 19px; stroke: var(--muted); fill: none; stroke-width: 1.9; stroke-linecap: round; }
.home-search input { flex: 1; min-width: 0; height: 40px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 0.95rem; outline: none; }
.home-search .btn { flex: none; }

.home-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.65rem; }
.home-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--violet-line);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--violet-softer), var(--surface));
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.home-action:hover { transform: translateY(-1px); border-color: #a78bfa; box-shadow: 0 10px 24px rgba(109, 40, 217, 0.1); }
.home-action:first-child { border-color: transparent; background: linear-gradient(135deg, #7c3aed, #a855f7); color: white; }
.home-action:first-child:hover { color: white; }
.home-action-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--violet-soft);
    color: var(--violet-ink);
}
.home-action:first-child .home-action-icon { background: rgba(255, 255, 255, 0.2); color: white; }
.home-action svg, .home-tile svg, .home-link h2 svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-action-text { display: grid; flex: 1; min-width: 0; }
.home-action-text strong { font-size: 0.92rem; }
.home-action-text small { overflow: hidden; color: var(--muted); font-size: 0.76rem; white-space: nowrap; text-overflow: ellipsis; }
.home-action:first-child small { color: rgba(255, 255, 255, 0.82); }
.home-action-plus { display: grid; flex: none; place-items: center; color: var(--muted); }
.home-action-plus svg { width: 18px; height: 18px; }
.home-action:first-child .home-action-plus { color: white; }

.home-glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.65rem; margin-top: 0.85rem; }
.home-stat {
    display: grid;
    gap: 0.15rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--ink);
    text-decoration: none;
}
.home-stat:hover { border-color: #a78bfa; color: var(--ink); }
.home-stat span { color: var(--muted); font-size: 0.76rem; font-weight: 600; }
.home-stat strong { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; margin-top: 1rem; }
.home-groups { display: grid; gap: 1rem; min-width: 0; }
.home-group h2 { margin: 0 0 0.55rem; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.home-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.65rem; }
.home-tile {
    position: relative;
    display: grid;
    align-content: start;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.home-tile:hover { transform: translateY(-1px); border-color: #a78bfa; color: var(--ink); }
.home-tile-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 0.45rem;
    border-radius: 12px;
    background: var(--violet-soft);
    color: var(--violet-ink);
}
.home-tile strong { font-size: 0.92rem; }
.home-tile small { color: var(--muted); font-size: 0.76rem; line-height: 1.35; }
.home-tile-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: var(--canvas);
    color: var(--ink-2);
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.home-side { display: grid; gap: 0.85rem; min-width: 0; }
.home-side .panel { margin-top: 0; }
.home-next-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.home-next-head h2, .home-link h2 { margin: 0; font-size: 0.98rem; }
.home-next-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0;
    border-top: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}
.home-next-row:hover { color: var(--violet-ink); }
.home-next-row time { font-weight: 700; font-variant-numeric: tabular-nums; }
.home-next-row time small { margin-left: 0.15rem; color: var(--muted); font-size: 0.68rem; }
.home-next-row span { display: grid; min-width: 0; }
.home-next-row strong, .home-next-row span small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.home-next-row strong { font-size: 0.88rem; }
.home-next-row span small { color: var(--muted); font-size: 0.75rem; }
.home-next-status { padding: 0.12rem 0.5rem; border-radius: 999px; background: var(--canvas); color: var(--ink-2); font-size: 0.7rem; font-style: normal; font-weight: 700; }
.home-next-status.is-arrived, .home-next-status.is-in_service { background: var(--violet-soft); color: var(--violet-ink); }
.home-next-empty { margin: 0.4rem 0 0; font-size: 0.85rem; }
.home-link { display: grid; gap: 0.55rem; }
.home-link h2 { display: flex; align-items: center; gap: 0.45rem; }
.home-link p { margin: 0; font-size: 0.8rem; }
.home-link .share-link { grid-template-columns: minmax(0, 1fr) auto; }
.home-link > .act { justify-self: start; }

@media (max-width: 1100px) {
    .home-grid { grid-template-columns: minmax(0, 1fr); }
    .home-side { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
.web-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.9rem;
}
.web-tabs a {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 0.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}
.web-tabs a.active, .web-tabs a:hover { border-color: var(--violet-line); background: var(--violet-soft); color: var(--violet-ink); text-decoration: none; }
.web-tabs-settings { margin-left: auto; }
.web-tabs-view { margin-left: 0.35rem; }
.web-editor { max-width: 860px; }
.web-editor .web-status { grid-template-columns: minmax(0, 1fr); }
.web-status .share-link { grid-template-columns: minmax(0, 1fr) auto; margin-top: 0; }
.web-switches, .web-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.45rem; }
.web-header-choice { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin: 0 0 0.8rem; padding: 0; border: 0; }
.web-header-choice legend { width: 100%; margin-bottom: 0.15rem; padding: 0; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.web-header-bg { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: end; margin-bottom: 0.45rem; }
.web-header-color, .web-header-opacity { display: grid; gap: 0.35rem; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.web-header-color input { width: 52px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.web-header-opacity input { width: min(220px, 70vw); accent-color: var(--ink); }
.web-pick-group { display: grid; gap: 0.45rem; }
.web-pick-group h4 { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.web-pick {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
}
.web-pick input { margin-top: 0.2rem; accent-color: #7c3aed; }
.web-pick span { display: grid; min-width: 0; }
.web-pick strong { font-size: 0.86rem; }
.web-pick small { color: var(--muted); font-size: 0.74rem; }
.web-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.web-shot { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.web-shot img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--violet-soft); }
.web-shot-body { display: grid; gap: 0.45rem; padding: 0.75rem; }
.web-shot-body strong { font-size: 0.86rem; }
.form-actions { display: flex; justify-content: flex-end; }

@media (max-width: 640px) {
    .web-tabs-settings, .web-tabs-view { margin-left: 0; }
    .web-editor .web-status { grid-template-columns: 1fr; }
    .home-search { padding-left: 0.75rem; }
    .home-search .btn { padding-inline: 0.8rem; }
    .home-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
    .home-action { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 0.8rem; }
    .home-action-plus { display: none; }
    .home-action-text small { white-space: normal; }
    .home-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
    .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
    .home-tile { padding: 0.8rem; }
    .home-side { grid-template-columns: minmax(0, 1fr); }
}

.admin-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    background: #1c1c1c;
    color: #fff;
}
.admin-bar p { margin: 0; }
.admin-bar .btn { background: #fff; color: #1c1c1c; }
body.admin-app .form.panel { margin-top: 0; }
body.admin-app .home-search { margin-bottom: 1rem; }
@media (max-width: 980px) {
    body.admin-app .sidebar { display: flex; }
    body.admin-app .shell { grid-template-columns: 220px minmax(0, 1fr); }
    body.admin-app .main { padding-bottom: 1.1rem; }
}
