:root {
    --bg: #0b0c0e;
    --bg-elevated: #12141a;
    --surface: #181b22;
    --surface-2: #1f2430;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #f3efe6;
    --muted: #b7b0a4;
    --accent: #c9853a;
    --accent-2: #e2b16a;
    --danger: #d45c4a;
    --ok: #6fad7a;
    --radius: 14px;
    --font-display: "Syne", sans-serif;
    --font-body: "Figtree", sans-serif;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    accent-color: var(--accent);
}

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

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.55;
    color-scheme: dark;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(201, 133, 58, 0.18), transparent 55%),
        radial-gradient(900px 500px at 90% 0%, rgba(80, 100, 140, 0.16), transparent 50%),
        var(--bg);
}

a {
    color: var(--accent-2);
    text-decoration: none;
}

a:hover {
    color: #fff;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 0.4rem;
}

/* Blazor FocusOnNavigate focuses h1 on route change — hide that programmatic outline */
h1:focus {
    outline: none;
}

h1:focus:not(:focus-visible),
h2:focus:not(:focus-visible),
h3:focus:not(:focus-visible) {
    outline: none;
}

a:focus-visible,
button:focus-visible,
[role="option"]:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 3px;
    border-radius: 8px;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: 0.75rem 1.15rem;
    border-radius: 0 0 12px 12px;
    background: var(--accent);
    color: #140e08;
    font-weight: 700;
    transition: top 160ms ease;
}

.skip-link:focus {
    top: 0;
    color: #140e08;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .barber-pick:hover {
        transform: none;
    }
}

p {
    margin: 0 0 1rem;
}

.muted, .optional {
    color: var(--muted);
}

.site {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(11, 12, 14, 0.72);
    border-bottom: 1px solid var(--line);
    min-width: 0;
}

.site-nav-scroll {
    margin-left: auto;
    min-width: 0;
}

.site-nav {
    display: flex;
    gap: clamp(0.65rem, 1.5vw, 1.25rem);
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.brand, .brand-hero {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
}

.brand {
    font-size: 1.15rem;
}

.site-header .brand,
.cookie-note a,
.site-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
}

.brand.compact {
    display: block;
    margin-bottom: 1.5rem;
}

.site-nav a,
.link-btn,
.inline-form .link-btn {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 0.25rem;
    color: var(--muted);
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.site-nav a:hover,
.link-btn:hover:not(:disabled) {
    color: var(--text);
}

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

.nav-cta {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: rgba(201, 133, 58, 0.16);
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
}

.nav-cta:hover {
    background: var(--accent);
    color: #140e08;
}

.site-footer {
    margin-top: auto;
    padding: 2.5rem clamp(1.25rem, 4vw, 3rem);
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    display: grid;
    gap: 1.5rem;
    color: var(--muted);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem 2rem;
    flex-wrap: wrap;
}

.footer-copy {
    min-width: min(100%, 18rem);
    max-width: 36rem;
}

.footer-copy strong {
    display: block;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.footer-copy p {
    margin: 0.2rem 0;
}

.footer-maps-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    margin-top: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
}

.footer-map {
    width: 100%;
    display: grid;
    gap: 0.75rem;
}

.footer-map-head {
    display: grid;
    gap: 0.15rem;
}

.footer-map-kicker {
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.footer-map-head strong {
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}

.footer-map-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    min-height: 14rem;
    max-height: 22rem;
    overflow: hidden;
    border: 1px solid rgba(226, 177, 106, 0.22);
    border-radius: 18px;
    background:
        linear-gradient(160deg, rgba(201, 133, 58, 0.14), transparent 42%),
        #0e1016;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 18px 40px rgba(0, 0, 0, 0.35);
}

.footer-map-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
    background: linear-gradient(
        180deg,
        rgba(11, 12, 14, 0.18) 0%,
        transparent 28%,
        transparent 72%,
        rgba(11, 12, 14, 0.28) 100%
    );
}

.footer-map-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    filter: grayscale(0.35) saturate(0.75) contrast(1.08) brightness(0.88);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
    gap: clamp(1.25rem, 3vw, 2.75rem);
    min-height: min(78vh, 720px);
    padding: clamp(2rem, 6vh, 4rem) clamp(1.25rem, 4vw, 3rem);
    align-items: center;
    overflow: hidden;
}

/* Scale brand to the copy column, not the whole viewport */
.hero-copy {
    min-width: 0;
    max-width: 100%;
    container-type: inline-size;
    container-name: hero-copy;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* "Kalibras" is one unbreakable word; size type off the copy column
   (10.5cqi keeps it near ~90% of the available width). */
.brand-hero {
    font-size: clamp(2rem, 7vw, 5rem);
    line-height: 0.95;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    max-width: 100%;
    white-space: nowrap;
}

@supports (font-size: 1cqi) {
    .brand-hero {
        font-size: min(10.5cqi, 6.5rem);
    }
}

.lede {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    color: var(--muted);
    max-width: 28rem;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
}

.hero-visual {
    position: relative;
    min-width: 0;
    min-height: min(420px, 52vh);
    border-radius: 28px;
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(201, 133, 58, 0.35), transparent 45%),
        linear-gradient(20deg, #1a1f2b, #0d0f14 70%);
    box-shadow: var(--shadow);
    animation: rise 900ms ease both;
}

.hero-grain {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 0.5px, transparent 0.5px);
    background-size: 3px 3px;
    opacity: 0.45;
}

.hero-frame {
    position: absolute;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 1.5rem;
    padding: 1.25rem 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(10, 10, 12, 0.55);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    animation: fadeUp 1s 0.2s ease both;
}

.hero-frame span {
    color: var(--accent-2);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section {
    padding: 4rem clamp(1.25rem, 4vw, 3rem);
}

.section-head {
    margin-bottom: 2rem;
    max-width: 36rem;
}

.section-head h1,
.section-head h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.barber-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.barber-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Home: after “Žiūrėti kirpėjus”, heading + first row should fit the screen */
.barbers-section {
    scroll-margin-top: 5rem;
    padding-top: clamp(1.5rem, 3.5vh, 3rem);
    padding-bottom: clamp(2rem, 5vh, 4rem);
}

.barbers-section .section-head {
    margin-bottom: clamp(0.85rem, 2vh, 1.5rem);
}

.barbers-section .section-head h2 {
    font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.barbers-section .section-head p {
    margin: 0.35rem 0 0;
    font-size: 1.02rem;
}

@media (min-width: 641px) {
    .barbers-section .barber-pick {
        /* header ≈ 4.5rem + section chrome ≈ 7rem */
        max-height: calc(100dvh - 11.5rem);
    }

    .barbers-section .barber-photo {
        aspect-ratio: auto;
        flex: 1 1 auto;
        min-height: 7.5rem;
    }

    .barbers-section .barber-meta {
        flex: 0 0 auto;
        padding: 0.9rem 1.05rem 1rem;
    }

    .barbers-section .barber-bio {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        white-space: normal;
    }

    .barbers-section .pick-cta {
        padding-top: 0.55rem;
    }
}

@media (min-width: 641px) and (max-height: 760px) {
    .barbers-section .barber-pick {
        max-height: calc(100dvh - 10.25rem);
    }

    .barbers-section .barber-bio {
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }

    .barbers-section .barber-meta {
        gap: 0.2rem;
        padding: 0.7rem 0.95rem 0.8rem;
    }

    .barbers-section .pick-cta {
        padding-top: 0.35rem;
    }
}

.barber-pick {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: left;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
    padding: 0;
    font: inherit;
    width: 100%;
    animation: fadeUp 700ms ease both;
}

.barber-pick:nth-child(2) { animation-delay: 80ms; }
.barber-pick:nth-child(3) { animation-delay: 160ms; }

.barber-pick:hover,
.barber-pick.selected {
    transform: translateY(-4px);
    border-color: rgba(201, 133, 58, 0.55);
    box-shadow: var(--shadow);
}

.barber-photo {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--bg-elevated);
    flex: 0 0 auto;
}

.barber-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.barber-pick:hover .barber-photo img {
    transform: scale(1.04);
}

.barber-meta {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.35rem;
    padding: 1.05rem 1.15rem 1.2rem;
    min-width: 0;
}

.barber-meta h3 {
    margin: 0;
    font-size: 1.2rem;
}

.barber-bio {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.pick-cta {
    margin-top: auto;
    padding-top: 0.85rem;
    color: var(--accent-2);
    font-size: 0.9rem;
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.8rem 1.35rem;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #a86424);
    color: #140e08;
}

.btn-primary:hover {
    color: #140e08;
    filter: brightness(1.06);
}

.btn-ghost {
    border-color: var(--line);
    color: var(--text);
    background: transparent;
}

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

.steps {
    list-style: none;
    display: flex;
    gap: 0.75rem;
    padding: 0;
    margin: 0 0 2rem;
    flex-wrap: wrap;
}

.steps li {
    display: flex;
}

.step-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.75rem;
    padding: 0.55rem 1.05rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
}

.step-pill.active {
    color: #140e08;
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 700;
}

.step-pill.done {
    color: var(--accent-2);
    border-color: rgba(201, 133, 58, 0.4);
    cursor: pointer;
}

.step-pill.done::before {
    content: "✓";
    font-size: 0.9em;
}

.step-pill.done:hover {
    background: rgba(201, 133, 58, 0.14);
    border-color: var(--accent);
}

.book-flow {
    max-width: 920px;
}

.book-flow:has(.book-time) {
    max-width: 1120px;
}

.book-flow .section-head p {
    font-size: 1.1rem;
    color: var(--muted);
}

.book-time {
    display: grid;
    gap: 0;
}

.book-time .selected-chip {
    margin-bottom: 1.35rem;
}

.book-time-body {
    display: grid;
    gap: 1.75rem;
}

.selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1.05rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    margin-bottom: 1.5rem;
    font-size: 1.02rem;
}

.selected-chip .link-btn {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-2);
}

.service-list {
    display: grid;
    gap: 0.75rem;
    max-width: 720px;
}

.service-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    text-align: left;
    padding: 1rem 1.15rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.service-row:hover {
    border-color: rgba(201, 133, 58, 0.5);
}

.service-row span {
    display: block;
    color: var(--muted);
    font-size: 1rem;
}

/* The name/description column absorbs the slack so a long description wraps
   inside it instead of pushing the price onto its own row. */
.service-row > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.service-meta {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
}

.selected-chip img {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    /* Portraits sit high in the frame, so bias the crop towards the face. */
    object-position: center 20%;
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
}

.date-row {
    margin-bottom: 0;
    max-width: min(100%, 640px);
}

.book-time .date-row {
    max-width: none;
}

.date-row .dp {
    max-width: none;
}

.admin-actions .dp {
    max-width: 18rem;
}

.admin-actions .dp-trigger {
    min-height: 2.85rem;
}

/* Date picker grid must shrink — prevent weekend columns spilling out */
.dp-popover,
.dp-weekdays,
.dp-grid {
    max-width: 100%;
}

.dp-grid > .dp-cell,
.dp-weekdays > span {
    min-width: 0 !important;
    max-width: 100%;
}

.dp-popover .dp-cell {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
}

/* —— Form controls (global, dark theme) —— */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="file"]),
select,
textarea,
.form-control {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.75rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: var(--bg-elevated);
    color: var(--text);
    font: inherit;
    line-height: 1.35;
    color-scheme: dark;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

textarea {
    min-height: 6rem;
    resize: vertical;
}

input::placeholder,
textarea::placeholder,
.form-control::placeholder {
    color: #6f6a62;
    opacity: 1;
}

input:hover:not(:disabled):not([readonly]),
select:hover:not(:disabled),
textarea:hover:not(:disabled),
.form-control:hover:not(:disabled) {
    border-color: rgba(201, 133, 58, 0.35);
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: rgba(201, 133, 58, 0.75);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 0 0 3px rgba(201, 133, 58, 0.2);
}

input:disabled,
select:disabled,
textarea:disabled,
.form-control:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #0e1014;
}

/* Selects */
select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.5rem;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--accent-2) 50%),
        linear-gradient(135deg, var(--accent-2) 50%, transparent 50%);
    background-position:
        calc(100% - 1.15rem) calc(50% - 0.15rem),
        calc(100% - 0.75rem) calc(50% - 0.15rem);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    cursor: pointer;
}

select option,
select optgroup {
    background: #161922;
    color: var(--text);
}

/* Date / time / datetime — Chrome, Edge, Safari */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"] {
    min-height: 2.85rem;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.01em;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.75;
    padding: 0.35rem;
    margin-left: 0.35rem;
    border-radius: 8px;
    filter: invert(0.85) sepia(0.35) saturate(2.2) hue-rotate(350deg) brightness(1.05);
    transition: opacity 160ms ease, background 160ms ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: rgba(201, 133, 58, 0.15);
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit {
    padding: 0;
    color: var(--text);
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
    color: var(--text);
}

input[type="date"]::-webkit-datetime-edit-text,
input[type="time"]::-webkit-datetime-edit-text,
input[type="datetime-local"]::-webkit-datetime-edit-text {
    color: var(--muted);
    padding: 0 0.2rem;
}

input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus,
input[type="time"]::-webkit-datetime-edit-hour-field:focus,
input[type="time"]::-webkit-datetime-edit-minute-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-day-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-month-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-year-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-hour-field:focus,
input[type="datetime-local"]::-webkit-datetime-edit-minute-field:focus {
    background: rgba(201, 133, 58, 0.25);
    color: var(--text);
    outline: none;
    border-radius: 4px;
}

/* Number inputs */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    opacity: 0.6;
}

/* Checkboxes */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.4rem;
    height: 1.4rem;
    margin: 0.1rem 0.65rem 0 0;
    flex-shrink: 0;
    border-radius: 6px;
    border: 2px solid rgba(201, 133, 58, 0.6);
    background-color: var(--bg-elevated);
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    vertical-align: middle;
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

input[type="checkbox"]:hover:not(:checked) {
    border-color: var(--accent);
}

/* A gradient and an image cannot share one background layer - keeping them
   separate is what makes the tick actually render. */
input[type="checkbox"]:checked {
    background-color: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23140e08' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
    background-size: 1rem;
    border-color: var(--accent);
}

input[type="checkbox"]:checked:hover {
    background-color: var(--accent-2);
    border-color: var(--accent-2);
}

input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 133, 58, 0.25);
}

.admin-actions input:not([type="checkbox"]),
.admin-actions select,
.admin-header > select,
.admin-header input[type="date"] {
    width: auto;
    min-width: 11rem;
    margin-top: 0;
}

/* Reserve room so switching dates cannot shrink the page under the scroll position */
.slot-area {
    min-height: 16rem;
}

.slot-area-head {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.slot-heading {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.slot-count {
    font-size: 0.95rem;
}

.slot-group + .slot-group {
    margin-top: 1.25rem;
}

.slot-group-label {
    margin: 0 0 0.55rem;
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.slot-status {
    min-height: 1.6rem;
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 0.75rem;
    max-width: 760px;
}

.book-time .slot-grid {
    max-width: none;
}

/* Tablet / desktop: calendar beside times, full-width slot grid */
@media (min-width: 720px) {
    .book-time-body {
        grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr);
        gap: 1.75rem 2rem;
        align-items: start;
    }

    .book-time .date-row {
        position: sticky;
        top: 1rem;
    }

    .book-time .date-row .dp,
    .book-time .date-row .dp-inline-panel {
        max-width: none;
    }

    .book-time .slot-grid {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
        gap: 0.65rem;
    }
}

@media (min-width: 1100px) {
    .book-time-body {
        gap: 2rem 2.5rem;
    }

    .book-time .slot-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    }
}

.slot-grid.is-loading {
    pointer-events: none;
    opacity: 0.4;
}

.slot.skeleton {
    background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface));
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.slot {
    min-height: 3.1rem;
    padding: 0.9rem 0.65rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 1.08rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.slot:hover {
    border-color: var(--accent);
    background: rgba(201, 133, 58, 0.15);
}

.slot.selected {
    background: linear-gradient(135deg, var(--accent), #a86424);
    border-color: var(--accent);
    color: #140e08;
    font-weight: 750;
}

.details-form {
    display: grid;
    gap: 1rem;
    max-width: 480px;
}

.summary-card {
    max-width: 480px;
    margin-bottom: 1.5rem;
    padding: 1.1rem 1.25rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.summary-card dl {
    display: grid;
    gap: 0.6rem;
    margin: 0 0 0.5rem;
}

.summary-card dl > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.summary-card dt {
    color: var(--muted);
}

.summary-card dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
}

.summary-price {
    padding-top: 0.6rem;
    border-top: 1px solid var(--line);
}

.summary-price dd {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--accent-2);
}

.confirmation {
    max-width: 480px;
    padding: 2rem 1.5rem;
    border-radius: 22px;
    border: 1px solid rgba(111, 173, 122, 0.35);
    background: var(--surface);
    animation: fadeUp 400ms ease both;
}

.confirmation-mark {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: rgba(111, 173, 122, 0.18);
    color: var(--ok);
    font-size: 1.75rem;
    font-weight: 700;
}

.confirmation-details {
    display: grid;
    gap: 0.6rem;
    margin: 1.5rem 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.confirmation-details > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.confirmation-details dt {
    color: var(--muted);
}

.confirmation-details dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
}

.confirmation-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.form-actions {
    display: flex;
}

.form-actions .btn {
    flex: 1 1 auto;
}

.admin-actions .dp {
    max-width: 18rem;
}

.admin-actions .dp-trigger {
    min-height: 3.1rem;
}

.field label,
.admin-form > label,
.field-label {
    display: block;
    font-size: 1rem;
    color: var(--muted);
}

.field,
.admin-form > label {
    margin: 0;
}

.validation-message,
.validation-message.field-validation-error {
    display: block;
    margin-top: 0.35rem;
    color: var(--danger);
    font-size: 0.85rem;
}

.text-danger,
.validation-summary-errors {
    color: var(--danger);
}

.validation-summary-errors ul {
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
}

.validation-summary:not(:empty) .validation-summary-errors {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(212, 92, 74, 0.14);
    border: 1px solid rgba(212, 92, 74, 0.4);
}

.validation-summary-errors ul {
    list-style: none;
    padding: 0;
}

/* Account / Identity pages inherit site form look */
.account-page .form-control,
.account-page input:not([type="checkbox"]):not([type="hidden"]),
.account-page .btn {
    margin-top: 0.35rem;
}

.account-page .field {
    margin-bottom: 0.25rem;
}

.banner {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.banner.error {
    background: rgba(212, 92, 74, 0.15);
    border: 1px solid rgba(212, 92, 74, 0.4);
}

.banner.success {
    background: rgba(111, 173, 122, 0.15);
    border: 1px solid rgba(111, 173, 122, 0.4);
}

.banner.inline {
    display: inline-block;
    margin-top: 0.75rem;
}

.toast-host {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 80;
    display: grid;
    gap: 0.55rem;
    width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #1a1e28;
    color: var(--text);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    animation: toast-in 0.22s ease-out;
}

.toast-success {
    border-color: rgba(111, 173, 122, 0.45);
    background: linear-gradient(160deg, rgba(111, 173, 122, 0.18), #1a1e28 55%);
}

.toast-error {
    border-color: rgba(212, 92, 74, 0.45);
    background: linear-gradient(160deg, rgba(212, 92, 74, 0.18), #1a1e28 55%);
}

.toast-info {
    border-color: rgba(201, 133, 58, 0.4);
}

.toast-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.toast-close:hover {
    color: var(--text);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* Admin */
.admin-shell {
    display: grid;
    /* minmax(0,1fr) prevents wide calendar children from expanding the page */
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse 70% 50% at 100% 0%, rgba(196, 149, 74, 0.07), transparent 55%),
        var(--bg);
}

.admin-side {
    background: #090a0c;
    border-right: 1px solid var(--line);
    padding: 1.5rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-side-brand {
    display: grid;
    gap: 0.35rem;
}

.admin-nav-scroll {
    display: contents;
}

.side-label {
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
}

.admin-side nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-side a,
.admin-side .nav-link {
    color: var(--muted);
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    min-height: 2.6rem;
    display: flex;
    align-items: center;
}

.admin-side a.active,
.admin-side a:hover {
    background: var(--surface);
    color: var(--text);
}

.side-logout {
    margin-top: auto;
    padding-top: 1rem;
}

.side-logout button {
    width: 100%;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    border-radius: 10px;
    padding: 0.7rem;
    min-height: 2.75rem;
    font: inherit;
    cursor: pointer;
}

.side-logout button:hover {
    color: var(--text);
    border-color: rgba(243, 239, 230, 0.28);
}

.admin-main {
    min-width: 0;
    max-width: 100%;
    padding: 1.75rem clamp(1rem, 3vw, 2.5rem);
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

.admin-page {
    max-width: 1100px;
    min-width: 0;
}

.admin-page h1 {
    margin: 0 0 0.2rem;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 2.4vw, 2.15rem);
    letter-spacing: 0.01em;
}

.admin-page h2 {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
}

.admin-page .panel > .muted {
    margin: 0 0 1.1rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.admin-header > select,
.admin-select,
.app-select.admin-select {
    align-self: center;
    width: auto;
    min-width: 12rem;
    margin-top: 0;
}

.booking-table {
    display: grid;
    gap: 0.65rem;
}

.booking-row {
    display: grid;
    grid-template-columns: 70px 1.3fr 1.3fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.booking-row.row-service {
    grid-template-columns: 1.6fr auto minmax(9rem, auto);
}

.booking-row.row-service.is-editing {
    grid-template-columns: 1fr;
}

.svc-edit-form {
    width: 100%;
    display: grid;
    gap: 0.75rem;
}

.svc-barber-hint {
    margin: -0.5rem 0 1rem;
}

.svc-barber-hint strong {
    color: var(--text);
    font-weight: 650;
}

.svc-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 1.15rem;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.booking-row span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.booking-row .time {
    font-family: var(--font-display);
    font-size: 1.15rem;
}

.booking-row.status-cancelled {
    opacity: 0.55;
}

.booking-row .thumb img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.meta-cell {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.status {
    font-size: 0.9rem;
    color: var(--accent-2);
    white-space: nowrap;
}

.status.is-on,
.status-confirmed {
    color: var(--accent-2);
}

.status.is-off,
.status-cancelled {
    color: var(--muted);
}

.status-completed {
    color: #8fbf8a;
}

.status-noshow {
    color: var(--danger);
}

.confirm-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.confirm-q {
    color: var(--muted);
    font-size: 0.95rem;
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    min-height: 2.35rem;
    font-size: 0.95rem;
    border-radius: 999px;
}

.btn-ghost.danger,
.btn.danger {
    color: var(--danger);
    border-color: rgba(232, 104, 86, 0.35);
}

.btn-ghost.danger:hover,
.btn.danger:hover {
    color: #ff8a75;
    border-color: rgba(255, 138, 117, 0.55);
}

.link-btn.danger {
    color: var(--danger);
    font-weight: 600;
}

.link-btn.danger:hover {
    color: #ff8a75;
}

.empty {
    color: var(--muted);
    padding: 2rem 0;
}

.admin-form {
    display: grid;
    gap: 1rem;
    max-width: 520px;
}

.admin-form.tight {
    max-width: none;
}

.admin-form .field,
.admin-form > label {
    display: grid;
    gap: 0.35rem;
}

.admin-form textarea.short-text,
.admin-form .short-text {
    min-height: 4.25rem;
}

textarea.auto-grow {
    overflow-y: hidden;
    resize: none;
    field-sizing: content;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.35rem 1.35rem 1.25rem;
}

.panel-spaced {
    margin-top: 1.75rem;
}

.panel-subhead {
    margin: 1.5rem 0 0.35rem;
    font-size: 1.05rem;
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.week-until {
    color: var(--muted);
    font-size: 0.9rem;
    flex-shrink: 0;
    line-height: 1;
}

.day-check {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    color: var(--text);
    min-height: 2.5rem;
    cursor: pointer;
}

.lunch-check {
    margin: 0.35rem 0 0;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    background: rgba(196, 149, 74, 0.06);
    border: 1px solid rgba(196, 149, 74, 0.16);
}

.block-list {
    list-style: none;
    padding: 0;
    margin: 0.35rem 0 0;
    display: grid;
    gap: 0;
}

.block-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--line);
}

.block-list li.block-empty {
    border-top: 0;
    padding: 0.5rem 0 0;
    display: block;
}

.block-list span {
    display: block;
    color: var(--muted);
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.staff-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.1rem;
    padding: 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    align-items: start;
}

.staff-photo {
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    overflow: hidden;
    background: #15171b;
    border: 1px solid var(--line);
}

.staff-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
}

.staff-body {
    display: grid;
    gap: 0.65rem;
    align-content: start;
    min-width: 0;
}

.staff-meta {
    display: grid;
    gap: 0.2rem;
}

.staff-meta strong {
    font-size: 1.08rem;
    overflow-wrap: anywhere;
}

.staff-meta span {
    color: var(--muted);
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.staff-photo-actions {
    display: grid;
    gap: 0.3rem;
}

.file-btn {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: fit-content;
    max-width: 100%;
    white-space: nowrap;
}

.file-btn input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.hint {
    color: var(--muted);
    font-size: 0.82rem;
}

.admin-form.nested-form {
    max-width: none;
    padding-top: 0.35rem;
    border-top: 1px solid var(--line);
    margin-top: 0.35rem;
}

/* Team day calendar */
.cal-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.cal-header {
    position: relative;
    z-index: 20;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.cal-page .admin-actions,
.cal-toolbar {
    --cal-ctrl-h: 2.5rem;
    --cal-ctrl-r: 10px;
    --cal-ctrl-fs: 0.875rem;
    --cal-ctrl-pad-x: 0.75rem;
    --cal-ctrl-bg: #12141a;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 0.45rem;
    flex-wrap: wrap;
    align-items: center;
    /* Must stay visible: overflow-x:auto makes overflow-y non-visible too,
       which traps AppSelect menus and forces a vertical scrollbar. */
    overflow: visible;
    box-sizing: border-box;
}

.cal-toolbar .app-select {
    overflow: visible;
}

/* Shared control chrome inside the calendar toolbar */
.cal-toolbar > .btn,
.cal-toolbar > a.btn,
.cal-toolbar-end > .btn,
.cal-toolbar-end > a.btn,
.cal-nav .btn,
.cal-view-toggle,
.cal-nav-label,
.cal-focus-barber,
.cal-toolbar .dp-trigger,
.cal-toolbar .app-select-trigger {
    box-sizing: border-box;
    min-height: var(--cal-ctrl-h);
    height: var(--cal-ctrl-h);
    border-radius: var(--cal-ctrl-r);
    font-size: var(--cal-ctrl-fs);
    font-weight: 600;
    line-height: 1.2;
}

.cal-toolbar > .btn,
.cal-toolbar > a.btn,
.cal-toolbar-end > .btn,
.cal-toolbar-end > a.btn,
.cal-nav .btn {
    padding: 0 var(--cal-ctrl-pad-x);
    border-radius: var(--cal-ctrl-r);
}

.cal-nav .btn.btn-sm:not(.cal-nav-today) {
    width: var(--cal-ctrl-h);
    min-width: var(--cal-ctrl-h);
    padding: 0;
    font-size: 1.15rem;
    font-weight: 500;
}

.cal-toolbar > .btn-ghost,
.cal-toolbar-end > .btn-ghost,
.cal-nav .btn-ghost {
    background: var(--cal-ctrl-bg);
    border-color: var(--line-strong);
}

.cal-toolbar > .btn-primary,
.cal-toolbar > a.btn-primary,
.cal-toolbar-end > .btn-primary,
.cal-toolbar-end > a.btn-primary {
    border-color: transparent;
}

.cal-view-toggle {
    position: relative;
    display: inline-grid;
    grid-template-columns: repeat(3, 1fr);
    width: 14rem;
    flex: 0 0 14rem;
    align-items: stretch;
    padding: 3px;
    border: 1px solid var(--line-strong);
    background: var(--cal-ctrl-bg);
    isolation: isolate;
}

.cal-view-pill {
    position: absolute;
    z-index: 0;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / 3);
    border-radius: calc(var(--cal-ctrl-r) - 3px);
    background: var(--accent);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.cal-view-toggle[data-view="Week"] .cal-view-pill {
    transform: translateX(100%);
}

.cal-view-toggle[data-view="Month"] .cal-view-pill {
    transform: translateX(200%);
}

.cal-view-btn {
    appearance: none;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: var(--cal-ctrl-fs);
    font-weight: 600;
    padding: 0 0.65rem;
    border-radius: calc(var(--cal-ctrl-r) - 3px);
    cursor: pointer;
    transition: color 0.22s ease;
}

.cal-view-btn.is-active {
    color: #140f0a;
}

.cal-view-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.cal-stage {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 28rem;
    transition: opacity 0.22s ease, transform 0.22s ease;
    will-change: opacity, transform;
}

.cal-stage.is-refreshing {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.cal-view-panel {
    animation: cal-view-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cal-view-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cal-view-pill,
    .cal-stage,
    .cal-view-btn {
        transition: none;
    }

    .cal-view-panel {
        animation: none;
    }

    .cal-stage.is-refreshing {
        transform: none;
        opacity: 0.35;
    }
}

.cal-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: var(--cal-ctrl-h);
    flex: 0 0 auto;
    min-width: auto;
}

.cal-nav-pager {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    min-width: auto;
}

.cal-nav-arrow {
    flex: 0 0 var(--cal-ctrl-h);
    width: var(--cal-ctrl-h) !important;
    min-width: var(--cal-ctrl-h) !important;
    height: var(--cal-ctrl-h) !important;
    min-height: var(--cal-ctrl-h) !important;
    padding: 0 !important;
}

.cal-nav-date {
    flex: 0 0 12.5rem;
    width: 12.5rem;
    min-width: 12.5rem;
    max-width: 12.5rem;
    height: var(--cal-ctrl-h);
    overflow: hidden;
}

.cal-nav-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 0 var(--cal-ctrl-pad-x);
    border: 1px solid var(--line-strong);
    border-radius: var(--cal-ctrl-r);
    background: var(--cal-ctrl-bg);
    text-align: center;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-nav-today {
    flex: 0 0 auto;
    width: auto !important;
    min-width: auto !important;
    white-space: nowrap;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    font-size: var(--cal-ctrl-fs) !important;
    font-weight: 600 !important;
}

.cal-toolbar-end {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    margin-left: auto;
    overflow: visible;
}

.cal-toolbar .dp,
.cal-toolbar .dp.compact {
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
    min-width: 0;
    gap: 0;
}

.cal-toolbar .dp-field {
    height: 100%;
    min-width: 0;
    overflow: hidden;
}

.cal-toolbar .dp-trigger {
    /* Beat DatePicker scoped min-height: 3.25rem */
    min-height: var(--cal-ctrl-h) !important;
    height: var(--cal-ctrl-h) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 0.65rem !important;
    border-radius: var(--cal-ctrl-r) !important;
    border-color: var(--line-strong);
    background: var(--cal-ctrl-bg);
    font-size: var(--cal-ctrl-fs) !important;
    gap: 0.4rem;
    overflow: hidden;
    box-shadow: none;
}

.cal-toolbar .dp-value {
    flex: 1 1 auto;
    min-width: 0;
    font-size: var(--cal-ctrl-fs);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-toolbar .dp-icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.cal-toolbar .dp-icon svg {
    width: 1rem;
    height: 1rem;
}

.cal-toolbar .app-select.admin-select,
.cal-toolbar .admin-select {
    min-width: 9.75rem;
    width: 9.75rem;
    flex: 0 0 9.75rem;
    margin: 0;
}

.cal-toolbar > .btn.cal-tool-btn,
.cal-toolbar > a.btn.cal-tool-btn,
.cal-toolbar-end > .btn.cal-tool-btn,
.cal-toolbar-end > a.btn.cal-tool-btn {
    flex: 0 0 auto;
    min-width: 0;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
}

.cal-toolbar .app-select-trigger {
    min-height: var(--cal-ctrl-h) !important;
    height: var(--cal-ctrl-h) !important;
    padding: 0 0.75rem;
    border-radius: var(--cal-ctrl-r);
    border-color: var(--line-strong);
    background: var(--cal-ctrl-bg);
    font-size: var(--cal-ctrl-fs);
    font-weight: 600;
}

.cal-focus-barber {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0 0.7rem;
    border: 1px solid var(--line-strong);
    background: var(--cal-ctrl-bg);
    color: var(--text);
    white-space: nowrap;
}

.cal-focus-barber img {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 6px;
    object-fit: cover;
}

.month-appt {
    appearance: none;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.15rem 0.35rem;
    border: 0;
    border-radius: 6px;
    background: rgba(201, 133, 58, 0.18);
    color: var(--text);
    font: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.month-appt:hover {
    background: rgba(201, 133, 58, 0.3);
}

.month-appt-who::before {
    content: " ";
}

.week-cal .team-cal-col-head {
    min-width: 140px;
}

.week-cal .team-cal-head,
.week-cal .team-cal-body {
    min-width: calc(var(--cal-gutter) + 7 * 160px);
    grid-template-columns: var(--cal-gutter) repeat(7, minmax(160px, 1fr));
}

.week-day-head {
    appearance: none;
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.week-day-head.is-today strong {
    color: #e2b16a;
}

.month-cal {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    overflow: hidden;
}

.month-cal-head,
.month-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.month-cal-head {
    border-bottom: 1px solid var(--line);
    background: #12141a;
}

.month-cal-head > div {
    padding: 0.75rem 0.5rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
}

.month-cal-cell {
    appearance: none;
    min-height: 5.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.65rem 0.7rem;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.month-cal-cell:nth-child(7n) {
    border-right: 0;
}

.month-cal-cell:hover {
    background: rgba(255, 255, 255, 0.03);
}

.month-cal-cell.is-outside {
    opacity: 0.35;
}

.month-cal-cell.is-today .month-day-num {
    color: #e2b16a;
}

.month-cal-cell.is-selected {
    background: rgba(201, 133, 58, 0.1);
}

.month-day-num {
    font-size: 0.95rem;
    font-weight: 600;
}

.month-day-meta {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.25rem;
    width: 100%;
}

.month-barber-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.12rem 0.35rem;
    border-radius: 7px;
    background: var(--cal-accent-soft, rgba(201, 133, 58, 0.2));
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.2;
}

.month-barber-chip i {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: var(--cal-accent, var(--accent));
    flex-shrink: 0;
}

.month-barber-chip em {
    margin-left: auto;
    font-style: normal;
    color: var(--muted);
    font-weight: 600;
}

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin: 0 0 0.85rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #12141a;
}

.cal-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 550;
}

.cal-legend-item i {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 4px;
    background: var(--cal-accent, var(--accent));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.month-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: rgba(201, 133, 58, 0.28);
    color: var(--text);
    font-size: 0.72rem;
}

.month-pill.is-block {
    background: rgba(120, 118, 110, 0.45);
    color: var(--muted);
}

.month-count {
    display: none;
}

/* Availability / working hours */
.avail-page {
    max-width: 920px;
}

.avail-layout {
    display: grid;
    gap: 1.25rem;
}

.avail-section-head {
    margin-bottom: 1rem;
}

.avail-section-head h2 {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
}

.avail-week-list {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 1rem;
    position: relative;
}

.avail-day-row {
    display: grid;
    grid-template-columns: minmax(9.5rem, 11rem) 1fr;
    align-items: center;
    gap: 0.75rem 1rem;
    min-height: 3.4rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #12141a;
    position: relative;
    z-index: 1;
}

/* Open time pickers must stack above the next day rows. */
.avail-day-row:has(.app-select.is-open) {
    z-index: 30;
}

.avail-day-row.is-off {
    opacity: 0.7;
    background: #101218;
}

.avail-day-toggle {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    min-width: 0;
}

.avail-day-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.avail-day-times {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem 0.55rem;
    justify-content: flex-start;
    min-width: 0;
    /* overflow-x:auto would clip AppSelect menus and force a row scrollbar. */
    overflow: visible;
    padding-bottom: 0.1rem;
}

.avail-day-times .app-select {
    overflow: visible;
}

.avail-day-off {
    font-size: 0.9rem;
}

.avail-time.app-select.compact,
.avail-day-times .app-select.compact {
    min-width: 3.4rem;
}

.block-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.block-mode {
    display: inline-grid;
    grid-template-columns: repeat(2, auto);
    padding: 0.18rem;
    margin-bottom: 1rem;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #0d0f14;
}

.block-mode-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.45rem 0.95rem;
    border-radius: 9px;
    cursor: pointer;
}

.block-mode-btn.is-active {
    background: var(--accent);
    color: #140f0a;
    font-weight: 650;
}

.avail-block-form {
    margin-bottom: 1.35rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid var(--line);
}

.avail-block-form .panel-actions {
    margin-top: 0.35rem;
}

.reason-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.35rem 0 0.55rem;
}

.reason-chip {
    appearance: none;
    border: 1px solid var(--line);
    background: #12141a;
    color: var(--muted);
    font: inherit;
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
}

.reason-chip.is-active {
    border-color: rgba(201, 133, 58, 0.55);
    background: rgba(201, 133, 58, 0.18);
    color: var(--text);
}

.reason-input {
    width: 100%;
}

.avail-blocks-list-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.15rem;
}

.avail-blocks-list-head h3 {
    margin: 0;
    font-size: 1rem;
}

.text-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--accent-2);
    font-size: 0.88rem;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.avail-date {
    max-width: 18rem;
}

.team-cal {
    --cal-hour-h: 72px;
    --cal-hours: 10;
    --cal-cols: 3;
    --cal-gutter: 3.25rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    overflow: hidden;
}

.team-cal-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 133, 58, 0.5) transparent;
}

.team-cal-scroll::-webkit-scrollbar {
    height: 6px;
}

.team-cal-scroll::-webkit-scrollbar-thumb {
    background: rgba(201, 133, 58, 0.45);
    border-radius: 999px;
}

.team-cal-head,
.team-cal-body {
    display: grid;
    grid-template-columns: var(--cal-gutter) repeat(var(--cal-cols), minmax(168px, 1fr));
    min-width: calc(var(--cal-gutter) + var(--cal-cols) * 168px);
}

.team-cal-head {
    position: sticky;
    top: 0;
    z-index: 3;
    border-bottom: 1px solid var(--line);
    background: #12141a;
}

.team-cal-corner {
    border-right: 1px solid var(--line);
    background: #12141a;
}

.team-cal-col-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    min-height: 3.6rem;
    padding: 0.7rem 0.85rem;
    border-right: 1px solid var(--line);
}

.team-cal-col-head:last-child {
    border-right: 0;
}

.team-cal-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    object-position: center 20%;
    border: 1px solid var(--line);
    background: #15171b;
    flex-shrink: 0;
}

.team-cal-col-meta {
    min-width: 0;
    display: grid;
    gap: 0.12rem;
    line-height: 1.2;
}

.team-cal-col-meta strong {
    font-size: 0.92rem;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-cal-col-meta span {
    color: var(--muted);
    font-size: 0.76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-cal-body {
    position: relative;
    align-items: stretch;
}

.team-cal-gutter {
    position: relative;
    border-right: 1px solid var(--line);
    background: #101218;
}

.team-cal-hour-label {
    height: var(--cal-hour-h);
    padding: 0.15rem 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
    line-height: 1;
    box-sizing: border-box;
    transform: translateY(-0.35em);
}

.team-cal-hour-label:first-child {
    transform: none;
    padding-top: 0.35rem;
}

.team-cal-col {
    position: relative;
    height: calc(var(--cal-hour-h) * var(--cal-hours));
    border-right: 1px solid var(--line);
    background-color: #151820;
    background-image:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent calc(var(--cal-hour-h) - 1px),
            rgba(255, 255, 255, 0.09) calc(var(--cal-hour-h) - 1px),
            rgba(255, 255, 255, 0.09) var(--cal-hour-h)
        );
}

.team-cal-col:last-child {
    border-right: 0;
}

.team-cal-hour-line {
    height: var(--cal-hour-h);
    pointer-events: none;
}

.cal-now-line {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 6;
    height: 0;
    border-top: 2px solid #e25555;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(226, 85, 85, 0.35);
}

.cal-now-line::before {
    content: "";
    position: absolute;
    left: -0.28rem;
    top: -0.34rem;
    width: 0.68rem;
    height: 0.68rem;
    border-radius: 50%;
    background: #e25555;
    box-shadow: 0 0 0 3px rgba(226, 85, 85, 0.22);
}

.cal-now-badge {
    position: absolute;
    left: 0.45rem;
    top: -0.85rem;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    background: #e25555;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    line-height: 1.2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* Day view: horizontal timeline (time left → right, barbers as rows) */
.day-tl {
    --day-tl-label-w: 10.5rem;
    --day-tl-hours: 10;
    --day-tl-row-h: 92px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    overflow: hidden;
}

.day-tl-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: min(70vh, 44rem);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 133, 58, 0.5) transparent;
}

.cal-view-panel.day-tl,
.cal-view-panel.team-cal,
.cal-view-panel.month-cal {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.day-tl-hours,
.day-tl-row {
    display: grid;
    grid-template-columns: var(--day-tl-label-w) minmax(0, 1fr);
    width: 100%;
    min-width: 0;
}

.day-tl-hours {
    position: sticky;
    top: 0;
    z-index: 4;
    border-bottom: 1px solid var(--line);
    background: #12141a;
}

.day-tl-corner {
    border-right: 1px solid var(--line);
    background: #12141a;
}

.day-tl-hours-track,
.day-tl-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--day-tl-hours), minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    min-height: 2.4rem;
}

.day-tl-hour-label {
    padding: 0.65rem 0.35rem 0.55rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    text-align: left;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.day-tl-row {
    border-bottom: 1px solid var(--line);
}

.day-tl-row:last-child {
    border-bottom: 0;
}

.day-tl-label {
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    min-height: var(--day-tl-row-h);
    padding: 0.65rem 0.75rem;
    border-right: 1px solid var(--line);
    background: #12141a;
}

.day-tl-label strong {
    min-width: 0;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-tl-track {
    min-height: var(--day-tl-row-h);
    height: var(--day-tl-row-h);
    background-color: #151820;
    cursor: crosshair;
}

.day-tl-hour-slot {
    position: relative;
    z-index: 0;
    height: 100%;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: crosshair;
}

.day-tl-hour-slot:last-child {
    border-right: 0;
}

.day-tl-abs {
    position: absolute;
    right: auto;
    z-index: 2;
    box-sizing: border-box;
}

.day-tl-abs.cal-closed {
    top: 0 !important;
    bottom: 0 !important;
}

.day-tl-abs.cal-block {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.45rem;
}

.day-tl-abs.cal-event {
    border-left-width: 3px;
    border-top: 1px solid rgba(226, 177, 106, 0.5);
    padding: 0.28rem 0.4rem;
    gap: 0;
    align-content: center;
    min-width: 2.4rem;
}

.day-tl-abs.cal-event .cal-event-time {
    display: block;
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    color: var(--accent-2, #e2b16a);
    white-space: nowrap;
}

.day-tl-abs.cal-event strong {
    font-size: 0.78rem;
}

/* Overlapping bookings are stacked, so each one gets a single line */
.day-tl-abs.cal-event.is-compact {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.4rem;
}

.day-tl-abs.cal-event.is-compact .cal-event-time {
    flex: 0 0 auto;
}

.day-tl-abs.cal-event.is-compact strong {
    min-width: 0;
}

.day-tl-abs.cal-event.is-compact span {
    display: none;
}

.day-tl-abs.cal-event:hover,
.day-tl-abs.cal-event:focus-visible {
    z-index: 5;
    overflow: visible;
    min-width: max-content;
    max-width: 16rem;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}

/* Mobile-first agenda (hidden on desktop, replaces the timeline on small screens) */
.day-agenda {
    display: none;
}

.day-agenda-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    overflow: hidden;
}

.day-agenda-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 0.9rem;
    background: #12141a;
    border-bottom: 1px solid var(--line);
}

.day-agenda-head .team-cal-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
}

.day-agenda-who {
    display: grid;
    min-width: 0;
    flex: 1 1 auto;
    gap: 0.1rem;
}

.day-agenda-who strong {
    font-size: 1rem;
    line-height: 1.2;
}

.day-agenda-who .muted {
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.day-agenda-count {
    flex: 0 0 auto;
    min-width: 1.9rem;
    height: 1.9rem;
    padding: 0 0.5rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(201, 133, 58, 0.16);
    color: var(--accent-2, #e2b16a);
    font-size: 0.85rem;
    font-weight: 700;
}

/* Per-barber time strip inside each mobile card */
.day-strip {
    padding: 0.6rem 0.6rem 0.2rem;
    min-width: 0;
}

.day-strip-hours {
    min-height: 0;
    border-bottom: 1px solid var(--line);
}

.day-strip-hours .day-tl-hour-label {
    padding: 0.15rem 0 0.3rem 0.2rem;
    font-size: 0.66rem;
    border-right: 0;
}

.day-strip-track {
    --day-tl-row-h: 64px;
    min-height: 64px;
    height: 64px;
    cursor: default;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.day-strip-track .day-tl-hour-slot {
    cursor: default;
}

.day-strip-block {
    appearance: none;
    padding: 0;
    cursor: pointer;
}

.day-strip-event.day-tl-abs.cal-event {
    appearance: none;
    min-width: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.day-strip-event.day-tl-abs.cal-event.is-compact {
    padding: 0 0.2rem;
    gap: 0;
}

.day-strip-event .cal-event-time {
    font-size: 0.6rem;
    overflow: hidden;
    text-overflow: clip;
}

.day-strip-event.day-tl-abs.cal-event:hover,
.day-strip-event.day-tl-abs.cal-event:focus-visible {
    overflow: hidden;
    min-width: 0;
    max-width: none;
    box-shadow: none;
}

.day-agenda-empty {
    margin: 0;
    padding: 1rem 0.9rem;
    font-size: 0.92rem;
}

.day-agenda-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    display: grid;
    gap: 0.45rem;
}

.day-agenda-item {
    appearance: none;
    width: 100%;
    display: grid;
    grid-template-columns: 4.1rem minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    min-height: 3.4rem;
    padding: 0.55rem 0.7rem;
    text-align: left;
    color: #f6f1e8;
    font: inherit;
    cursor: pointer;
    border: 1px solid rgba(226, 177, 106, 0.4);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    background: #2c241a;
}

.day-agenda-item:active {
    background: #342a1d;
}

.day-agenda-item.is-block {
    border: 1px dashed rgba(183, 176, 164, 0.4);
    border-left: 4px solid rgba(183, 176, 164, 0.5);
    background: #2a2c32;
    color: var(--muted);
}

.day-agenda-item.status-completed {
    border-left-color: #8fbf8a;
}

.day-agenda-item.status-noshow {
    border-left-color: var(--danger);
}

.day-agenda-time {
    display: grid;
    gap: 0.05rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.day-agenda-time b {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-2, #e2b16a);
}

.day-agenda-time i {
    font-style: normal;
    font-size: 0.78rem;
    color: var(--muted);
}

.day-agenda-body {
    display: grid;
    min-width: 0;
    gap: 0.1rem;
}

.day-agenda-body strong {
    font-size: 0.98rem;
    font-weight: 650;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-agenda-body span {
    font-size: 0.82rem;
    color: rgba(243, 239, 230, 0.72);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-agenda-item.is-block .day-agenda-body span {
    color: var(--muted);
}

@media (max-width: 900px) {
    .cal-toolbar-end > .btn.cal-tool-btn,
    .cal-toolbar-end > a.btn.cal-tool-btn {
        flex: 1 1 calc(50% - 0.3rem);
        justify-content: center;
        text-align: center;
    }

    .day-tl {
        display: none;
    }

    .day-agenda {
        display: grid;
        gap: 0.85rem;
        width: 100%;
        min-width: 0;
    }
}

/* Confirmation dialog (cancel / delete) */
.cal-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(3, 4, 6, 0.82);
    backdrop-filter: blur(8px);
    animation: cal-confirm-fade 0.16s ease both;
}

.cal-confirm {
    width: min(100%, 25rem);
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    padding: 1.5rem 1.35rem 1.25rem;
    text-align: center;
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: #14161c;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    animation: cal-confirm-pop 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cal-confirm h3 {
    margin: 0;
    font-size: 1.2rem;
}

.cal-confirm-icon {
    width: 2.9rem;
    height: 2.9rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 800;
}

.cal-confirm-icon.is-cancel {
    background: rgba(226, 177, 106, 0.16);
    color: var(--accent-2, #e2b16a);
}

.cal-confirm-icon.is-delete {
    background: rgba(212, 92, 74, 0.18);
    color: var(--danger);
}

.cal-confirm-summary {
    margin: 0;
    padding: 0.7rem 0.9rem;
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.92rem;
    line-height: 1.45;
}

.cal-confirm-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.cal-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    width: 100%;
    margin-top: 0.3rem;
}

.cal-confirm-actions .btn {
    min-height: 2.9rem;
    justify-content: center;
    white-space: nowrap;
}

.btn.btn-danger {
    background: var(--danger);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
}

.btn.btn-danger:hover:not(:disabled) {
    filter: brightness(1.1);
}

@keyframes cal-confirm-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes cal-confirm-pop {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 420px) {
    .cal-confirm-actions {
        grid-template-columns: 1fr;
    }

    .cal-confirm-actions .btn-danger {
        order: -1;
    }
}

.day-tl-now {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 6;
    width: 0;
    border-left: 2px solid #e25555;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(226, 85, 85, 0.35);
}

.day-tl-now::before {
    content: "";
    position: absolute;
    top: -0.2rem;
    left: -0.34rem;
    width: 0.68rem;
    height: 0.68rem;
    border-radius: 50%;
    background: #e25555;
    box-shadow: 0 0 0 3px rgba(226, 85, 85, 0.22);
}

.day-tl-now-row::before {
    display: none;
}

.day-tl-now-badge {
    position: absolute;
    top: 0.35rem;
    left: 0.45rem;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    background: #e25555;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.cal-closed {
    position: absolute;
    left: 0;
    right: 0;
    background-color: rgba(8, 9, 12, 0.55);
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 7px,
        rgba(255, 255, 255, 0.025) 7px,
        rgba(255, 255, 255, 0.025) 14px
    );
    pointer-events: none;
    z-index: 1;
}

.cal-block {
    position: absolute;
    left: 0.3rem;
    right: 0.3rem;
    z-index: 2;
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
    border: 1px dashed rgba(183, 176, 164, 0.4);
    background: #2a2c32;
    color: var(--muted);
    font-size: 0.76rem;
    overflow: hidden;
    cursor: pointer;
}

.cal-block:hover {
    border-color: rgba(183, 176, 164, 0.65);
    color: var(--text);
}

.cal-event {
    position: absolute;
    z-index: 3;
    display: grid;
    align-content: start;
    gap: 0.12rem;
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
    border: 1px solid rgba(226, 177, 106, 0.5);
    border-left: 3px solid var(--accent);
    background: #2c241a;
    color: #f6f1e8;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.cal-event strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-event span {
    color: rgba(243, 239, 230, 0.72);
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-event:hover {
    border-color: rgba(226, 177, 106, 0.85);
    background: #342a1d;
}

.cal-event.is-cancelled,
.cal-event.status-cancelled {
    opacity: 0.4;
    border-style: dashed;
    border-left-style: solid;
    background: #22252c;
    color: var(--muted);
}

.cal-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(5, 6, 8, 0.72);
    backdrop-filter: blur(6px);
    overflow: auto;
}

.cal-detail {
    margin-top: 1rem;
    max-width: 520px;
}

.cal-detail.cal-dialog {
    margin: 0;
    width: min(100%, 34rem);
    max-width: 34rem;
    max-height: min(90vh, 44rem);
    overflow: auto;
    box-shadow: var(--shadow);
}

.cal-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}

.cal-detail-head h2 {
    margin: 0;
    font-size: 1.25rem;
}

.cal-detail-list {
    display: grid;
    gap: 0.65rem;
    margin: 0 0 1rem;
}

.cal-detail-list div {
    display: grid;
    gap: 0.15rem;
}

.cal-detail-list dt {
    color: var(--muted);
    font-size: 0.82rem;
}

.cal-detail-list dd {
    margin: 0;
}

/* Identity pages */
.account-page,
.content {
    max-width: 480px;
    margin: 3rem auto;
    padding: 0 1.25rem;
}

.section.account-page {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 2.5rem;
    padding-bottom: 3rem;
    width: 100%;
}

.privacy-page .section-head {
    max-width: 44rem;
}

.site-content-form {
    max-width: 32rem;
    display: grid;
    gap: 1rem;
}

.site-content-form .field-hint {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
}

.site-content-preview {
    display: grid;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.site-content-preview > .muted:first-child {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-content-preview p {
    margin: 0;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.cookie-note {
    flex-basis: 100%;
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.85rem;
}

.cookie-note a,
.cookie-note-btn {
    margin: 0;
    min-height: auto;
    padding: 0.15rem 0;
    font-size: inherit;
}

.privacy-body {
    max-width: 44rem;
    display: grid;
    gap: 0.5rem;
}

.privacy-updated {
    margin-top: 0.35rem;
}

.privacy-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    margin: 0.25rem 0 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.privacy-toc a {
    min-height: auto;
    padding: 0.2rem 0;
    font-size: 0.95rem;
    color: var(--accent-2);
}

.privacy-body h2 {
    margin-top: 1.25rem;
    font-size: 1.2rem;
    scroll-margin-top: 5rem;
}

.privacy-body h3 {
    margin: 0.85rem 0 0.25rem;
    font-size: 1.05rem;
}

.privacy-body ul {
    margin: 0.25rem 0 0.5rem;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.35rem;
}

.privacy-table-wrap {
    overflow-x: auto;
    margin: 0.5rem 0 0.75rem;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.privacy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.privacy-table th,
.privacy-table td {
    padding: 0.7rem 0.85rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

.privacy-table th {
    background: var(--surface);
    color: var(--muted);
    font-weight: 650;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.privacy-table tr:last-child td {
    border-bottom: 0;
}

.privacy-table code {
    font-size: 0.88em;
    color: var(--accent-2);
}

/* Cookie consent banner — necessary-cookies notice (ePrivacy / BDAR transparency) */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, transparent, rgba(5, 6, 8, 0.72) 28%, rgba(5, 6, 8, 0.92));
    pointer-events: none;
    animation: fadeUp 220ms ease both;
}

.cookie-banner-inner {
    pointer-events: auto;
    display: grid;
    gap: 1rem;
    max-width: 52rem;
    margin: 0 auto;
    padding: 1.1rem 1.2rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #141820;
    box-shadow: var(--shadow);
}

.cookie-banner-title {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
}

.cookie-banner-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.45;
}

.cookie-banner-text a {
    color: var(--accent-2);
    min-height: auto;
    padding: 0;
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
    align-items: center;
}

.cookie-banner-actions .btn {
    min-height: 2.75rem;
    padding-inline: 1rem;
}

.cookie-prefs-overlay {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(5, 6, 8, 0.72);
    backdrop-filter: blur(6px);
    animation: fadeUp 160ms ease both;
}

.cookie-prefs {
    box-sizing: border-box;
    width: min(100%, 420px);
    padding: 1.15rem 1.2rem 1.25rem;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: #141820;
    box-shadow: var(--shadow);
    animation: rise 200ms ease both;
}

.cookie-prefs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.cookie-prefs-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.cookie-prefs-close {
    box-sizing: border-box;
    width: 2.4rem;
    height: 2.4rem;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.cookie-prefs-lead {
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.cookie-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.cookie-cat {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.cookie-cat-text {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.cookie-cat-text span {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-cat-state {
    flex-shrink: 0;
    margin-top: 0.15rem;
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.cookie-cat-state.is-on {
    color: var(--accent-2);
}

.cookie-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-top: 0.1rem;
    cursor: pointer;
}

.cookie-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.cookie-switch-ui {
    width: 2.75rem;
    height: 1.55rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #2a3038;
    transition: background 160ms ease, border-color 160ms ease;
}

.cookie-switch-ui::after {
    content: "";
    display: block;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0.15rem;
    border-radius: 50%;
    background: #d7d2c8;
    transition: transform 160ms ease, background 160ms ease;
}

.cookie-switch input:checked + .cookie-switch-ui {
    background: rgba(201, 133, 58, 0.35);
    border-color: var(--accent);
}

.cookie-switch input:checked + .cookie-switch-ui::after {
    transform: translateX(1.15rem);
    background: var(--accent-2);
}

.cookie-switch input:focus-visible + .cookie-switch-ui {
    box-shadow: 0 0 0 3px rgba(201, 133, 58, 0.28);
}

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

.cookie-prefs-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 1.15rem;
}

.cookie-prefs-lead a {
    color: var(--accent-2);
    min-height: auto;
    padding: 0;
}

@media (min-width: 720px) {
    .cookie-banner-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }
}

@media (max-width: 640px) {
    .cookie-prefs-overlay {
        place-items: end center;
        padding: 0;
    }

    .cookie-prefs {
        width: 100%;
        border-radius: 20px 20px 0 0;
        padding-bottom: calc(1.15rem + env(safe-area-inset-bottom));
    }

    .cookie-banner-actions {
        justify-content: stretch;
    }

    .cookie-banner-actions .btn {
        flex: 1 1 auto;
    }
}

.consent .day-check {
    align-items: flex-start;
}

.consent .day-check span {
    color: var(--text);
}

.account-page a,
.account-foot-link a,
.privacy-body a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.15rem 0;
}

.privacy-body a[href^="mailto:"] {
    word-break: break-all;
}

#blazor-error-ui {
    background: #8b1e1e;
    bottom: 0;
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.3);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #fff;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

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

    .hero {
        grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.75fr);
        align-items: center;
    }

    .hero-visual {
        min-height: 360px;
    }

    .admin-main {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

@media (max-width: 1100px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        align-items: start;
        gap: 1.5rem;
    }

    /* Purely decorative, and as a stacked block it reads as a dead empty panel */
    .hero-visual {
        display: none;
    }

    .cal-toolbar {
        width: 100%;
    }
}

@media (max-width: 960px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        align-items: start;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-side {
        position: sticky;
        top: 0;
        z-index: 50;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand logout"
            "nav nav";
        align-items: center;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 0.65rem 0;
        padding-top: calc(0.65rem + env(safe-area-inset-top));
        gap: 0.45rem 0;
        background: rgba(9, 10, 12, 0.96);
        backdrop-filter: blur(10px);
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .admin-side-brand {
        grid-area: brand;
        display: flex;
        align-items: baseline;
        gap: 0.65rem;
        min-width: 0;
        padding-left: 0.85rem;
    }

    .admin-side .brand.compact {
        font-size: 1.05rem;
    }

    .admin-side .side-label {
        margin: 0;
        font-size: 0.68rem;
    }

    .admin-nav-scroll {
        display: block;
        grid-area: nav;
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
        scrollbar-width: thin;
        scrollbar-color: rgba(201, 133, 58, 0.55) transparent;
        padding: 0.1rem 0.85rem 0.45rem;
        /* Soft edge so it's obvious more tabs sit to the right */
        mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 1.75rem), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 1.75rem), transparent 100%);
    }

    .admin-nav-scroll::-webkit-scrollbar {
        height: 3px;
    }

    .admin-nav-scroll::-webkit-scrollbar-thumb {
        background: rgba(201, 133, 58, 0.45);
        border-radius: 999px;
    }

    .admin-side nav {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.35rem;
        width: max-content;
        min-width: 100%;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    .admin-side a,
    .admin-side .nav-link {
        flex: 0 0 auto;
        white-space: nowrap;
        min-height: 2.35rem;
        padding: 0.45rem 0.8rem;
        font-size: 0.88rem;
        border: 1px solid transparent;
    }

    .admin-side a.active {
        border-color: rgba(201, 133, 58, 0.35);
        background: rgba(201, 133, 58, 0.12);
        color: var(--text);
    }

    .side-logout {
        grid-area: logout;
        margin-top: 0;
        padding-top: 0;
        padding-right: 0.85rem;
        justify-self: end;
    }

    .side-logout button {
        min-height: 2.35rem;
        padding: 0.45rem 0.75rem;
        font-size: 0.88rem;
        width: auto;
    }

    .admin-main {
        padding: 1.1rem 1rem 1.5rem;
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
        min-width: 0;
    }

    .admin-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
        margin-bottom: 1.1rem;
    }

    .admin-actions {
        width: 100%;
        gap: 0.5rem;
    }

    .admin-header > select,
    .admin-select,
    .app-select.admin-select {
        min-width: 0;
        width: 100%;
        flex: 1 1 100%;
    }

    .booking-row,
    .booking-row.row-service {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        align-items: start;
    }

    /* Direct children only: the service row keeps duration/price/status inline in .svc-meta */
    .booking-row > .meta-cell,
    .booking-row > .status,
    .booking-row > .row-actions {
        width: 100%;
    }

    .row-actions {
        justify-content: flex-start;
    }

    .staff-card {
        grid-template-columns: 96px 1fr;
    }

    .staff-grid {
        grid-template-columns: 1fr;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .cal-page {
        max-width: none;
    }

    .cal-toolbar {
        width: 100%;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0.55rem;
        overflow: visible;
    }

    .cal-view-toggle {
        width: 100%;
        flex: 0 0 auto;
        grid-template-columns: repeat(3, 1fr);
    }

    .cal-view-btn {
        text-align: center;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .cal-nav {
        width: 100%;
        min-width: 0;
        flex: 0 0 auto;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .cal-nav-pager {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
    }

    .cal-nav-date {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
    }

    .cal-nav-today {
        flex: 0 0 auto;
        width: auto;
    }

    .cal-toolbar-end {
        width: 100%;
        margin-left: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .cal-toolbar .app-select.admin-select,
    .cal-toolbar .admin-select {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
    }

    .cal-focus-barber {
        width: 100%;
    }

    .cal-toolbar-end > .btn,
    .cal-toolbar-end > a.btn {
        flex: 1 1 calc(50% - 0.3rem);
        text-align: center;
        justify-content: center;
    }

    .team-cal {
        --cal-gutter: 2.75rem;
        border-radius: 14px;
    }

    .day-tl {
        --day-tl-label-w: 7.5rem;
        --day-tl-row-h: 78px;
        border-radius: 14px;
    }

    .day-tl-label {
        padding: 0.5rem 0.55rem;
        gap: 0.45rem;
    }

    .day-tl-label .team-cal-avatar {
        width: 28px;
        height: 28px;
    }

    .day-tl-label strong {
        font-size: 0.8rem;
    }

    .month-cal {
        border-radius: 14px;
    }

    .team-cal-scroll {
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    /* One readable column at a time; swipe for the rest */
    .team-cal-col-head,
    .team-cal-col {
        min-width: min(16.5rem, 78vw);
    }

    .team-cal-head,
    .team-cal-body {
        grid-template-columns: var(--cal-gutter) repeat(var(--cal-cols), minmax(min(16.5rem, 78vw), 1fr));
        min-width: calc(var(--cal-gutter) + var(--cal-cols) * min(16.5rem, 78vw));
    }

    .week-cal .team-cal-col-head,
    .week-cal .team-cal-col {
        min-width: min(11.5rem, 72vw);
    }

    .week-cal .team-cal-head,
    .week-cal .team-cal-body {
        min-width: calc(var(--cal-gutter) + 7 * min(11.5rem, 72vw));
        grid-template-columns: var(--cal-gutter) repeat(7, minmax(min(11.5rem, 72vw), 1fr));
    }

    .team-cal-hour-label {
        font-size: 0.72rem;
        padding-right: 0.35rem;
    }

    .cal-event strong {
        font-size: 0.78rem;
    }

    .cal-event span {
        font-size: 0.7rem;
    }

    .cal-dialog-overlay {
        padding: 0.75rem;
        place-items: center;
    }

    .cal-detail.cal-dialog {
        width: 100%;
        max-width: none;
        max-height: min(88vh, 40rem);
        border-radius: 18px;
    }

    .cal-detail-head {
        flex-wrap: wrap;
    }

    .block-quick {
        width: 100%;
    }

    .block-quick .btn {
        flex: 1 1 auto;
        min-height: 2.6rem;
    }

    .block-mode {
        width: 100%;
        grid-template-columns: 1fr 1fr;
    }

    .block-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.55rem;
    }

    .avail-blocks-list-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .avail-day-times {
        width: 100%;
    }

    .panel {
        padding: 1rem;
    }

    .panel-actions {
        flex-wrap: wrap;
    }

    .panel-actions .btn {
        min-height: 2.75rem;
    }

    .svc-meta {
        width: 100%;
    }

    .staff-photo-actions {
        flex-wrap: wrap;
    }

    .staff-photo-actions .hint {
        width: 100%;
    }

    .toast-host {
        left: 0.75rem;
        right: 0.75rem;
        bottom: calc(0.75rem + env(safe-area-inset-bottom));
        width: auto;
    }
}

@media (max-width: 800px) {
    .site-nav {
        gap: 0.45rem 0.85rem;
    }

    .site-nav a:not(.nav-cta),
    .site-nav .link-btn {
        font-size: 0.95rem;
    }

    /* Four steps no longer fit on one line; let them swipe */
    .steps {
        flex-wrap: nowrap;
        gap: 0.4rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-inline: -0.15rem;
        padding-bottom: 0.2rem;
    }

    .steps::-webkit-scrollbar {
        display: none;
    }

    .steps li {
        flex: 0 0 auto;
    }

    .service-row {
        align-items: flex-start;
    }

    .selected-chip {
        width: 100%;
        max-width: 100%;
        border-radius: 16px;
    }

    .admin-header h1 {
        font-size: clamp(1.35rem, 4vw, 1.75rem);
    }
}

@media (max-width: 720px) {
    .avail-day-row {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 0.55rem;
    }

    .staff-grid {
        grid-template-columns: 1fr;
    }

    .staff-card {
        grid-template-columns: 7rem minmax(0, 1fr);
    }

    .privacy-body,
    .book-flow,
    .avail-page {
        max-width: none;
    }
}

@media (max-width: 640px) {
    /* Brand + booking CTA on the first row, the rest swipes underneath so staff
       can still reach Studija and Atsijungti from a phone. */
    .site-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand cta"
            "nav nav";
        align-items: center;
        gap: 0.35rem 0.75rem;
        padding: 0.5rem 1.1rem;
        padding-top: calc(0.5rem + env(safe-area-inset-top));
    }

    .site-header .brand {
        grid-area: brand;
    }

    .site-header .nav-cta {
        grid-area: cta;
    }

    .site-nav-scroll {
        grid-area: nav;
        margin-left: 0;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
        scrollbar-width: none;
        margin-inline: -1.1rem;
        padding: 0 1.1rem 0.15rem;
    }

    .site-nav-scroll::-webkit-scrollbar {
        display: none;
    }

    .site-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 1rem;
        width: max-content;
        min-width: 100%;
    }

    .site-nav a,
    .site-nav .link-btn {
        min-height: 2.5rem;
        white-space: nowrap;
        font-size: 0.95rem;
    }

    .brand {
        font-size: 1.05rem;
    }

    .staff-card {
        grid-template-columns: 1fr;
        justify-items: stretch;
        gap: 0.85rem;
    }

    .staff-photo {
        width: 100%;
        max-width: none;
        aspect-ratio: 4 / 5;
        max-height: 240px;
    }

    .staff-body {
        width: 100%;
    }

    .staff-meta strong,
    .staff-meta span {
        white-space: normal;
    }

    .row-actions {
        justify-content: flex-start;
    }

    .file-btn {
        white-space: normal;
    }

    .cal-page .admin-actions {
        width: 100%;
    }

    .team-cal {
        --cal-gutter: 2.35rem;
    }

    .team-cal-col-head {
        min-height: 3.1rem;
        padding: 0.55rem 0.55rem;
        gap: 0.45rem;
    }

    .team-cal-avatar {
        width: 28px;
        height: 28px;
    }

    .month-cal-head > div {
        padding: 0.5rem 0.15rem;
        font-size: 0.72rem;
    }

    .month-cal-cell {
        min-height: 4.6rem;
        padding: 0.4rem 0.3rem;
        gap: 0.3rem;
    }

    .month-day-num {
        font-size: 0.82rem;
    }

    /* Keep appointment chips tappable on phones (open dialog directly) */
    .month-appt {
        display: block;
        font-size: 0.68rem;
        padding: 0.18rem 0.28rem;
        text-align: center;
    }

    .month-appt-who {
        display: none;
    }

    .month-pill.month-more {
        display: none;
    }

    .month-count {
        display: none;
    }

    .month-day-meta {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0.18rem;
        width: 100%;
        min-width: 0;
    }

    .cal-toolbar > .btn,
    .cal-toolbar > a.btn {
        flex: 1 1 calc(50% - 0.3rem);
    }

    .admin-page > .admin-header h1 {
        font-size: 1.45rem;
    }

    .admin-page > .admin-header .muted {
        font-size: 0.9rem;
    }

    .avail-page {
        max-width: none;
    }

    .lunch-check {
        align-items: flex-start;
    }

    .reason-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .reason-chip {
        min-height: 2.4rem;
    }

    .brand-hero {
        letter-spacing: 0.03em;
    }

    .lede {
        font-size: 1.05rem;
    }

    .section {
        padding: 2.5rem 1.1rem;
    }

    .section-head {
        margin-bottom: 1.5rem;
    }

    .steps {
        gap: 0.4rem;
        margin-bottom: 1.5rem;
        flex-wrap: nowrap;
    }

    .steps li {
        min-width: 0;
    }

    .step-pill {
        min-height: 2.5rem;
        padding: 0.4rem 0.7rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .step-pill.done::before {
        content: none;
    }

    .barber-photo img {
        object-position: center 20%;
    }

    .hero {
        padding: 1.5rem 1.1rem 2.5rem;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .btn {
        flex: 1 1 100%;
    }

    .slot-grid {
        grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
        gap: 0.55rem;
        max-width: none;
    }

    .details-form,
    .admin-form {
        max-width: none;
    }

    /* Summary of the booking so far: a pill can't hold this much text on a phone */
    .selected-chip {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem 0.75rem;
        width: 100%;
        border-radius: 16px;
        padding: 0.85rem 1rem;
        font-size: 1rem;
    }

    .selected-chip > span {
        flex: 1 1 auto;
        min-width: 0;
    }

    /* Keep the primary action reachable without scrolling back down */
    .form-actions {
        position: sticky;
        bottom: 0;
        z-index: 10;
        margin: 0 -0.95rem;
        padding: 0.85rem 0.95rem;
        padding-bottom: calc(0.85rem + env(safe-area-inset-bottom));
        background: linear-gradient(to top, var(--bg) 62%, rgba(11, 12, 14, 0));
    }

    .admin-main .form-actions {
        margin-left: -0.95rem;
        margin-right: -0.95rem;
    }

    .panel .form-actions {
        margin-left: -1rem;
        margin-right: -1rem;
        background: linear-gradient(to top, var(--surface) 62%, rgba(24, 27, 34, 0));
    }

    .form-actions .btn {
        min-height: 3.25rem;
        font-size: 1.08rem;
    }

    .service-row {
        padding: 0.95rem 1rem;
        gap: 0.75rem;
    }

    .summary-card,
    .confirmation {
        max-width: none;
    }

    .confirmation {
        padding: 1.5rem 1.15rem;
    }

    .confirmation-actions .btn {
        flex: 1 1 100%;
    }

    .booking-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .booking-row .time {
        font-size: 1.35rem;
    }

    .site-footer {
        padding: 2rem 1.1rem;
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
        gap: 1.15rem;
    }

    .footer-top {
        flex-direction: column;
        gap: 0.85rem;
    }

    .footer-links {
        align-items: flex-start;
        text-align: left;
    }

    .footer-map-frame {
        aspect-ratio: 16 / 10;
        min-height: 12.5rem;
        max-height: 18rem;
        border-radius: 14px;
    }

    .barbers-section {
        scroll-margin-top: 4.25rem;
    }

    /* Tall portrait cards buried the third barber; go horizontal on phones */
    .barber-grid,
    .barber-grid.compact {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .barber-pick {
        display: grid;
        grid-template-columns: 5.75rem minmax(0, 1fr);
        align-items: stretch;
        border-radius: 18px;
        overflow: hidden;
        min-height: 6.5rem;
        max-height: none;
    }

    .barber-photo {
        width: 5.75rem;
        min-height: 6.5rem;
        height: auto;
        aspect-ratio: auto;
        align-self: stretch;
        overflow: hidden;
        background: #161922;
    }

    .barber-photo img {
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
        object-position: center 18%;
        display: block;
    }

    .barber-meta {
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.2rem;
        padding: 0.75rem 1rem;
    }

    .barber-meta h3 {
        font-size: 1.1rem;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .barber-bio {
        margin: 0;
        font-size: 0.88rem;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        white-space: normal;
    }

    .pick-cta {
        padding-top: 0.35rem;
        font-size: 0.85rem;
    }

    .barber-pick:hover {
        transform: none;
    }

    .barber-pick:hover .barber-photo img {
        transform: none;
    }

    .admin-main {
        padding: 1rem 0.95rem 1.35rem;
        padding-bottom: calc(1.35rem + env(safe-area-inset-bottom));
    }

    .admin-actions {
        width: 100%;
    }

    .admin-actions > .btn,
    .admin-actions > a.btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .cal-toolbar > .btn,
    .cal-toolbar > a.btn {
        width: auto;
    }

    .admin-actions .dp {
        max-width: none;
        flex: 1;
    }

    .cal-nav .btn {
        width: auto;
        flex: 0 0 auto;
        min-width: 2.5rem;
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }
}
