html, body {
    background: #f4ede3;
    color: #241c18;
}

#blazor-error-ui {
    background: #b5431f;
    color: #fff;
    padding: 0.75rem 1rem;
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .reload { color: #fff; margin-left: 0.75rem; }

.page-title {
    font-family: Fraunces, Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}

.muted { color: #5c5148; }

/* Nav stays dark via theme DrawerBackground; form drawers are Temporary and need light surfaces. */
.mud-drawer-temporary {
    background-color: #fffbf6 !important;
    color: #241c18;
}

.mud-drawer-temporary .muted {
    color: #5c5148;
}

.stat-card {
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: #fffbf6;
    border: 1px solid #e6d9c8;
    min-height: 108px;
}

.stat-card .label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7a6c60;
}

.stat-card .value {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.8rem;
    line-height: 1.1;
    margin-top: 0.35rem;
}

.pill {
    display: block;
    width: 100%;
    border: 0;
    border-left: 3px solid currentColor;
    border-radius: 6px;
    padding: 2px 6px;
    margin: 2px 0;
    font-size: 0.72rem;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    color: #241c18;
    background: color-mix(in srgb, currentColor 16%, white);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pill.enquiry { opacity: 0.85; border-style: dashed; }
.pill.provisional { outline: 1px dashed #c47a1f; }

.cal-toolbar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.month-dow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7a6c60;
    padding: 0.25rem 0.4rem;
}

.month-cell {
    background: #fffbf6;
    border: 1px solid #eadfcf;
    border-radius: 10px;
    min-height: 118px;
    padding: 0.4rem;
}

.month-cell.outside { opacity: 0.45; }
.month-cell.today { border-color: #b5431f; box-shadow: inset 0 0 0 1px #b5431f; }

.month-cell .d {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.85rem;
}

.occ-meter {
    height: 5px;
    background: #eadfcf;
    border-radius: 99px;
    margin: 0.3rem 0 0.4rem;
    overflow: hidden;
}

.occ-meter > span {
    display: block;
    height: 100%;
    background: #1e6b75;
}

.week-wrap {
    overflow: auto;
    background: #fffbf6;
    border: 1px solid #eadfcf;
    border-radius: 14px;
}

.week-grid {
    display: grid;
    min-width: 920px;
}

.week-head, .week-body {
    display: contents;
}

.gutter {
    width: 64px;
    color: #7a6c60;
    font-size: 0.75rem;
    text-align: right;
    padding-right: 8px;
}

.day-col {
    position: relative;
    border-left: 1px solid #eadfcf;
}

.hour-line {
    border-top: 1px solid #f0e6d8;
    box-sizing: border-box;
}

.block {
    position: absolute;
    left: 4px;
    right: 4px;
    border-radius: 8px;
    padding: 4px 6px;
    font-size: 0.75rem;
    color: #fff;
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
}

.block small { display: block; opacity: 0.9; }

.resource-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    border-bottom: 1px solid #eadfcf;
    min-height: 88px;
}

.resource-label {
    padding: 0.75rem;
    font-weight: 600;
    background: #faf4ea;
}

.resource-track {
    position: relative;
}

a.pill {
    text-decoration: none;
}

.resource-week-head,
.resource-week-row {
    display: grid;
    grid-template-columns: 148px repeat(7, minmax(0, 1fr));
    border-bottom: 1px solid #eadfcf;
}

.resource-week-head {
    position: sticky;
    top: 0;
    background: #fffbf6;
    z-index: 2;
}

.resource-week-head > div {
    padding: 0.6rem 0.45rem;
    border-left: 1px solid #eadfcf;
    font-size: 0.72rem;
    font-weight: 600;
    color: #7a6c60;
}

.resource-week-head > div:first-child,
.resource-week-row > .resource-label {
    border-left: 0;
}

.resource-week-head > div.today {
    color: #b5431f;
    background: #fff4ea;
}

.resource-day-cell {
    border-left: 1px solid #eadfcf;
    padding: 0.35rem;
    min-height: 76px;
}

.resource-day-cell.today {
    background: #fff4ea;
}

.resource-month {
    margin-bottom: 1.5rem;
}

.resource-month-title {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin: 0 0 0.45rem;
    font-weight: 600;
}

.resource-month .month-cell {
    min-height: 76px;
}

button.resource-heat {
    display: block;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    width: 100%;
}

.resource-day-num {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
}

.resource-heat-meta {
    margin-top: 0.45rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.25;
}

.resource-session-count {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
}

button.resource-heat:hover {
    border-color: #b5431f;
}

.resource-heat.closed {
    background: #f3eee6;
    color: #7a6c60;
}

.login-shell, .widget-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(1200px 500px at 10% -10%, #e8b89a 0%, transparent 50%),
        radial-gradient(900px 400px at 100% 0%, #9fd0d4 0%, transparent 45%),
        #f4ede3;
}

.login-card, .widget-card {
    width: min(520px, 100%);
    background: #fffbf6;
    border: 1px solid #e6d9c8;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 16px 40px rgba(36, 28, 24, 0.08);
}

.widget-card { width: min(720px, 100%); }

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #b5431f;
    display: grid;
    place-items: center;
    color: white;
    font-family: Fraunces, serif;
    font-weight: 700;
}

.terms-box {
    max-height: 180px;
    overflow: auto;
    border: 1px solid #eadfcf;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    background: #faf4ea;
    font-size: 0.88rem;
}

.empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: #7a6c60;
}

.account-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.invoice-ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
}

.payments-tabs .mud-tabs-panels {
    padding-top: 1rem;
}

.addon-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-height: 2.5rem;
}

.addon-qty {
    max-width: 110px;
}

.embed-snippet {
    background: #241c18;
    color: #f7f1e8;
    padding: 1rem;
    border-radius: 12px;
    overflow: auto;
}

.whats-on-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.5rem 0 1rem;
}

.whats-on-filters button {
    border: 1px solid #eadfcf;
    background: #fffbf6;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: #241c18;
}

.whats-on-filters button.on {
    background: #b5431f;
    border-color: #b5431f;
    color: #fff;
}

.whats-on-heading {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.15rem;
    margin: 1.4rem 0 0.7rem;
}

.whats-on-card {
    background: #faf4ea;
    border: 1px solid #eadfcf;
    border-radius: 14px;
    padding: 0.9rem 1rem 0.4rem;
    margin-bottom: 0.75rem;
}

.whats-on-card h3 {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.15rem;
    margin: 0 0 0.2rem;
}

.whats-on-card ul {
    list-style: none;
    padding: 0;
    margin: 0.7rem 0 0;
}

.whats-on-card li {
    padding: 0.65rem 0;
    border-top: 1px solid #eadfcf;
    font-size: 0.92rem;
}

.whats-on-title {
    font-weight: 600;
}

.whats-on-site {
    display: inline-block;
    margin-top: 0.25rem;
    color: #b5431f;
    font-weight: 600;
    text-decoration: none;
}

.whats-on-foot {
    margin-top: 1.25rem;
}

.whats-on-foot a { color: #b5431f; }

.rate-table-wrap {
    overflow: auto;
    background: #fffbf6;
    border: 1px solid #eadfcf;
    border-radius: 14px;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.rate-table th, .rate-table td {
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid #eadfcf;
    text-align: left;
    vertical-align: middle;
    font-size: 0.88rem;
}

.rate-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7a6c60;
    background: #faf4ea;
}

.guidance-row-on td {
    font-weight: 600;
    background: #faf4ea;
}

@media (max-width: 800px) {
    .month-cell { min-height: 88px; }
    .resource-row { grid-template-columns: 1fr; }
    .resource-week-head,
    .resource-week-row { min-width: 920px; }
    .resource-session-count { display: none; }
    .resource-heat-meta { margin-top: 0.2rem; }
    .resource-month .month-cell { min-height: 52px; padding: 0.3rem 0.35rem; }
}
