.dashboard {
    --dash-sidebar: 246px;
    --dash-gutter: clamp(1rem, 3.4vw, 2.75rem);
    --dash-shadow: 0 5px 16px rgb(14 34 64 / .045);
    --dash-canvas: #eef2f7;
    --dash-surface: #fbfcfe;
    --dash-ice: #f2f6fd;
    --dash-mint: #f0f7f4;
    --dash-sand: #faf5ed;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
    background: var(--dash-canvas);
}
.dashboard .action { gap: .4rem; }
.dashboard .action svg { width: 19px; height: 19px; }
.dash-stage { min-width: 0; }
.dash-sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    width: min(310px, calc(100% - 36px));
    overflow: auto;
    overscroll-behavior: contain;
    background: var(--dash-surface);
    border-right: 1px solid var(--line);
    padding: max(1rem, env(safe-area-inset-top)) .75rem max(1rem, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 1rem;
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform .23s ease, visibility .23s;
}
.dash-drawer-open { overflow: hidden; }
.dash-drawer-open .dash-sidebar { visibility: visible; transform: none; }
.dash-backdrop { position: fixed; inset: 0; z-index: 25; background: rgb(14 34 64 / .45); }
.dash-sidebar-head { display: flex; justify-content: space-between; align-items: center; gap: .2rem; }
.dash-logo { display: flex; align-items: center; min-height: 44px; padding-inline: .25rem; }
.dash-logo img { display: block; width: 128px; height: auto; }
.dash-icon-button {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--navy);
    text-decoration: none;
}
.dash-icon-button:hover, .dash-profile-menu summary:hover { background: var(--sky); }
.dash-icon-button:disabled { opacity: .45; }
.dash-icon-button svg, .dash-navigation svg, .dash-exit svg { width: 19px; height: 19px; }
.dash-collapse { display: none; }
.dash-role { display: flex; gap: .65rem; align-items: center; padding: .6rem; border-radius: var(--radius); background: var(--dash-ice); }
.dash-role > span { color: var(--blue); }
.dash-role small { display: block; color: var(--steel); font-size: .8rem; }
.dash-role strong, .dash-sidebar-profile strong { font-size: .875rem; }
.dash-navigation { display: grid; gap: .85rem; }
.dash-nav-group p { padding: .15rem .65rem .3rem; color: var(--steel); font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.dash-nav-group a, .dash-exit, .dash-sidebar-profile {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 44px;
    padding: .35rem .65rem;
    border-radius: var(--radius);
    color: var(--navy);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .18s, color .18s;
}
.dash-nav-group a:hover, .dash-exit:hover, .dash-sidebar-profile:hover { background: var(--concrete); }
.dash-nav-group [aria-current] { background: var(--sky); color: var(--blue); box-shadow: inset 3px 0 var(--blue); animation: dash-enter .22s ease both; }
.dash-sidebar-foot { margin-top: auto; padding-top: .45rem; border-top: 1px solid var(--line); }
.dash-avatar { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--sky); color: var(--blue); font-size: .72rem; font-weight: 600; }
.dash-top { position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top); background: var(--white); border-bottom: 1px solid var(--line); }
.dash-top-inner { min-height: 66px; display: flex; gap: .55rem; align-items: center; padding-inline: var(--dash-gutter); }
.dash-crumb { display: flex; align-items: center; gap: .45rem; min-width: 0; line-height: 1.25; font-size: .9rem; }
.dash-crumb a, .dash-crumb svg { display: none; }
.dash-top-actions { display: flex; gap: .3rem; margin-left: auto; }
.dash-profile-menu { position: relative; }
.dash-profile-menu summary { display: flex; align-items: center; gap: .25rem; min-height: 44px; padding: .2rem; border-radius: var(--radius); list-style: none; }
.dash-profile-menu summary::-webkit-details-marker { display: none; }
.dash-profile-menu summary svg, .dash-crumb svg { width: 16px; height: 16px; }
.dash-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 182px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); padding: .45rem; box-shadow: var(--dash-shadow); }
.dash-profile-menu[open] .dash-menu-panel { animation: dash-enter .16s ease both; }
.dash-menu-panel p { padding: .4rem .5rem; font-weight: 600; }
.dash-menu-panel :is(a, button) { display: flex; align-items: center; gap: .45rem; padding-inline: .5rem; min-height: 44px; border-radius: 8px; text-decoration: none; color: var(--navy); }
.dash-menu-panel :is(a, button):hover { background: var(--sky); }
.dash-menu-panel svg { width: 18px; height: 18px; }
.dash-main { width: min(100%, 1390px); margin: auto; padding: 1.25rem var(--dash-gutter) 2rem; }
.has-bottom-nav .site-footer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
.dash-bottom { position: fixed; inset: auto 0 0; z-index: 15; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: .25rem .35rem max(.25rem, env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); }
.dash-bottom a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-height: 52px; border-radius: var(--radius); color: var(--steel); text-decoration: none; font-size: .7rem; font-weight: 600; text-align: center; }
.dash-bottom a[aria-current] { color: var(--blue); background: var(--sky); }
.dash-bottom svg { width: 19px; height: 19px; }
.dash-card { min-width: 0; background: var(--dash-surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--dash-shadow); }
.dash-welcome { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1.15rem; overflow: hidden; isolation: isolate; padding: clamp(1.15rem, 3.4vw, 2.6rem); background: linear-gradient(115deg, var(--sky), var(--dash-mint)); }
.dash-welcome::before { content: ""; position: absolute; width: 290px; aspect-ratio: 1; border: 22px solid rgb(29 95 216 / .065); border-radius: 50%; top: -150px; right: -85px; z-index: -1; animation: dash-drift 11s ease-in-out infinite alternate; }
.dash-main h1 { font-size: clamp(1.7rem, 3.1vw, 2.7rem); }
.dash-main h2 { font-size: clamp(1.125rem, 1.7vw, 1.38rem); }
.dash-main h3 { font-size: 1rem; }
.dash-welcome p:not(.dash-eyebrow), .dash-panel > p { color: var(--steel); margin-top: .5rem; }
.dash-eyebrow { margin-bottom: .45rem; color: var(--blue); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.dash-page-head { margin-bottom: 1.25rem; }
.dash-block { margin-top: clamp(1.25rem, 2.8vw, 2rem); }
.dash-service-action { align-self: center; flex: 0 0 auto; min-height: 46px; white-space: nowrap; }
.dash-service-toolbar-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.dash-service-toolbar-actions .dash-service-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 9rem;
    min-height: 46px;
    padding: .55rem .75rem;
    font: inherit;
    font-weight: 600;
    border-radius: var(--radius);
}
.dash-provider-records { display: grid; gap: .9rem; }
.dash-provider-records:not(:empty) { margin-top: .9rem; }
.dash-provider-records p { overflow-wrap: anywhere; }
.dash-booking-toolbar > label:first-of-type { flex-grow: 2; }
.dash-customer-profile {
    display: grid;
    gap: 1rem;
    max-width: 64rem;
}
.customer-profile-summary {
    display: flex;
    align-items: center;
    gap: clamp(.75rem, 3vw, 1.25rem);
    background: linear-gradient(110deg, var(--sky), var(--dash-surface));
}
.customer-profile-avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: clamp(3.25rem, 8vw, 4.5rem);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px solid var(--white);
    background: var(--blue);
    color: var(--white);
}
.customer-profile-avatar svg { width: 48%; height: 48%; }
.customer-profile-avatar { position: relative; overflow: hidden; }
.customer-profile-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.customer-photo-panel > form { margin-top: .7rem; }
.customer-photo-panel input[type="file"] { max-width: 100%; }
.customer-photo-preview { width: 5rem; height: 5rem; border-radius: 50%; object-fit: cover; }
.customer-photo-error { color: #a52626; }
.customer-profile-identity { min-width: 0; overflow-wrap: anywhere; }
.customer-profile-identity p { margin: 0 0 .25rem; color: var(--steel); font-size: .875rem; }
.dash-customer-profile .customer-profile-identity h2 { margin: 0; font-size: clamp(1.2rem, 3vw, 1.75rem); }
.customer-profile-fields { display: grid; gap: .75rem; margin: .9rem 0 0; }
.customer-profile-field {
    min-width: 0;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--concrete);
}
.customer-profile-field dt { display: flex; align-items: center; gap: .45rem; color: var(--steel); font-size: .825rem; font-weight: 600; }
.customer-profile-field dt svg { display: block; width: 16px; height: 16px; color: var(--blue); }
.customer-profile-field dd { margin: .3rem 0 0; overflow-wrap: anywhere; }
@media (min-width: 700px) {
    .customer-profile-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .dash-booking-toolbar { flex-wrap: nowrap; }
    .dash-booking-toolbar .dash-service-toolbar-actions { flex: none; }
}
.dash-section-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .25rem .85rem; margin-bottom: .8rem; }
.dash-metrics, .dash-categories, .dash-columns { display: grid; gap: .7rem; }
.dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-metric, .dash-category, .dash-panel { padding: clamp(.8rem, 2.15vw, 1.3rem); }
.dash-metric { display: grid; align-content: start; gap: .5rem; animation: dash-enter .3s ease both; }
.dash-metric, .dash-setup { background: var(--dash-ice); }
.dash-metric:nth-child(3n + 2), .dash-setup:nth-child(2) { background: var(--dash-mint); }
.dash-metric:nth-child(3n), .dash-setup:nth-child(3) { background: var(--dash-sand); }
.dash-metric:nth-child(2n) { animation-delay: .045s; }
.dash-metric:nth-child(3n) { animation-delay: .085s; }
.dash-metric strong { font-size: 1.6rem; line-height: 1; }
.dash-metric h3 { color: var(--steel); font-size: .86rem; overflow-wrap: anywhere; }
.dash-tile { display: inline-grid; flex: none; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--sky); color: var(--blue); }
.dash-tile svg { width: 21px; height: 21px; }
.dash-category { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; min-height: 86px; color: var(--navy); font-weight: 600; font-size: .88rem; text-decoration: none; transition: transform .18s, border-color .18s; overflow-wrap: anywhere; }
.dash-category:hover { transform: translateY(-2px); border-color: var(--blue); color: var(--blue); }
.dash-category:active, .dashboard .action:active { transform: scale(.985); }
.dash-inline { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .9rem; }
.dash-badge { display: inline-flex; width: fit-content; padding: .2rem .55rem; border-radius: 999px; background: var(--sky); color: var(--blue); font-size: .75rem; font-weight: 600; }
.dash-badge-positive { color: var(--green); background: #e7f5ee; }
.dash-empty { display: grid; justify-items: center; gap: .45rem; padding: 1.35rem .6rem; text-align: center; }
.dash-empty p, .dash-setup p { color: var(--steel); font-size: .9rem; }
.dash-setup-grid { display: grid; gap: .85rem; }
.dash-setup { display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; }
.dash-setup .action { width: 100%; margin-top: auto; }
.dash-setup :is(p, .dash-badge) { margin-bottom: .35rem; }
@media (min-width: 720px) {
    .dash-setup-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.dash-setup meter { width: 100%; }
.dash-search { display: flex; flex-wrap: wrap; gap: .55rem; width: 100%; margin-top: .65rem; }
.dash-search label { display: flex; flex: 1 1 12rem; align-items: center; gap: .4rem; min-width: 0; min-height: 46px; padding-inline: .6rem; border: 1px solid var(--input-line); border-radius: var(--radius); background: var(--white); color: var(--steel); }
.dash-search .dash-select { flex: 1 1 9rem; }
.dash-search label:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.dash-search input, .dash-search select { width: 100%; min-width: 0; min-height: 44px; outline: 0; border: 0; background: var(--white); color: var(--navy); }
.dash-search svg { width: 19px; height: 19px; }
.dash-no-match { padding-block: 1rem; color: var(--steel); }
.dash-table-wrap { margin-top: .9rem; overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: .875rem; text-align: left; }
.dash-table th { background: var(--concrete); color: var(--steel); white-space: nowrap; }
.dash-table td, .dash-table th { padding: .6rem; border-bottom: 1px solid var(--line); }
.dash-table td > svg { width: 18px; height: 18px; color: var(--blue); }
.dash-service-summary { min-width: 0; overflow-wrap: anywhere; }
.dash-service-title { font-size: 1rem; font-weight: 700; }
.dash-service-description { max-width: 52ch; margin-top: .2rem; color: var(--steel); font-size: .8rem; line-height: 1.45; white-space: pre-line; }
.dash-service-area { display: flex; align-items: flex-start; gap: .3rem; margin-top: .35rem; color: var(--steel); font-size: .8rem; line-height: 1.45; }
.dash-service-area svg { flex: none; width: .925rem; height: .925rem; margin-top: .1rem; color: var(--blue); }
.dash-service-area span { min-width: 0; }
.dash-pagination { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .7rem; color: var(--steel); font-size: .88rem; }
.dash-form { display: grid; gap: .85rem; margin-top: 1rem; }
.dash-form-panel { max-width: 52rem; }
.dash-fields { display: grid; gap: .85rem; }
.dash-form label { display: grid; gap: .35rem; min-width: 0; font-weight: 600; }
.dash-form :is(input:not([type=checkbox]),select,textarea) { width: 100%; min-height: 46px; padding: .55rem .65rem; border: 1px solid var(--input-line); border-radius: var(--radius); background: var(--white); color: var(--navy); font-weight: 400; }
.dash-form .password-control input { padding-right: 3.25rem; }
.dash-form .dash-check { display: flex; align-items: center; min-height: 44px; cursor: pointer; }
.dash-check input { accent-color: var(--blue); width: 20px; height: 20px; }
.dash-form .action { justify-self: start; }
.dash-form-status:empty { display: none; }
.dash-form-status, .dash-callout { background: var(--sky); padding: .75rem; border-radius: var(--radius); }
.dash-checklist { margin-block: .9rem; }
.dash-dialog { width: min(420px, calc(100% - 2rem)); max-height: calc(100% - 2rem); padding: 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--navy); }
.dash-dialog[open] { animation: dash-enter .2s ease both; }
.dash-dialog::backdrop { background: rgb(14 34 64 / .48); }
.dash-dialog p { margin-block: .65rem 1rem; }
.dash-exit, .dash-menu-logout { width: 100%; border: 0; background: transparent; text-align: left; }
.dash-logout-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
@keyframes dash-enter { from { opacity: .45; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes dash-drift { to { transform: translate(-14px, 13px); } }
@media (max-width: 479px) {
    .dash-table:has([data-table-row]) thead { display: none; }
    .dash-table:has([data-table-row]) tbody { display: grid; gap: .45rem; }
    .dash-table [data-table-row] { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: .25rem; border: 1px solid var(--line); border-radius: var(--radius); }
    .dash-table [data-table-row] td { border: 0; padding: .3rem; }
    .dash-table [data-table-row] td:last-child { grid-column: 2; grid-row: 1 / span 2; }
}
@media (min-width: 600px) {
    .dash-top-inner { gap: .9rem; }
    .dash-crumb a { display: inline-flex; min-height: 44px; align-items: center; }
    .dash-crumb svg { display: inline-block; }
    .dash-metrics, .dash-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dash-columns, .dash-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-field-wide { grid-column: 1 / -1; }
}
@media (min-width: 992px) {
    .dashboard { grid-template-columns: var(--dash-sidebar) minmax(0, 1fr); }
    .dashboard.dash-collapsed { --dash-sidebar: 76px; }
    .dash-sidebar { position: sticky; grid-column: 1; grid-row: 1; top: 0; width: auto; height: 100dvh; visibility: visible; transform: none; }
    .dash-stage { grid-column: 2; grid-row: 1; }
    .dash-collapse { display: inline-grid; }
    .dash-drawer-close, .dash-menu-toggle, .dash-bottom { display: none; }
    .dash-collapsed .dash-sidebar-head { justify-content: center; }
    .dash-collapsed .dash-logo, .dash-collapsed .dash-role, .dash-collapsed .dash-nav-group p { display: none; }
    .dash-collapsed .dash-nav-group a, .dash-collapsed .dash-sidebar-profile, .dash-collapsed .dash-exit { justify-content: center; padding-inline: 0; }
    .dash-collapsed .dash-nav-group a span, .dash-collapsed .dash-sidebar-profile > span:last-child, .dash-collapsed .dash-exit span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .has-bottom-nav .site-footer { padding-bottom: 1.1rem; }
    .dash-main { padding-top: 1.75rem; }
}
@media (min-width: 1300px) {
    .dash-metrics { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
    .dash-categories { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    .dashboard *, .dashboard *::before { animation: none !important; transition: none !important; }
}
.dash-provider-card { max-width: 34rem; }
.dash-provider-head { display: flex; align-items: center; gap: .65rem; }
.dash-provider-head h3 { margin-top: .35rem; }
.dash-provider-head p, .dash-provider-facts dt { color: var(--steel); font-size: .875rem; }
.dash-provider-avatar { width: 48px; height: 48px; }
.dash-provider-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-block: .8rem; }
.dash-provider-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.dash-panel > p + .action { margin-top: .85rem; }

.dash-avatar { position: relative; overflow: hidden; }
.dash-avatar :is(.dash-avatar-placeholder, .dash-avatar-photo) { position: absolute; inset: 0; width: 100%; height: 100%; }
.dash-avatar .dash-avatar-placeholder { display: grid; place-items: center; }
.dash-avatar .dash-avatar-photo { display: block; object-fit: cover; }
.dash-avatar svg.lucide { width: 54%; height: 54%; }
.dash-avatar-large { width: 72px; height: 72px; }
.dash-photo-panel { margin-bottom: 1rem; }
.dash-photo-editor { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .8rem; margin-top: .9rem; }
.dash-photo-editor > div { flex: 1 1 13rem; min-width: 0; }
.dash-photo-editor p { color: var(--steel); font-size: .9rem; }
.dash-photo-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .65rem; }
.dash-photo-status:not(:empty) { margin-top: .45rem; }
.dash-unread-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
}
.dash-unread-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 1px solid #fff;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}
.dash-unread-badge[hidden] { display: none; }
