:root {
    --bg: #f6f0e8;
    --panel: #fffaf5;
    --panel-strong: #fff;
    --text: #2d241d;
    --muted: #74675d;
    --accent: #c56b48;
    --accent-dark: #7f3c27;
    --line: #e8d8c7;
    --shadow: 0 20px 45px rgba(102, 65, 43, 0.12);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(197, 107, 72, 0.15), transparent 30%),
        linear-gradient(180deg, #f9f4ef 0%, var(--bg) 100%);
}

body.menu-open {
    overflow: hidden;
}

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

img {
    max-width: 100%;
    height: auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    padding: 2rem 4rem;
}

.topbar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.topbar nav form {
    margin: 0;
}

.page-shell {
    padding: 0 4rem 4rem;
}

.app-layout {
    padding-top: 0.5rem;
}

.content-column {
    min-width: 0;
}

.sidebar-card {
    display: grid;
    gap: 1.25rem;
    padding: 1.25rem;
}

.sidebar-group {
    display: grid;
    gap: 0.7rem;
}

.sidebar-links {
    display: grid;
    gap: 0.6rem;
}

.sidebar-links a,
.sidebar-links .nav-button {
    display: block;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: #f8ede1;
    border: 1px solid var(--line);
    color: var(--accent-dark);
}

.sidebar-form {
    margin: 0;
}

.sidebar-action-button {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid #e2b8ad;
    background: #fbede9;
    color: #8f3725;
    font: inherit;
    cursor: pointer;
}

.menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.82rem 1.2rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #f7e8dc 0%, #efd8c8 100%);
    border: 1px solid var(--line);
    box-shadow: 0 10px 20px rgba(127, 60, 39, 0.12);
    font-weight: 700;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45, 36, 29, 0.28);
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 40;
}

.menu-overlay-visible {
    opacity: 1;
}

.menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, 92vw);
    height: 100vh;
    padding: 1rem;
    z-index: 50;
    transform: translateX(100%);
    transition: transform 0.18s ease;
}

.menu-drawer-open {
    transform: translateX(0);
}

.menu-drawer-card {
    height: 100%;
    overflow-y: auto;
    align-content: start;
}

.menu-drawer-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.menu-close {
    padding: 0.5rem 0;
}

.site-footer {
    padding: 0 4rem 2rem;
    color: #8a8178;
    font-size: 0.92rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: #8a8178;
    text-decoration: underline;
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
    color: var(--muted);
}

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

.hero,
.grid,
.cards,
.form-grid,
.stats {
    display: grid;
    gap: 1.5rem;
}

.hero,
.card,
.flash {
    background: rgba(255, 250, 245, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 22px;
}

.hero {
    grid-template-columns: 2fr 1fr;
    padding: 2rem;
    margin-bottom: 2rem;
}

.stats {
    grid-template-columns: repeat(2, 1fr);
}

.stat {
    text-align: center;
    padding: 1.5rem;
}

.stat span {
    display: block;
    font-size: 2.4rem;
    color: var(--accent-dark);
}

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

.card {
    padding: 1.5rem;
}

.list {
    display: grid;
    gap: 1rem;
}

.list-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.1rem;
    background: var(--accent);
    color: white;
    cursor: pointer;
    font: inherit;
}

.button,
.nav-button,
input,
textarea,
select {
    min-height: 44px;
}

.button.subtle {
    background: #f1e2d5;
    color: var(--accent-dark);
}

.button.danger {
    background: #9f4a37;
    color: #fffaf5;
}

.button.danger.subtle {
    background: #f4ddd6;
    color: #8f3725;
}

.nav-button {
    border: none;
    background: transparent;
    color: var(--accent-dark);
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.section-heading.standalone {
    margin-bottom: 1.5rem;
}

.cards {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.client-card {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.client-profile-layout {
    align-items: start;
    margin-bottom: 2rem;
}

.profile-summary {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.profile-summary img {
    width: 108px;
    height: 108px;
    object-fit: cover;
    border-radius: 22px;
}

.filter-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.compact-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
}

.filter-actions {
    grid-column: 1 / -1;
}

.client-card img,
.avatar-placeholder {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 1rem;
}

.avatar-placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #edd6bf, #f8ede1);
    color: var(--accent-dark);
    font-size: 1.4rem;
}

.client-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.pill {
    background: #f7d9c9;
    color: var(--accent-dark);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
}

.subtle-pill {
    background: #efe6dc;
    color: var(--muted);
}

.notes,
.empty,
small,
label {
    color: var(--muted);
}

.form-shell {
    max-width: 840px;
}

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

.form-grid label {
    display: grid;
    gap: 0.5rem;
}

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

.note-panel {
    display: grid;
    gap: 0.5rem;
}

.scope-panel {
    display: grid;
    gap: 0.65rem;
}

.scope-option {
    display: flex !important;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel-strong);
}

.scope-option input {
    width: auto;
}

.service-picker-heading {
    margin-bottom: 0.25rem;
}

.service-picker-grid {
    display: grid;
    gap: 0.75rem;
}

.service-option {
    align-items: start;
}

.service-option span {
    display: grid;
    gap: 0.2rem;
}

.note-card {
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #f8ede1;
    color: var(--accent-dark);
    white-space: pre-wrap;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel-strong);
    font: inherit;
    color: var(--text);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.inline-checkbox {
    display: inline-flex !important;
    justify-self: start;
    align-self: end;
}

.checkbox input {
    width: auto;
}

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

.schedule-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(300px, 0.95fr);
    gap: 1.5rem;
    align-items: start;
}

.schedule-main,
.schedule-side {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.request-layout .schedule-side {
    min-width: 320px;
}

.client-hero {
    align-items: start;
}

.client-hero p {
    max-width: 40rem;
}

.hero-feature-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.5rem;
    max-width: 36rem;
}

.hero-feature {
    display: grid;
    gap: 0.25rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: rgba(255, 250, 245, 0.72);
    border: 1px solid var(--line);
}

.hero-card {
    padding: 1.5rem;
}

.hero-card-title {
    margin-bottom: 1rem;
    color: var(--accent-dark);
    font-size: 1rem;
    font-weight: 700;
}

.portal-banner {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 250, 245, 0.96), rgba(248, 237, 225, 0.96));
}

.request-step-card {
    margin-bottom: 1rem;
}

.pending-request-card {
    display: grid;
    gap: 0.45rem;
}

.request-single-pane {
    max-width: 820px;
}

.request-date-summary {
    display: grid;
    gap: 0.85rem;
}

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

.request-date-action {
    display: flex;
    justify-content: flex-start;
}

.availability-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.availability-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
}

.available-pill {
    background: #deeee0;
    color: #2f6a3b;
}

.unavailable-pill {
    background: #f7dfda;
    color: #9a3c2b;
}

.calendar-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45, 36, 29, 0.28);
    z-index: 60;
}

.calendar-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.calendar-modal-card {
    width: min(620px, 100%);
    max-height: min(84vh, 720px);
    overflow: auto;
}

.request-calendar-scroll {
    display: grid;
    gap: 1.25rem;
}

.request-calendar-month-section {
    display: grid;
    gap: 0.75rem;
}

.request-calendar-month-title {
    margin: 0;
    color: var(--accent-dark);
    font-size: 1rem;
}

.time-modal-card {
    width: min(460px, 100%);
}

.time-option-list {
    display: grid;
    gap: 0.75rem;
}

.time-option-button {
    display: grid;
    gap: 0.2rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #f8ede1;
    color: var(--accent-dark);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.time-option-button strong,
.time-option-button small {
    display: block;
}

.time-picker-panel {
    display: grid;
    gap: 0.85rem;
}

.time-picker-label {
    display: grid;
    gap: 0.5rem;
}

.popup-request-cell {
    min-height: 68px;
    padding: 0.45rem;
    gap: 0.35rem;
}

.popup-status {
    display: grid;
    place-items: center;
    padding: 0.35rem;
    border-radius: 12px;
    font-size: 0.82rem;
    text-align: center;
}

.popup-status-available {
    background: #deeee0;
    color: #2f6a3b;
}

.popup-status-unavailable {
    background: #f7dfda;
    color: #9a3c2b;
}

.calendar-close-button {
    min-width: 44px;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    font-weight: 700;
}

.request-mobile-calendar {
    display: none;
}

.request-mobile-day {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    margin-bottom: 0.55rem;
}

.request-mobile-day strong,
.request-mobile-day small {
    display: block;
}

.request-mobile-day-available {
    background: #eff8f0;
    color: #2f6a3b;
}

.request-mobile-day-unavailable {
    background: #f9ece8;
    color: #9a3c2b;
}

.request-mobile-symbol {
    font-size: 1.05rem;
    font-weight: 700;
}

.stylist-link {
    margin: 1rem 0 0;
    font-size: 0.92rem;
}

.appointment-layout .schedule-side {
    min-width: 360px;
}

.appointment-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.availability-layout {
    align-items: start;
    margin-bottom: 2rem;
}

.working-hours-card {
    margin-bottom: 2rem;
}

.hours-grid {
    display: grid;
    gap: 0.9rem;
}

.hours-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 150px 150px;
    gap: 0.75rem;
    align-items: center;
}

.hours-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.hours-pill {
    display: grid;
    gap: 0.1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    background: #f8ede1;
    color: var(--accent-dark);
}

.subheading {
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.side-pane {
    position: sticky;
    top: 1rem;
}

.compact-list .list-item {
    align-items: start;
}

.month-header {
    margin-top: 0;
}

.month-card {
    padding: 1rem;
}

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

.month-weekdays {
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.66rem;
    color: var(--muted);
}

.month-grid {
    gap: 0.75rem;
}

.month-cell {
    min-height: 138px;
    padding: 0.7rem;
    border-radius: 18px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    display: grid;
    align-content: start;
    gap: 0.65rem;
}

.request-month-cell[data-request-date] {
    cursor: pointer;
}

.request-month-grid .month-cell {
    min-height: 120px;
    padding: 0.58rem;
    gap: 0.45rem;
}

.month-cell-selected {
    border-color: var(--accent-dark);
    box-shadow: inset 0 0 0 2px rgba(127, 60, 39, 0.22);
}

.month-cell-empty {
    background: rgba(241, 226, 213, 0.4);
    border-style: dashed;
}

.month-cell-today {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(197, 107, 72, 0.18);
}

.month-cell-blocked {
    background: #ebe7e2;
    border-color: #b7ada1;
    color: #6d6258;
}

.month-day {
    font-weight: 700;
    color: var(--accent-dark);
    font-size: 0.92rem;
}

.month-cell-blocked .month-day {
    color: #5e5349;
}

.month-events {
    display: grid;
    gap: 0.35rem;
}

.month-selectable-note {
    display: grid;
    gap: 0.15rem;
    padding: 0.45rem 0.5rem;
    border-radius: 12px;
    background: #f4efe8;
    color: var(--accent-dark);
    font-size: 0.68rem;
    line-height: 1.15;
    overflow: hidden;
}

.month-blocked-banner {
    display: grid;
    gap: 0.15rem;
    padding: 0.45rem 0.5rem;
    border-radius: 12px;
    background: rgba(93, 84, 74, 0.12);
    color: #4e443c;
    font-size: 0.68rem;
    line-height: 1.15;
    overflow: hidden;
}

.month-event {
    display: block;
    padding: 0.38rem 0.5rem;
    border-radius: 12px;
    background: #f8ede1;
    color: var(--accent-dark);
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.month-event span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.month-selectable-note span,
.month-blocked-banner span,
.month-selectable-note small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.month-cell-blocked .month-event {
    background: rgba(255, 255, 255, 0.55);
    color: #5a5048;
}

.dashboard-bottom {
    margin-top: 1.5rem;
}

.request-form-grid {
    grid-template-columns: 1fr;
}

.flash-stack {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.flash {
    padding: 1rem 1.25rem;
}

.detail {
    display: block;
    margin-top: 0.35rem;
}

.note-detail {
    color: var(--accent-dark);
}

.danger-shell {
    border-color: #e0b7ab;
}

.warning-card {
    margin-bottom: 1.25rem;
    background: #fbede9;
    border-color: #e5b8ac;
    color: #7a3425;
}

.warning-card p {
    margin-bottom: 0;
}

.service-card {
    align-content: space-between;
}

.service-money-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.report-filter-form {
    min-width: 180px;
}

.report-filter-form label {
    display: grid;
    gap: 0.5rem;
}

.report-explorer-form {
    align-items: end;
}

.report-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.report-summary-grid p {
    margin-bottom: 0;
    margin-top: 0.45rem;
    font-size: 1.2rem;
    color: var(--accent-dark);
}

.report-list-item {
    align-items: center;
}

.report-value-stack {
    display: grid;
    gap: 0.2rem;
    text-align: right;
}

@media (max-width: 1100px) {
    .topbar,
    .page-shell,
    .site-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero {
        grid-template-columns: 1.35fr 1fr;
        padding: 1.5rem;
    }

    .schedule-layout {
        grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
    }

    .month-cell {
        min-height: 120px;
        padding: 0.6rem;
    }
}

@media (max-width: 860px) {
    .topbar,
    .page-shell,
    .site-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .topbar {
        align-items: start;
        flex-direction: column;
        padding-top: 1.25rem;
        padding-bottom: 1rem;
    }

    .topbar nav {
        width: 100%;
        gap: 0.75rem;
    }

    .hero,
    .two-col,
    .form-grid,
    .schedule-layout {
        grid-template-columns: 1fr;
    }

    .hero,
    .card {
        border-radius: 18px;
    }

    .hero,
    .card,
    .flash {
        padding: 1.15rem;
    }

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

    .report-stats,
    .report-summary-grid {
        grid-template-columns: 1fr;
    }

    .appointment-overview-grid {
        grid-template-columns: 1fr;
    }

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

    .month-weekdays {
        display: none;
    }

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

    .month-cell,
    .request-month-grid .month-cell {
        min-height: auto;
    }

    .list-item,
    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .list-item {
        gap: 0.75rem;
    }

    .actions,
    .actions-row {
        width: 100%;
    }

    .actions .button,
    .actions-row .button,
    .actions-row .nav-button {
        flex: 1 1 100%;
        width: 100%;
    }

    .request-layout .schedule-side,
    .appointment-layout .schedule-side {
        order: -1;
        min-width: 0;
    }

    .request-layout .schedule-main,
    .appointment-layout .schedule-main {
        order: 2;
    }

    .side-pane {
        position: static;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 15px;
    }

    h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .eyebrow {
        font-size: 0.68rem;
    }

    .topbar nav a,
    .topbar .nav-button {
        width: 100%;
        padding: 0.8rem 0.9rem;
        border-radius: 14px;
        background: rgba(255, 250, 245, 0.75);
        border: 1px solid var(--line);
        text-align: center;
    }

    .menu-trigger {
        width: 100%;
    }

    .topbar nav form {
        width: 100%;
    }

    .section-heading.standalone,
    .section-heading {
        gap: 0.75rem;
    }

    .stats,
    .compact-form {
        grid-template-columns: 1fr;
    }

    .report-value-stack {
        text-align: left;
    }

    .sidebar-links a,
    .sidebar-links .nav-button {
        text-align: center;
    }

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

    .hours-summary {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hours-pill {
        width: 100%;
    }

    .month-event,
    .month-selectable-note,
    .month-blocked-banner {
        font-size: 0.7rem;
    }

    .request-desktop-calendar {
        display: none !important;
    }

    .request-mobile-calendar {
        display: block;
    }

    .site-footer {
        padding-bottom: 1.5rem;
        font-size: 0.82rem;
    }

    .menu-drawer {
        width: 100vw;
        padding: 0.75rem;
    }
}
