*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    /* "Noir & Gold": charcoal for actions, gold for highlights, warm off-white background. */
    --salon-ink: #1f1b18;
    --salon-ink-soft: #3a332d;
    --salon-gold: #c5a04a;
    --salon-gold-light: #e2c47a;
    --salon-gold-ink: #8a6a1f; /* gold that is readable as text on light backgrounds */
    --salon-accent: var(--salon-gold-ink);
    --salon-accent-soft: #f6efdc;
    --salon-bg: #faf8f4;
    --salon-surface: #ffffff;
    --salon-border: #e8e2d6;
    --salon-hover: #f3efe7;
    --salon-muted: #6f665c;
    --salon-danger: #b91c1c;
    --salon-success: #15803d;
    --salon-sidebar: #1f1b18;
    --salon-sidebar-text: #e9e2d5;
    --salon-sidebar-muted: #9a8f80;

    /* Syncfusion Fluent 2 theme colours (buttons, focus, selection, calendar). */
    --color-sf-primary: #1f1b18;
    --color-sf-primary-text-color: #fff;
    --color-sf-primary-light: #e9d9ae;
    --color-sf-primary-lighter: #f6efdc;
    --color-sf-primary-dark: #000;
    --color-sf-primary-darker: #000;
    --color-sf-primary-bg-color-hover: #3a332d;
    --color-sf-primary-bg-color-pressed: #000;
    --color-sf-primary-bg-color-selected: #000;
    --color-sf-utility-primary-lighter: #fbf7ec;
    --color-sf-content-bg-color-dragged: #f6efdc;
    --color-sf-brand-primary: #c5a04a;
}

html, body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--salon-bg);
    color: var(--salon-ink);
}

h1 { font-size: 1.6rem; margin: 0 0 12px; }
h2 { font-size: 1.15rem; margin: 24px 0 12px; }

.muted { color: var(--salon-muted); }

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--salon-gold-light), var(--salon-gold) 55%, var(--salon-gold-ink));
    color: var(--salon-ink);
    font-weight: 700;
    flex-shrink: 0;
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    flex-shrink: 0;
}

.page-loading { padding: 24px; color: var(--salon-muted); }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.card {
    background: var(--salon-surface);
    border: 1px solid var(--salon-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.card h2 { margin-top: 0; }

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    padding: 16px;
    background: var(--salon-surface);
    border: 1px solid var(--salon-border);
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
}

.tile:hover:not(.static) { border-color: var(--salon-accent); }
.tile.selected { border-color: var(--salon-accent); box-shadow: 0 0 0 1px var(--salon-accent); }
.tile.static { cursor: default; }
.tile-title { font-weight: 600; }
.tile-sub { color: var(--salon-muted); font-size: 0.9rem; }

.notice {
    padding: 12px 16px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.alert-error {
    padding: 10px 14px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--salon-danger);
    margin-bottom: 12px;
}

.badge { padding: 2px 8px; border-radius: 999px; font-size: 0.8rem; }
.badge-success { background: #dcfce7; color: var(--salon-success); }

.form-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

.form-grid {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 10px 12px;
    align-items: center;
}

.form-grid .inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

code.secret {
    display: inline-block;
    padding: 6px 10px;
    background: var(--salon-hover);
    border-radius: 6px;
    word-break: break-all;
    font-size: 0.95rem;
}

.recovery-codes ul {
    columns: 2;
    list-style: none;
    padding: 0;
}

/* Static account pages */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--salon-surface);
    border: 1px solid var(--salon-border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 20px; }
.auth-title { font-size: 1.35rem; }
.auth-form { display: flex; flex-direction: column; gap: 6px; }
.auth-form label { margin-top: 8px; font-weight: 500; }
.auth-form .check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.auth-form .e-input { padding: 8px 10px; border: 1px solid var(--salon-border); border-radius: 8px; font: inherit; }
.auth-submit { margin-top: 16px; padding: 10px; }
.auth-link { margin-top: 12px; text-align: center; color: var(--salon-muted); }
.validation-message { color: var(--salon-danger); font-size: 0.85rem; }

/* Filters & chips */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.chip {
    --chip: #8a6a1f;
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--chip);
    background: color-mix(in srgb, var(--chip) 12%, white);
    border: 1px solid color-mix(in srgb, var(--chip) 35%, white);
}
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch.selected { border-color: var(--salon-ink); box-shadow: 0 0 0 2px #fff inset; }
.strong-link { font-weight: 600; color: inherit; }
.back-link { display: inline-block; margin-bottom: 8px; color: var(--salon-muted); text-decoration: none; }
.small { font-size: 0.85rem; }
.stack { display: flex; flex-direction: column; gap: 6px; }
.badge-muted { background: var(--salon-hover); color: var(--salon-muted); font-size: 0.75rem; vertical-align: middle; }
.badge-celebrate { background: #fdf2f8; color: #be185d; font-size: 0.75rem; vertical-align: middle; }
.duplicates ul { margin: 6px 0; }

/* Customer card */
.customer-header { display: flex; flex-direction: column; gap: 16px; }
.customer-title { display: flex; gap: 16px; align-items: center; }
.customer-title h1 { margin: 0 0 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.avatar {
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--salon-accent-soft); color: var(--salon-accent); font-weight: 700; font-size: 1.2rem; flex-shrink: 0;
}
.contact { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.contact a { color: inherit; text-decoration: none; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--salon-bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.stat-label { font-size: 0.78rem; color: var(--salon-muted); }
.stat-value { font-weight: 600; font-size: 1.05rem; }
.pinned-notes { display: flex; flex-direction: column; gap: 6px; }
.pinned { padding: 8px 12px; border-radius: 8px; background: #eff6ff; border: 1px solid #bfdbfe; }
.pinned.warning { background: #fffbeb; border-color: #fde68a; }
.customer-tabs { margin-top: 8px; }
.tab-body { padding: 16px 0; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.card-header { display: flex; justify-content: space-between; align-items: center; }
.card-header h2 { margin: 0; }
.details { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 12px 0 0; }
.details dt { color: var(--salon-muted); }
.details dd { margin: 0; }
.consent-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.history { margin-top: 10px; }
.history ul { padding-left: 18px; margin: 8px 0 0; }
.note-editor .e-input-group { margin: 8px 0; }
.note-list { display: flex; flex-direction: column; gap: 10px; }
.note { background: var(--salon-surface); border: 1px solid var(--salon-border); border-left: 4px solid var(--salon-border); border-radius: 10px; padding: 10px 14px; }
.note.warning { border-left-color: #f59e0b; }
.note.restricted { border-left-color: #dc2626; background: #fffafa; }
.note header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.note p { margin: 6px 0 0; white-space: pre-wrap; }
.note-type { font-weight: 600; }
.note-actions { margin-left: auto; }
.timeline { list-style: none; padding: 0; margin: 0 0 12px; border-left: 2px solid var(--salon-border); }
.timeline-item { position: relative; padding: 0 0 14px 18px; display: flex; flex-direction: column; }
.timeline-item::before {
    content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--salon-surface); border: 2px solid var(--salon-accent);
}
.timeline-date { font-size: 0.8rem; color: var(--salon-muted); }
.timeline-title { font-weight: 600; }
.timeline-detail { color: #374151; }
.danger-zone { border-color: #fecaca; }

/* Catalog */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.category-block .card-header h2 { display: flex; align-items: center; gap: 8px; }
.simple-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.simple-table th { text-align: left; font-weight: 500; color: var(--salon-muted); font-size: 0.82rem; padding: 6px 8px; border-bottom: 1px solid var(--salon-border); }
.simple-table td { padding: 6px 8px; border-bottom: 1px solid var(--salon-hover); vertical-align: middle; }
.simple-table .num { text-align: right; }
.simple-table .actions { text-align: right; white-space: nowrap; }
.simple-table tr.inactive td, .tile.inactive, li.inactive { opacity: 0.55; }
.section-title { font-size: 1rem; margin: 18px 0 6px; }
.plain-list { list-style: none; padding: 0; margin: 0 0 12px; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--salon-hover); }
.staff-tile { text-decoration: none; color: inherit; }
.staff-avatar { width: 44px; height: 44px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 6px; }
.capability { border: 1px solid var(--salon-border); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.capability.enabled { border-color: var(--salon-accent); background: var(--salon-accent-soft); }
.capability-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.capability-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.capability-body label { color: var(--salon-muted); font-size: 0.85rem; }
.package-item { margin-bottom: 6px; }
.stages td:nth-child(2) { min-width: 200px; }
.stages td:nth-child(3) { width: 110px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--salon-bg); padding: 12px 0; }

/* Scheduling (Phase 5) */
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; margin: 10px 0; align-items: end; }
.field-grid > label { display: flex; flex-direction: column; gap: 4px; color: var(--salon-muted); font-size: 0.85rem; }
.field-grid .span-2 { grid-column: 1 / -1; }
.field-grid > .field { display: flex; flex-direction: column; gap: 4px; }
.field-label { color: var(--salon-muted); font-size: 0.85rem; }
.field-grid > .checkbox { display: flex; align-items: center; min-height: 32px; }
.card.inset { background: var(--salon-bg); margin: 12px 0; box-shadow: none; }
.warning-text { color: #b45309; font-size: 0.9rem; }
.note-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 12px; white-space: pre-wrap; }
.tab-toolbar { display: flex; justify-content: flex-end; margin: 8px 0; }
.week-editor td { padding: 4px 6px; }
.pick-list { list-style: none; margin: 4px 0; padding: 0; border: 1px solid var(--salon-border); border-radius: 8px; max-height: 220px; overflow: auto; }
.pick-list li { padding: 6px 10px; cursor: pointer; }
.pick-list li:hover { background: var(--salon-hover); }
.selected-customer { display: flex; align-items: center; gap: 8px; color: inherit; font-size: 1rem; }
.service-line { margin-bottom: 6px; }
.slot-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; max-height: 160px; overflow: auto; }
.slot-chip { border: 1px solid var(--salon-border); background: var(--salon-surface); border-radius: 999px; padding: 4px 10px; cursor: pointer; font: inherit; }
.slot-chip:hover { border-color: var(--salon-accent); }
.slot-chip.selected { background: var(--salon-accent); border-color: var(--salon-accent); color: #fff; }
.simple-table.clickable tbody tr { cursor: pointer; }
.simple-table.clickable tbody tr:hover td { background: var(--salon-hover); }
.simple-table tr.upcoming td:first-child { font-weight: 600; }
.simple-table tfoot td { font-weight: 600; border-top: 1px solid var(--salon-border); padding: 6px 8px; }
.appt-summary { display: grid; gap: 4px; margin-bottom: 8px; }
.customer-link { font-weight: 600; font-size: 1.05rem; }
.history { margin-top: 12px; }
.row-actions { white-space: nowrap; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.history summary { cursor: pointer; color: var(--salon-muted); }

.status-pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 0.78rem; margin-left: 8px; border: 1px solid transparent; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-scheduled { background: #e0e7ff; color: #3730a3; }
.status-confirmed { background: #dcfce7; color: #166534; }
.status-arrived { background: #cffafe; color: #155e75; }
.status-inprogress { background: #fae8ff; color: #86198f; }
.status-completed { background: #e5e7eb; color: #374151; }
.status-cancelled, .status-noshow { background: #fee2e2; color: #991b1b; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.calendar-legend .status-pill { margin-left: 0; }
.status-pill.appt-processing { background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 6px, #e5e7eb 6px, #e5e7eb 12px); color: #374151; }

/* SfSchedule events: colour by status, stripes for processing time, red edge for conflicts. */
.salon-schedule .e-appointment.appt { border-radius: 6px; border: 0; border-left: 4px solid rgba(0, 0, 0, 0.25); }
.salon-schedule .e-appointment.appt .appt-template { padding: 2px 4px; line-height: 1.25; overflow: hidden; }
.salon-schedule .e-appointment.appt .appt-time { font-size: 0.72rem; opacity: 0.85; }
.salon-schedule .e-appointment.appt .appt-customer { font-weight: 600; font-size: 0.82rem; }
.salon-schedule .e-appointment.appt .appt-service { font-size: 0.75rem; opacity: 0.9; }
.salon-schedule .e-appointment.appt.status-pending { background: #fde68a; color: #78350f; }
.salon-schedule .e-appointment.appt.status-scheduled { background: #c7d2fe; color: #1e1b4b; }
.salon-schedule .e-appointment.appt.status-confirmed { background: #86efac; color: #14532d; }
.salon-schedule .e-appointment.appt.status-arrived { background: #67e8f9; color: #164e63; }
.salon-schedule .e-appointment.appt.status-inprogress { background: #f0abfc; color: #701a75; }
.salon-schedule .e-appointment.appt.status-completed { background: #d1d5db; color: #1f2937; }
.salon-schedule .e-appointment.appt-processing { background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55) 6px, transparent 6px, transparent 12px); }
.salon-schedule .e-appointment.appt-conflict { border-left-color: var(--salon-danger); }
.salon-schedule .e-block-appointment.off-hours { background: repeating-linear-gradient(135deg, #f3f4f6, #f3f4f6 8px, #eceef1 8px, #eceef1 16px); opacity: 0.85; color: transparent; }
.salon-schedule .e-block-appointment.external-busy { background: repeating-linear-gradient(135deg, #e0e7ff, #e0e7ff 8px, #c7d2fe 8px, #c7d2fe 16px); color: #3730a3; opacity: 0.9; }

/* Color formulas (Phase 7): large touch targets for use at the color bar. */
.formula-editor .card { margin-bottom: 12px; }
.formula-editor .e-input-group, .formula-editor .e-control-wrapper { min-height: 40px; }
.bowl-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.formula-item { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--salon-border); }
.formula-item .qty input { font-weight: 600; }
.formula-card .formula-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.formula-changes { margin: 8px 0; font-size: 0.85rem; color: var(--salon-muted); }
.change-chip { display: inline-block; background: var(--salon-accent-soft); color: var(--salon-accent); border-radius: 999px; padding: 1px 8px; margin: 2px 4px 2px 0; }
.bowl-view { margin-top: 8px; }
.bowl-title { font-weight: 600; }
.bowl-items { margin: 4px 0 0; padding-left: 18px; }
.note-box.danger { background: #fef2f2; border-color: #fecaca; color: var(--salon-danger); }
.danger-text { color: var(--salon-danger); }

/* Messaging (Phase 8) */
.variable-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.variable-chips .slot-chip { font-size: 0.75rem; padding: 2px 8px; }
.note-box.preview { white-space: pre-wrap; font-family: inherit; }
.message-body { white-space: pre-wrap; max-width: 520px; }
.template-body textarea { min-height: 120px; }

@media (max-width: 700px) {
    .two-col { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}

/* ---------- Phase 10: commerce (checkout, sales, inventory, loyalty) ---------- */
.subsection-title { font-size: 0.95rem; margin: 16px 0 6px; }
.checkout-table td { vertical-align: top; }
.checkout-table .package-choice { margin-top: 4px; }
.checkout-totals { margin: 12px 0; }
.checkout-totals tfoot td { font-weight: 600; font-size: 1.05rem; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.8rem; }
.pill-package { background: var(--salon-accent-soft); color: var(--salon-accent); }
.package-row { align-items: center; }
.text-danger { color: var(--salon-danger); font-weight: 600; }
.text-warn { color: #b45309; font-weight: 600; }
.summary-strip { display: flex; gap: 24px; flex-wrap: wrap; margin: 8px 0 12px; color: var(--salon-muted); }
.pager { justify-content: center; align-items: center; margin-top: 8px; }
.sale-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--salon-surface); border: 1px solid var(--salon-border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi-value { font-size: 1.4rem; font-weight: 600; }
.kpi-label { color: var(--salon-muted); font-size: 0.85rem; }
a.kpi { color: inherit; text-decoration: none; }
a.kpi:hover { border-color: var(--salon-gold); }
.kpi-warn .kpi-value { color: #b45309; }
.kpi-danger .kpi-value { color: var(--salon-danger); }
.package-card { border: 1px solid var(--salon-border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.package-items { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Phase 11: dashboard & reports ---------- */
/* SMS packs */
.sms-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 12px 0; }
.sms-pack { border: 1px solid var(--salon-border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--salon-surface); }
.sms-pack-name { font-weight: 700; font-size: 1.1rem; }
.sms-pack-price { font-size: 1.4rem; font-weight: 700; }
.sms-pack .e-btn { margin-top: 6px; }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.dashboard-grid .card h2 { margin-top: 0; }
.chart-card { min-width: 0; }
.kpi-bar { display: block; height: 6px; background: var(--salon-hover); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.kpi-bar > span { display: block; height: 100%; background: var(--salon-accent); }
.alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.alert-list li { padding: 8px 10px; border-radius: 8px; border-left: 4px solid; }
.alert-list a { color: inherit; }
.alert-info { background: #eff6ff; border-color: #60a5fa; }
.alert-warning { background: #fffbeb; border-color: #f59e0b; }
.alert-danger { background: #fef2f2; border-color: var(--salon-danger); }
.nowrap { white-space: nowrap; }
.report-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 14px; }
.report-catalog .tile { text-align: left; }
.report-catalog .tile.disabled { opacity: 0.5; cursor: not-allowed; }
.report-totals { margin-top: 8px; }

/* ---------- Phase 12: platform admin ---------- */
.impersonation-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 16px; background: var(--salon-danger); color: #fff; position: sticky; top: 0; z-index: 1000; }
.impersonation-banner .e-btn { background: #fff; color: var(--salon-danger); border: none; }
.readonly-banner { padding: 8px 16px; background: #fffbeb; border-bottom: 1px solid #f59e0b; color: #92400e; }
.health-list { display: grid; gap: 8px; }
.health-list > div { padding: 10px 12px; border-radius: 8px; border-left: 4px solid; }
.plan-matrix td, .plan-matrix th { white-space: nowrap; }
.plan-matrix .e-numerictextbox { max-width: 90px; }
.dashboard-grid > .card { min-width: 0; overflow-x: auto; }
.dashboard-grid .simple-table td { overflow-wrap: anywhere; }

/* Business logo (settings → online booking) */
.logo-editor { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.logo-preview {
    width: 120px; height: 120px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border: 1px dashed var(--salon-border); border-radius: 12px; background: #fff;
}
.logo-preview img { max-width: 104px; max-height: 104px; object-fit: contain; }
.logo-editor .stack { flex: 1; min-width: 220px; }

/* 2FA setup: QR code next to the manual key */
.totp-setup { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.totp-qr { width: 180px; height: 180px; image-rendering: pixelated; border: 1px solid var(--salon-border); border-radius: 8px; background: #fff; padding: 6px; }
.totp-setup > div { flex: 1; min-width: 240px; }

/* Booking page appearance (settings → online booking): themes, colours, live preview, cover */
.theme-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .theme-layout { grid-template-columns: 1fr; } }
.theme-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-preset {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 8px; cursor: pointer;
    background: #fff; border: 1px solid var(--salon-border); border-radius: 10px; font: inherit;
}
.theme-preset.selected { border-color: var(--salon-ink); box-shadow: 0 0 0 1px var(--salon-ink); }
.theme-swatches { display: flex; border-radius: 6px; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.08); }
.theme-swatches span { width: 16px; height: 22px; }
.color-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 8px; }
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field code { font-size: 0.8rem; }
.cover-preview {
    height: 120px; border: 1px dashed var(--salon-border); border-radius: 12px; background: #fff;
    display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0 12px; text-align: center;
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.file-button {
    position: relative; display: inline-flex; align-items: center; padding: 6px 14px; cursor: pointer;
    border: 1px solid var(--salon-border); border-radius: 6px; background: #fff; font-size: 0.9rem;
}
.file-button input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-button.disabled { opacity: 0.5; pointer-events: none; }

/* Miniature booking page */
.bp { border-radius: 14px; padding: 12px; border: 1px solid var(--salon-border); font-size: 0.85rem; display: grid; gap: 8px; }
.bp-header { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; font-size: 1rem; }
.bp-logo { width: 34px; height: 34px; border-radius: 8px; background: #fff; object-fit: contain; padding: 3px; }
.bp-h2 { font-weight: 700; margin-top: 4px; }
.bp-option { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fff; color: #1f1b18; border: 1px solid #e8e2d6; border-radius: 10px; }
.bp-price { margin-left: auto; }
.bp-avatar { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; }
.bp-times { display: flex; gap: 6px; }
.bp-time { padding: 4px 10px; border-radius: 999px; background: #fff; color: #1f1b18; border: 1px solid #e8e2d6; font-weight: 600; }
.bp-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.bp-button { padding: 7px 14px; border-radius: 999px; font-weight: 600; }
