@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/fonts/vazirmatn-arabic.woff2') format('woff2-variations');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/fonts/vazirmatn-latin.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/fonts/vazirmatn-latin-ext.woff2') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --background: #fdfbf6;
    --foreground: #17130d;
    --card: #ffffff;
    --primary: #ffc61a;
    --primary-hover: #f0b400;
    --primary-foreground: #17130d;
    --primary-strong: #8a5a00;
    --honey: #ffc61a;
    --orange: #f97316;
    --ink: #17130d;
    --muted: #f4efe2;
    --muted-foreground: #6b5f4e;
    --border: #e8dfce;
    --input: #e2d8c5;
    --ring: #b45309;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --success: #15803d;
    --success-soft: #f0fdf4;
    --warning: #b45309;
    --warning-soft: #fff1e6;
    --info: #1d4ed8;
    --info-soft: #eff6ff;
    --radius: 12px;
    --sidebar-width: 264px;
    --font: 'Vazirmatn', Tahoma, ui-sans-serif, system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    background: var(--muted);
}

body {
    margin: 0;
    min-height: 100dvh;
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    cursor: pointer;
}

svg {
    flex-shrink: 0;
}

/* ---------- Layout ---------- */

.panel-shell {
    display: flex;
    min-height: 100dvh;
}

.sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 50;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    gap: 18px;
    border-inline-end: 1px solid var(--border);
    background: #fdfbf6;
    padding: 20px 16px;
}

.main {
    flex: 1;
    min-width: 0;
    margin-inline-start: var(--sidebar-width);
}

.content {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 28px 56px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in oklch, var(--background) 88%, transparent);
    padding: 12px 16px;
    backdrop-filter: blur(12px);
}

.nav-scrim {
    display: none;
}

/* ---------- Brand ---------- */

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 14px;
    border-bottom: 1px solid var(--border);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgb(255 198 26 / 45%);
}

.brand-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
}

.brand-sub {
    color: var(--muted-foreground);
    font-size: 10px;
    font-weight: 500;
}

/* ---------- Sidebar nav ---------- */

.nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-label {
    margin: 6px 10px;
    color: var(--muted-foreground);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--muted-foreground);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
    background: var(--muted);
    color: var(--foreground);
}

.nav-link.is-active {
    background: #fff3c4;
    color: var(--primary-strong);
    font-weight: 700;
}

.nav-link svg {
    width: 18px;
    height: 18px;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #fff3c4;
    color: var(--primary-strong);
    font-size: 15px;
    font-weight: 800;
}

.user-meta {
    min-width: 0;
}

.user-name {
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role {
    color: var(--muted-foreground);
    font-size: 10px;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    padding: 8px 10px;
    color: var(--danger);
    font-size: 11px;
    font-weight: 600;
    text-align: start;
}

.logout-link svg {
    width: 16px;
    height: 16px;
}

/* ---------- Topbar / mobile ---------- */

.menu-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.topbar-title {
    font-size: 13px;
    font-weight: 700;
}

/* ---------- Page head ---------- */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.page-eyebrow {
    color: var(--primary-strong);
    font-size: 10px;
    font-weight: 700;
}

.page-title {
    margin-top: 4px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.35;
}

.page-sub {
    margin-top: 4px;
    color: var(--muted-foreground);
    font-size: 12px;
}

/* ---------- Cards ---------- */

.card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 1px 2px oklch(0.3 0.02 55 / 4%);
}

.card-pad {
    padding: 20px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
}

.card-link {
    color: var(--primary-strong);
    font-size: 11px;
    font-weight: 600;
}

/* ---------- Stats ---------- */

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    padding: 16px 18px;
}

.stat::after {
    position: absolute;
    inset-block-start: -28px;
    inset-inline-end: -28px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgb(255 198 26 / 16%);
    content: '';
}

.stat-label {
    color: var(--muted-foreground);
    font-size: 11px;
    font-weight: 500;
}

.stat-value {
    margin-top: 4px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
}

.stat-value small {
    color: var(--muted-foreground);
    font-size: 10px;
    font-weight: 500;
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-bottom: 10px;
    border-radius: 9px;
    background: #fff3c4;
    color: var(--primary-strong);
}

.stat-icon svg {
    width: 17px;
    height: 17px;
}

/* ---------- Grid ---------- */

.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 18px;
}

/* ---------- Appointment list ---------- */

.appt-list {
    display: flex;
    flex-direction: column;
}

.appt {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.appt:last-child {
    border-bottom: 0;
}

.appt-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 10px;
    background: var(--muted);
    padding: 6px 4px;
}

.appt-time strong {
    font-size: 14px;
    font-weight: 700;
    direction: ltr;
}

.appt-time span {
    color: var(--muted-foreground);
    font-size: 9px;
}

.appt-main {
    min-width: 0;
}

.appt-name {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appt-service {
    margin-top: 2px;
    color: var(--muted-foreground);
    font-size: 11px;
}

.appt-side {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- Badges ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-pending {
    background: var(--warning-soft);
    color: #8a5a00;
}

.badge-confirmed {
    background: var(--info-soft);
    color: var(--info);
}

.badge-completed {
    background: var(--success-soft);
    color: var(--success);
}

.badge-cancelled {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge-paid {
    background: var(--success-soft);
    color: var(--success);
}

.badge-unpaid {
    background: var(--muted);
    color: var(--muted-foreground);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 6px 14px rgb(255 198 26 / 32%);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-outline {
    border-color: var(--border);
    background: #fff;
}

.btn-outline:hover {
    background: var(--muted);
}

.btn-ghost {
    background: transparent;
    color: var(--muted-foreground);
}

.btn-ghost:hover {
    background: var(--muted);
    color: var(--foreground);
}

.btn-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.btn-danger:hover {
    background: oklch(0.93 0.05 27);
}

.btn-sm {
    height: 32px;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 10px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
}

/* ---------- Forms ---------- */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-full {
    grid-column: 1 / -1;
}

.label {
    font-size: 11px;
    font-weight: 600;
}

.hint {
    color: var(--muted-foreground);
    font-size: 10px;
}

.input,
.select,
.textarea {
    width: 100%;
    height: 42px;
    border: 1px solid var(--input);
    border-radius: 10px;
    background: #fff;
    padding: 0 12px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea {
    height: auto;
    min-height: 90px;
    padding: 10px 12px;
    resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px rgb(181 83 9 / 14%);
}

.input[aria-invalid='true'] {
    border-color: var(--danger);
}

.input-ltr {
    direction: ltr;
    text-align: left;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
}

.checkbox-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-strong);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

/* ---------- Alerts ---------- */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 11px;
    line-height: 1.8;
}

.alert svg {
    width: 16px;
    height: 16px;
    margin-top: 2px;
}

.alert-success {
    border-color: oklch(0.85 0.06 155);
    background: var(--success-soft);
    color: var(--success);
}

.alert-danger {
    border-color: oklch(0.85 0.06 27);
    background: var(--danger-soft);
    color: var(--danger);
}

.alert-info {
    border-color: oklch(0.85 0.04 250);
    background: var(--info-soft);
    color: var(--info);
}

/* ---------- Toolbar / tabs ---------- */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--muted);
    padding: 3px;
}

.tab {
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--muted-foreground);
    font-size: 11px;
    font-weight: 600;
}

.tab.is-active {
    background: #fff;
    color: var(--foreground);
    box-shadow: 0 1px 3px oklch(0.3 0.02 55 / 10%);
}

.search-form {
    display: flex;
    gap: 6px;
}

.search-input {
    width: 210px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    padding: 0 11px;
    font-size: 11px;
    outline: none;
}

/* ---------- Table ---------- */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.table th {
    background: var(--muted);
    padding: 10px 14px;
    color: var(--muted-foreground);
    font-size: 10px;
    font-weight: 600;
    text-align: start;
    white-space: nowrap;
}

.table td {
    border-top: 1px solid var(--border);
    padding: 12px 14px;
    vertical-align: middle;
}

.table tr:hover td {
    background: oklch(0.99 0.003 80);
}

.cell-title {
    font-weight: 600;
}

.cell-sub {
    margin-top: 2px;
    color: var(--muted-foreground);
    font-size: 10px;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

/* ---------- Empty state ---------- */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 36px 20px;
    text-align: center;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    border-radius: 14px;
    background: var(--muted);
    color: var(--muted-foreground);
}

.empty-title {
    font-size: 13px;
    font-weight: 600;
}

.empty-text {
    max-width: 280px;
    color: var(--muted-foreground);
    font-size: 11px;
}

/* ---------- Pagination ---------- */

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    font-size: 11px;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn {
    display: grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    padding: 0 8px;
    font-size: 11px;
}

.page-btn.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ---------- Auth ---------- */

.auth-page {
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 15% 0%, rgb(255 198 26 / 30%), transparent 45%),
        radial-gradient(circle at 85% 100%, rgb(255 227 138 / 60%), transparent 45%),
        var(--muted);
}

.auth-card {
    width: 100%;
    max-width: 410px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
    padding: 28px;
    box-shadow: 0 24px 60px oklch(0.3 0.02 55 / 10%);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-title {
    margin-top: 6px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.4;
}

.auth-sub {
    margin-top: 6px;
    color: var(--muted-foreground);
    font-size: 12px;
    line-height: 1.9;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 22px;
}

.auth-note {
    margin-top: 16px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: var(--muted);
    padding: 10px 12px;
    color: var(--muted-foreground);
    font-size: 10px;
    line-height: 1.9;
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
    font-size: 11px;
}

.code-input {
    height: 54px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.45em;
    text-align: center;
    direction: ltr;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted-foreground);
    font-size: 10px;
    font-weight: 500;
}

/* ---------- Utilities ---------- */

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

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.ltr { direction: ltr; unicode-bidi: embed; }
.nowrap { white-space: nowrap; }
.text-danger { color: var(--danger); }
.text-danger-xs { color: var(--danger); font-size: 10px; }

.section-title {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
}

.divider {
    height: 1px;
    margin: 14px 0;
    background: var(--border);
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 960px) {
    .panel-shell {
        display: block;
    }

    .sidebar {
        transform: translateX(100%);
        transition: transform 0.22s ease;
        box-shadow: -18px 0 40px oklch(0.3 0.02 55 / 10%);
    }

    .nav-toggle:checked ~ .panel-shell .sidebar {
        transform: translateX(0);
    }

    .nav-toggle:checked ~ .panel-shell .nav-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-scrim {
        position: fixed;
        inset: 0;
        z-index: 40;
        display: block;
        background: oklch(0.2 0.02 55 / 45%);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s;
    }

    .main {
        margin-inline-start: 0;
    }

    .topbar {
        display: flex;
    }

    .content {
        padding: 20px 16px 48px;
    }
}

@media (max-width: 620px) {
    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-title {
        font-size: 22px;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat {
        padding: 13px 14px;
    }

    .stat-value {
        font-size: 22px;
    }

    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .appt {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 10px;
        padding: 12px 0;
    }

    .appt-side {
        grid-column: 2;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form {
        width: 100%;
    }

    .search-input {
        flex: 1;
        width: auto;
    }

    .table th,
    .table td {
        padding: 10px;
    }
}


/* ---------- TV settings ---------- */

.tv-link-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: var(--muted);
    padding: 10px 12px;
}

.tv-link-box code {
    overflow-x: auto;
    font-size: 11px;
    white-space: nowrap;
}

.tv-link-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
}

.tv-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tv-mode-card {
    display: block;
    transition: border-color 0.15s, transform 0.15s;
}

.tv-mode-card:hover {
    border-color: var(--primary-strong);
    transform: translateY(-2px);
}

.tv-guide {
    margin: 0;
    padding-inline-start: 18px;
    color: var(--muted-foreground);
    font-size: 12px;
    line-height: 2.2;
}

@media (max-width: 620px) {
    .tv-mode-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tv-link-box {
        align-items: stretch;
        flex-direction: column;
    }

    .tv-link-actions {
        justify-content: flex-end;
    }
}

/* ---------- Notifications ---------- */

.nav-badge {
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    padding: 0 5px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.notification-bell {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--muted-foreground);
}

.notification-count {
    position: absolute;
    inset-block-start: -5px;
    inset-inline-end: -5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    border: 2px solid var(--background);
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    padding: 0 3px;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
}

.notice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    border: 1px solid var(--border);
    border-inline-start: 3px solid transparent;
    border-radius: 14px;
    background: #fff;
    padding: 16px 18px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.notice.is-unread {
    border-inline-start-color: var(--primary-strong);
    background: #fffdf5;
}

@media (hover: hover) {
    .notice:not(.is-unread):hover {
        border-color: color-mix(in oklch, var(--primary) 24%, var(--border));
    }

    .notice:hover {
        box-shadow: 0 4px 14px oklch(0.3 0.02 55 / 6%);
    }
}

.notice-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--muted);
    color: var(--muted-foreground);
}

.notice-icon svg {
    width: 19px;
    height: 19px;
}

.notice-icon-appointment_cancelled {
    background: var(--danger-soft);
    color: var(--danger);
}

.notice-icon-appointment_rescheduled {
    background: var(--warning-soft);
    color: var(--warning);
}

.notice-icon-appointment_confirmed {
    background: var(--success-soft);
    color: var(--success);
}

.notice-main {
    min-width: 0;
    padding-top: 1px;
}

.notice-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 22px;
}

.notice-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
}

.notice.is-unread .notice-title {
    font-weight: 800;
}

.notice-badge {
    padding: 1px 8px;
    background: #fff3c4;
    color: var(--primary-strong);
    font-size: 9px;
    line-height: 1.7;
}

.notice-body {
    margin-top: 3px;
    color: var(--muted-foreground);
    font-size: 11.5px;
    line-height: 1.9;
}

.notice-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 9px;
    color: var(--muted-foreground);
    font-size: 10px;
}

.notice-date {
    display: inline-flex;
    align-items: center;
}

.notice-meta a {
    color: var(--primary-strong);
    font-weight: 600;
}

.notice-action {
    margin-inline-start: auto;
}

.notice-action .btn {
    height: 26px;
    border-radius: 7px;
    padding: 0 9px;
    font-size: 9.5px;
}

@media (max-width: 620px) {
    .notice {
        gap: 11px;
        border-radius: 12px;
        padding: 14px;
    }

    .notice-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .notice-icon svg {
        width: 17px;
        height: 17px;
    }

    .notice-title {
        font-size: 12.5px;
    }

    .notice-body {
        font-size: 11px;
    }

    .notice-meta {
        gap: 5px 10px;
        margin-top: 8px;
    }
}

/* ---------- Appearance pickers ---------- */

.form-divider {
    grid-column: 1 / -1;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: 11px;
    font-weight: 700;
}

.color-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-color {
    width: 64px;
    flex: 0 0 auto;
    padding: 4px;
    cursor: pointer;
    background: #fff;
}

.input-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.input-color::-webkit-color-swatch {
    border: 0;
    border-radius: 6px;
}

.input-color::-moz-color-swatch {
    border: 0;
    border-radius: 6px;
}

.color-value {
    direction: ltr;
    color: var(--muted-foreground);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
}

.icon-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-row .select {
    flex: 1;
    min-width: 0;
}

.icon-preview {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--muted);
    background: color-mix(in oklab, var(--brand, var(--primary)) 12%, #fff);
    color: var(--primary-strong);
    color: color-mix(in oklab, var(--brand, var(--primary)) 75%, #000);
}

.icon-preview svg {
    width: 20px;
    height: 20px;
}

.service-color-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-inline-end: 7px;
    border-radius: 50%;
    vertical-align: middle;
    background: var(--service-color, var(--primary));
}

/* ---------- Share / QR ---------- */

.alert-warning {
    border-color: oklch(0.86 0.08 80);
    background: var(--warning-soft);
    color: var(--warning);
}

.share-grid {
    display: grid;
    grid-template-columns: minmax(0, 390px) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

.share-side {
    display: grid;
    gap: 14px;
}

.share-preview {
    overflow: hidden;
    color: #fff;
    border: 0;
    background:
        radial-gradient(circle at 82% 8%, rgba(255, 255, 255, 0.24), transparent 42%),
        linear-gradient(145deg, var(--brand), color-mix(in oklab, var(--brand) 55%, #17110c));
    box-shadow: 0 24px 50px -34px color-mix(in oklab, var(--brand) 65%, #000);
}

.share-preview-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-preview-avatar {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.share-preview-avatar svg {
    width: 26px;
    height: 26px;
}

.share-preview-meta {
    min-width: 0;
}

.share-preview-eyebrow {
    margin: 0;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.share-preview-name {
    margin: 2px 0 0;
    overflow: hidden;
    font-size: 18px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-preview-shop {
    margin: 1px 0 0;
    overflow: hidden;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-qr-card {
    margin-top: 18px;
    border-radius: 22px;
    background: #fff;
    padding: 18px 16px 15px;
    text-align: center;
    color: #231b14;
    box-shadow: 0 20px 44px -30px rgba(0, 0, 0, 0.6);
}

.share-qr-image {
    display: block;
    width: min(232px, 100%);
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
}

.share-qr-title {
    margin: 12px 0 0;
    font-size: 13px;
    font-weight: 700;
}

.share-qr-name {
    margin: 2px 0 0;
    font-size: 11px;
    color: #756a60;
}

.share-preview-note {
    margin: 14px 0 0;
    text-align: center;
    font-size: 11px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.72);
}

.share-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-footnote {
    margin: 10px 0 0;
    font-size: 11px;
    line-height: 1.9;
    color: var(--muted-foreground);
}

.share-footnote code {
    font-size: 10px;
    word-break: break-all;
}

.share-instagram {
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.share-instagram summary {
    cursor: pointer;
    color: var(--primary-strong);
    font-size: 12px;
    font-weight: 600;
}

.share-steps {
    margin: 8px 0 0;
    padding-inline-start: 18px;
    color: var(--muted-foreground);
    font-size: 11px;
    line-height: 2;
}

.share-caption {
    margin: 0;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: var(--muted);
    padding: 10px 12px;
    font-size: 11px;
    line-height: 2;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 900px) {
    .share-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Bee brand ---------- */

.brand-mark svg {
    width: 26px;
    height: 26px;
}

.bee-mark-image {
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.bee-hover {
    animation: bee-hover 2.8s ease-in-out infinite;
}

.bee-flap {
    transform-box: fill-box;
    transform-origin: 50% 90%;
    animation: bee-flap 0.19s ease-in-out infinite alternate;
}

.nav-badge[hidden],
.notification-count[hidden] {
    display: none;
}

.sound-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    padding: 8px 10px;
    color: var(--muted-foreground);
    font-size: 11px;
    font-weight: 600;
    text-align: start;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sound-toggle:hover {
    background: var(--muted);
    color: var(--foreground);
}

.sound-toggle[aria-pressed='true'] {
    border-color: color-mix(in oklab, var(--primary) 55%, var(--border));
    background: #fff3c4;
    color: var(--primary-strong);
}

.sound-toggle svg {
    width: 15px;
    height: 15px;
}

.sound-toggle .sound-state {
    margin-inline-start: auto;
    font-size: 10px;
    opacity: 0.8;
}

.bee-pulse {
    animation: bee-pulse 0.7s ease-out;
}

.auth-bee {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.auth-bee svg {
    width: 76px;
    height: 76px;
    animation: bee-hover 2.8s ease-in-out infinite;
}

.empty-bee {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.empty-bee svg {
    width: 42px;
    height: 42px;
    opacity: 0.85;
}

.tv-mark-bee {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--primary);
}

.tv-mark-bee svg {
    width: 32px;
    height: 32px;
}

@keyframes bee-flap {
    from {
        transform: rotate(-15deg) scaleY(1);
    }

    to {
        transform: rotate(12deg) scaleY(1.08);
    }
}

@keyframes bee-hover {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes bee-pulse {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bee-hover,
    .bee-flap,
    .bee-pulse,
    .auth-bee svg {
        animation: none !important;
    }
}
