:root {
    color-scheme: light;
    --ink: #17211d;
    --muted: #6e746f;
    --line: #e3dfd7;
    --panel: rgba(255, 255, 255, .88);
    --page: #f7f3ed;
    --sidebar: #0e291f;
    --sidebar-deep: #0e291f;
    --sidebar-line: rgba(255, 255, 255, .12);
    --accent: #276b49;
    --accent-dark: #185438;
    --accent-soft: #dcecdf;
    --attention: #b35e4e;
    --attention-soft: #f7e7e2;
    --reservation: #2c714b;
    --reservation-bg: #dcecdf;
    --turnover: #9b6824;
    --turnover-bg: #f5e8cd;
    --warning: #9b6824;
    --warning-bg: #fbf0dc;
    --mobile-status: #0e291f;
    --mobile-header: #0e291f;
    --concierge-gold: #b78132;
    --concierge-shadow: 0 12px 40px rgba(68, 51, 30, .07);
    --concierge-serif: "Cormorant Garamond", Georgia, serif;
    --concierge-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
    color: var(--ink);
    background: var(--page);
    font-family: var(--concierge-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.login-page {
    background: #f3ede4;
}

.login-card {
    border: 1px solid rgba(184, 156, 116, .28);
    border-radius: 20px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 28px 80px rgba(67, 47, 24, .13);
}

.login-card .brand-mark,
.brand-mark {
    background: transparent;
    border-radius: 0;
}

.login-card .brand-mark img,
.brand-mark img {
    object-fit: contain;
    padding: 5px;
}

.login-card h1,
.brand strong,
.page-head h1 {
    font-family: var(--concierge-serif);
}

.login-card h1 {
    font-size: 34px;
    font-weight: 600;
    letter-spacing: .055em;
}

.login-card button,
button,
.button {
    border-radius: 9px;
    background: var(--sidebar);
    box-shadow: none;
    font-family: var(--concierge-sans);
}

button:hover,
.button:hover { background: #17392d; }

input,
select,
textarea {
    border-color: var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    font-family: var(--concierge-sans);
}

input:focus,
select:focus,
textarea:focus {
    border-color: #7da38c;
    box-shadow: 0 0 0 3px rgba(39, 107, 73, .12);
    outline: 0;
}

.app-shell,
.shell {
    min-height: 100vh;
    grid-template-columns: 236px minmax(0, 1fr);
}

.app-shell .sidebar { width: 236px; }

.app-shell main {
    width: calc(100% - 236px);
    max-width: none;
    margin-left: 236px;
}

.sidebar {
    padding: 22px 14px 18px;
    background: var(--sidebar);
}

.brand {
    min-height: 64px;
    gap: 11px;
    padding: 0 8px 20px;
    border-bottom: 1px solid var(--sidebar-line);
}

.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
}

.brand strong {
    color: #fffdf8;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.brand span {
    color: rgba(255, 255, 255, .58);
    font-size: 9px;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.sidebar .brand span { display: none; }

.side-nav,
.nav {
    gap: 4px;
    margin-top: 14px;
}

.side-nav a,
.nav a {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 11px;
    padding: 0 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, .82);
    font-size: 14px;
    font-weight: 560;
}

.side-nav a .material-icons-round,
.nav a .material-icons-round {
    width: 20px;
    color: rgba(255, 255, 255, .76);
    font-size: 19px;
}

.side-nav a:hover,
.nav a:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.side-nav a.active,
.nav a.active {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.side-nav a.active .material-icons-round,
.nav a.active .material-icons-round { color: var(--concierge-gold); }

.sidebar-footer {
    padding-top: 15px;
    border-top: 1px solid var(--sidebar-line);
}

main {
    width: 100%;
    max-width: 1420px;
    padding: 30px 34px 56px;
}

.page-head {
    max-width: 1160px;
    margin: 0 auto 20px;
}

.page-head h1 {
    color: #17211d;
    font-size: clamp(34px, 3.2vw, 46px);
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1;
}

.page-head .muted,
.page-head p {
    margin-top: 7px;
    color: #606862;
    font-size: 14px;
}

.content-grid {
    max-width: 1160px;
    margin-inline: auto;
    gap: 14px;
}

.panel,
.workspace,
.notice {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: var(--concierge-shadow);
}

.panel { padding: 20px; }

.panel h2,
.panel h3,
.pane-head h2 {
    color: var(--ink);
    letter-spacing: -.02em;
}

.section-head { gap: 18px; }
.section-head h2 { font-size: 21px; }

.property-switch {
    min-height: 92px;
    padding: 18px 20px;
}

.property-switch h3 {
    font-family: var(--concierge-serif);
    font-size: 24px;
    font-weight: 600;
}

.tabs .tab,
.small-badge,
.badge,
.home-status {
    border-radius: 999px;
}

.tabs .tab.active {
    background: var(--sidebar);
    color: #fff;
}

.summary-strip { gap: 8px; }

.summary-tile {
    min-height: 82px;
    padding: 12px 13px;
    border: 1px solid #ebe6df;
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
}

.summary-tile span {
    color: #737a75;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .045em;
}

.summary-tile strong {
    color: #14251d;
    font-family: var(--concierge-sans);
    font-size: 25px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.calendar-toolbar { padding-bottom: 13px; }

.month-nav a,
.filter-toggle,
.button.secondary {
    border-color: var(--line);
    background: rgba(255, 255, 255, .76);
    color: var(--ink);
}

.calendar-shell,
.table-wrap {
    border-color: var(--line);
    border-radius: 10px;
}

.weekday,
thead th {
    background: #f6f2eb;
    color: #6f756f;
    font-size: 10px;
    letter-spacing: .05em;
}

.day-cell { border-color: #ece8e1; }
.day-cell.today .date-number { background: var(--sidebar); }
.event.reservation { background: var(--reservation-bg); color: var(--reservation); }
.event.turnover { background: var(--turnover-bg); color: var(--turnover); }

table { color: var(--ink); }
td, th { border-color: #ece8e1; }

.notice {
    border-left: 3px solid var(--concierge-gold);
    background: #fcf7ee;
}

.button.accent { background: var(--accent); }
.button.danger { background: #fff7f5; color: #9d493d; }

.quick-admin-row,
.booking-detail-cell,
.home-empty,
.empty-month {
    border-color: var(--line);
    background: #faf7f2;
}

.workspace {
    border-radius: 14px;
    box-shadow: var(--concierge-shadow);
}

.pane + .pane,
.pane-head,
.conversation,
.mobile-thread + .mobile-thread { border-color: var(--line); }

.conversation:hover,
.conversation.active,
.message.active { background: #edf5ef; }

.guest-avatar { background: var(--accent-soft); color: var(--accent-dark); }

.badge.draft_ready,
.attention-count { background: var(--accent-soft); color: var(--accent-dark); }

.badge.needs_reply { background: var(--warning-bg); color: var(--warning); }

body.communications-page main { max-width: 1480px; }

@media (min-width: 761px) {
    .page-dashboard .page-head h1 { font-size: 44px; }
    .page-payments .page-head,
    .page-settings .page-head { align-items: flex-end; }
}

@media (max-width: 900px) and (min-width: 761px) {
    .app-shell,
    .shell { grid-template-columns: 204px minmax(0, 1fr); }
    main { padding-inline: 24px; }
}

@media (max-width: 760px) {
    html {
        min-width: 320px;
        background: var(--mobile-status);
    }

    body,
    body.communications-page {
        min-width: 320px;
        background: var(--mobile-status);
    }

    body::before,
    body.communications-page::before { background: var(--mobile-header); }

    main,
    body.communications-page main {
        padding-bottom: calc(82px + env(safe-area-inset-bottom));
        background: var(--page);
    }

    body.communications-page main {
        padding-top: 0;
        padding-inline: 0;
    }

    .app-shell main {
        width: 100%;
        margin-left: 0;
        padding: 0 16px calc(82px + env(safe-area-inset-bottom));
    }

    body.page-app .app-shell main,
    body.page-app_more .app-shell main,
    body.page-app_calendars .app-shell main,
    body.page-app_questions .app-shell main,
    body.app-payment-form-page .app-shell main {
        padding-inline: 0;
    }

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

    .phone-top,
    .mobile-top,
    .mobile-simple-header,
    .mobile-more-header,
    .mobile-payment-header,
    .page-head {
        min-height: 132px;
        margin: 0;
        padding: calc(24px + env(safe-area-inset-top)) 20px 22px;
        border-bottom: 0;
        border-radius: 0;
        background: var(--mobile-header);
        color: #fff;
        box-shadow: 0 10px 28px rgba(14, 41, 31, .16);
    }

    main > .page-head {
        display: flex;
        width: calc(100% + 32px);
        max-width: none;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
        margin: 0 -16px 20px;
        text-align: left;
    }

    main > .page-head > .button-row {
        position: absolute;
        top: calc(100% + 12px);
        right: 16px;
        left: 16px;
        width: auto;
        margin: 0;
    }

    main > .page-head:has(> .button-row) { margin-bottom: 76px; }

    .phone-top,
    .mobile-top,
    .mobile-simple-header,
    .mobile-more-header,
    .mobile-payment-header {
        display: flex;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
        text-align: left;
    }

    .phone-top > div,
    .mobile-simple-header > div,
    .mobile-more-header > div,
    .mobile-payment-header > div { min-width: 0; }

    .mobile-top-main {
        display: flex;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
    }

    .connection-line {
        margin: 0 0 4px;
        color: rgba(255, 255, 255, .72);
        font-size: 12px;
        line-height: 1.25;
    }

    .desktop-sync-status {
        color: var(--muted);
        font-size: 13px;
        white-space: nowrap;
    }

    .mobile-simple-header p {
        margin: 0 0 4px;
        color: rgba(255, 255, 255, .72);
        font-size: 12px;
        line-height: 1.25;
    }

    .page-head > div:first-child {
        display: flex;
        flex-direction: column;
    }

    .page-head > div:first-child > p {
        order: -1;
        margin: 0 0 4px;
    }

    .phone-top h1,
    .mobile-top h1,
    .mobile-simple-header h1,
    .mobile-more-header h1,
    .mobile-payment-header h1,
    .page-head h1 {
        margin: 0;
        color: #fff;
        font-family: var(--concierge-sans);
        font-size: 28px;
        font-weight: 650;
        letter-spacing: -.025em;
    }

    .phone-kicker {
        color: rgba(255, 255, 255, .72);
        font-size: 10px;
        letter-spacing: .1em;
    }

    .phone-top .phone-property-select {
        min-height: 46px;
        border-color: rgba(255, 255, 255, .28);
        background: rgba(255, 255, 255, .1);
        color: #fff;
    }

    .phone-content,
    .mobile-list,
    .mobile-detail { padding-inline: 16px; }

    .mobile-home-section { margin-top: 24px; }
    .mobile-section-head h2,
    .mobile-list-head h2 { font-size: 20px; }

    .mobile-action,
    .mobile-calendar-link,
    .home-empty,
    .guest-thread-list,
    .phone-recent-card,
    .mobile-thread-list,
    .booking-summary,
    .draft-panel {
        border-color: var(--line);
        border-radius: 14px;
        background: rgba(255, 255, 255, .82);
        box-shadow: 0 8px 28px rgba(68, 51, 30, .05);
    }

    .mobile-action .material-icons-round,
    .mobile-calendar-link > .material-icons-round,
    .mobile-section-head a,
    .handled-link { color: var(--accent-dark); }

    .mobile-calendar-link { padding-block: 14px; }

    .mobile-simple-card .mobile-calendar-link {
        min-height: 68px;
        gap: 12px;
        padding: 14px 16px;
    }

    .mobile-simple-card .mobile-calendar-link > .material-icons-round {
        flex: 0 0 24px;
        text-align: center;
    }

    .mobile-bottom-nav {
        height: calc(70px + env(safe-area-inset-bottom));
        min-height: calc(70px + env(safe-area-inset-bottom));
        padding-top: 7px;
        border-color: var(--line);
        background: rgba(255, 253, 249, .97);
        backdrop-filter: blur(18px);
    }

    .mobile-bottom-nav > a,
    .mobile-more-menu > summary { color: #767b77; }

    .mobile-bottom-nav > a.active,
    .mobile-more-menu.active > summary { color: var(--accent-dark); }

    .mobile-more-panel {
        border-color: var(--line);
        background: #fffdf9;
        box-shadow: 0 20px 50px rgba(68, 51, 30, .16);
    }

    .panel {
        border-radius: 14px;
        box-shadow: 0 8px 28px rgba(68, 51, 30, .05);
    }

    body.payment-form-page .payment-form-panel,
    body.app-payment-form-page .payment-form-panel { background: var(--page); }

    .mobile-payment-header {
        min-height: 132px;
        border-bottom: 0;
        border-radius: 0;
        background: var(--mobile-header);
        color: #fff;
    }

    body.payment-form-page .mobile-payment-header,
    body.app-payment-form-page .mobile-payment-header {
        width: calc(100% + 32px);
        max-width: none;
        min-height: 132px;
        margin: 0 -16px 20px;
        padding: calc(24px + env(safe-area-inset-top)) 20px 22px;
        align-items: flex-start;
        justify-content: flex-end;
        text-align: left;
    }

    .mobile-payment-header:has(.mobile-back-button) {
        padding-left: 76px;
    }

    .mobile-payment-header h1 { color: #fff; }

    .mobile-back-button {
        border-color: rgba(255, 255, 255, .28);
        background: rgba(255, 255, 255, .1);
        color: #fff;
    }

    body.payment-form-page .payment-form-panel form,
    body.app-payment-form-page .payment-form-panel form {
        border: 1px solid var(--line);
        background: #fff;
    }

    body.payment-form-page .payment-form-panel input,
    body.payment-form-page .payment-form-panel select,
    body.payment-form-page .payment-form-panel textarea,
    body.app-payment-form-page .payment-form-panel input,
    body.app-payment-form-page .payment-form-panel select,
    body.app-payment-form-page .payment-form-panel textarea,
    body.payment-form-page .date-display,
    body.app-payment-form-page .date-display,
    .mobile-file-button,
    .quick-payment-summary > div,
    .quick-price-grid button {
        border-color: var(--line);
        background: #fffdf9;
    }

    .quick-price-grid button.active {
        border-color: var(--accent);
        background: var(--accent);
        color: #fff;
    }

    .summary-tile { min-height: 76px; }
    .summary-tile strong { font-size: 22px; }

    .mobile-back { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1); color: #fff; }

    body.communications-page .mobile-list { padding-top: 20px; }

    body.communications-page .mobile-list-head {
        display: grid;
        align-items: start;
        gap: 10px;
    }

    .mobile-list-actions {
        display: flex;
        min-width: 0;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .mobile-list-actions .handled-link {
        min-height: 36px;
        margin: 0;
        padding: 0;
    }

    body.communications-page .mobile-thread {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 11px;
        padding: 15px 14px;
    }

    body.communications-page .guest-avatar {
        width: 40px;
        height: 40px;
    }

    body.communications-page .mobile-thread-chevron { display: none; }

    body.communications-page .mobile-thread-title strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.communications-page .mobile-thread-meta {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-thread-status {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 10px;
    }

    .mobile-thread-status .badge { margin: 0; }

    body.communications-page .mobile-detail { padding: 18px 16px 10px; }

    body.communications-page .draft-panel .action-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .notice { margin-inline: 16px; }
    .workspace { border-radius: 14px; }
}

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