@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f3f7fd;
    --bg-soft: #ffffff;
    --panel: rgba(255, 255, 255, 0.9);
    --panel-strong: rgba(255, 255, 255, 0.96);
    --line: rgba(16, 32, 51, 0.08);
    --line-strong: rgba(16, 32, 51, 0.14);
    --text: #122033;
    --muted: #607086;
    --brand: #2c74f7;
    --brand-strong: #6ea6ff;
    --danger: #e85772;
    --success: #31d0aa;
    --warning: #f8c14b;
    --shadow: 0 24px 70px rgba(22, 38, 61, 0.12);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100dvh;
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(44, 116, 247, 0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(126, 166, 255, 0.16), transparent 24%),
        linear-gradient(145deg, #f8fbff 0%, #eef4fb 48%, #e9f0fa 100%);
    color: var(--text);
}

body.app-shell,
body.auth-layout {
    position: relative;
    overflow-x: hidden;
}

body.calendar-drawer-open {
    overflow: hidden;
}

.app-background {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 20%, rgba(44, 116, 247, 0.08), transparent 24%),
        radial-gradient(circle at 80% 0%, rgba(232, 87, 114, 0.06), transparent 18%),
        radial-gradient(circle at 50% 100%, rgba(49, 208, 170, 0.06), transparent 26%);
    filter: blur(0.5px);
    opacity: 0.9;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1.1rem 1.4rem;
    backdrop-filter: blur(24px);
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid var(--line);
}

.brand-stack {
    display: grid;
    gap: 0.35rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.02em;
    font-size: 1.05rem;
}

.brand-mark {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, rgba(140, 224, 255, 0.95), rgba(93, 212, 255, 0.44));
    color: #041019;
    box-shadow: 0 18px 35px rgba(93, 212, 255, 0.22);
}

.brand-subtitle {
    color: var(--muted);
    font-size: 0.92rem;
}

.topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ghost-button,
.primary-button,
.danger-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 0.85rem 1.15rem;
    font: inherit;
    font-weight: 700;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.ghost-button,
.danger-button {
    color: var(--text);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--line);
    text-decoration: none;
}

.primary-button {
    color: #041019;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 18px 30px rgba(93, 212, 255, 0.2);
}

.danger-button {
    background: rgba(232, 87, 114, 0.09);
    border-color: rgba(232, 87, 114, 0.18);
}

.action-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.action-chip span[aria-hidden="true"] {
    font-size: 1rem;
    line-height: 1;
}

.logout-form {
    margin: 0;
}

.ghost-button:hover,
.primary-button:hover,
.danger-button:hover,
.calendar-item:hover,
.day-cell:hover,
.mini-month:hover,
.member-pill:hover,
.invite-card:hover {
    transform: translateY(-2px);
}

.ghost-button.small,
.primary-button.small {
    padding: 0.65rem 0.95rem;
    font-size: 0.9rem;
}

.user-chip {
    display: grid;
    gap: 0.1rem;
    padding: 0.75rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    min-width: 0;
}

.user-chip small,
.muted,
.field-help,
.brand-subtitle,
.calendar-item span,
.member-note-head small,
.mini-month-head span,
.invite-card span {
    color: var(--muted);
}

.app-layout,
.auth-layout {
    width: 100%;
    margin: 0 auto;
    display: grid;
    gap: 1.2rem;
    padding: 1.2rem 0 1.8rem;
}

.app-layout {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.sidebar,
.content-panel,
.panel,
.auth-card {
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.92));
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.content-panel {
    min-height: calc(100dvh - 6.3rem);
    padding: 0.85rem;
    border-radius: 0;
}

.sidebar {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    position: sticky;
    top: 5.1rem;
}

.sidebar-stack {
    display: grid;
    gap: 1rem;
}

.panel {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.94);
}

.card-shadow {
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}

.panel-head,
.calendar-shell-header,
.event-form-head,
.mini-month-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.panel-head h3,
.calendar-shell-header h1,
.event-form-head h2,
.auth-card h1,
.mini-month-head strong,
.dashboard-grid h2,
.dashboard-grid h3 {
    margin: 0;
}

.eyebrow {
    margin: 0 0 0.35rem;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.74rem;
    font-weight: 800;
}

.mini-stats {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.mini-stats div,
.member-pill,
.invite-card,
.calendar-item,
.empty-state,
.auth-card,
.mini-month,
.day-cell {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

.mini-stats div {
    padding: 0.8rem;
    display: grid;
    gap: 0.2rem;
}

.mini-stats strong {
    font-size: 1.2rem;
}

.mini-stats span {
    color: var(--muted);
    font-size: 0.88rem;
}

.stack-form,
.invite-form,
.toolbar-filters,
.auth-card form,
.event-form,
.empty-state,
.calendar-toolbar,
.members-panel,
.member-notes-grid,
.dashboard-grid,
.year-grid,
.calendar-list,
.member-grid,
.dialog-actions,
.inline-form,
.inline-actions {
    display: grid;
    gap: 0.9rem;
}

.stack-form label,
.invite-form label,
.auth-card label,
.event-form label {
    display: grid;
    gap: 0.35rem;
    color: var(--text);
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #ffffff;
    color: var(--text);
    padding: 0.95rem 1rem;
    font: inherit;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(140, 224, 255, 0.45);
    box-shadow: 0 0 0 4px rgba(93, 212, 255, 0.12);
}

textarea {
    resize: vertical;
    min-height: 6rem;
}

.checkbox-row {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.checkbox-row input {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    accent-color: var(--brand-strong);
}

.calendar-list {
    max-height: 16rem;
    overflow: auto;
    padding-right: 0.25rem;
}

.calendar-picker-shell,
.profile-shell {
    display: grid;
    gap: 1rem;
}

.calendar-picker-hero {
    display: grid;
    gap: 1rem;
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.calendar-select-card {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
}

.calendar-select-card span,
.calendar-select-card small {
    color: var(--muted);
}

.calendar-select-card small {
    color: var(--brand);
    font-weight: 700;
}

.chooser-form,
.profile-form {
    width: min(760px, 100%);
}

.full-screen-chooser {
    min-height: calc(100dvh - 8rem);
    align-content: center;
    gap: 1rem;
}

.workspace-dialog {
    width: min(940px, calc(100% - 1rem));
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    padding: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
    color: var(--text);
    box-shadow: 0 40px 90px rgba(22, 38, 61, 0.22);
}

.workspace-dialog::backdrop {
    background: rgba(12, 20, 32, 0.32);
    backdrop-filter: blur(8px);
}

.dialog-shell {
    padding: 1.2rem;
    display: grid;
    gap: 1rem;
}

.dialog-shell .panel {
    padding: 1rem;
}

.profile-shell {
    padding: 1rem;
}

.profile-form {
    max-width: 760px;
}

.calendar-item {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem 0.95rem;
    text-decoration: none;
    color: var(--text);
}

.calendar-item.active {
    border-color: rgba(44, 116, 247, 0.22);
    background: rgba(44, 116, 247, 0.08);
}

.chip,
.pill,
.legend-item,
.member-pill span,
.member-note-head small,
.field-help {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    font-size: 0.82rem;
}

.chip,
.pill,
.legend-item {
    padding: 0.4rem 0.7rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
}

.pill.danger {
    background: rgba(255, 100, 124, 0.16);
    border-color: rgba(255, 100, 124, 0.2);
    color: #ffc1cb;
}

.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-shell {
    position: relative;
    width: 100%;
    min-height: calc(100dvh - 8rem);
}

.calendar-stage {
    display: grid;
    gap: 1rem;
    min-height: calc(100dvh - 8rem);
    order: 1;
}

.calendar-toolbar {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 1rem 1.15rem;
    background: rgba(255, 255, 255, 0.96);
    position: sticky;
    top: 5rem;
    z-index: 6;
}

.toolbar-filters {
    grid-auto-flow: column;
    align-items: end;
    grid-template-columns: repeat(4, auto);
}

.toolbar-filters select,
.toolbar-filters input {
    min-width: 7.5rem;
}

.members-panel {
    padding: 1rem;
}

.member-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.calendar-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.meta-tile {
    padding: 0.85rem 0.95rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(248, 251, 255, 0.9);
    display: grid;
    gap: 0.25rem;
}

.meta-tile strong {
    font-size: 0.98rem;
}

.member-pill {
    padding: 0.85rem 0.95rem;
    display: grid;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.96);
}

.member-pill form {
    margin-top: 0.25rem;
}

.owner-pill {
    border-color: rgba(49, 208, 170, 0.18);
    background: rgba(49, 208, 170, 0.08);
}

.calendar-shell,
.year-shell {
    display: grid;
    gap: 1rem;
}

.calendar-shell {
    min-height: calc(100dvh - 20rem);
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

.legend-item {
    color: var(--muted);
}

.dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    display: inline-block;
}

.dot.emergency {
    background: var(--danger);
}

.dot.normal {
    background: var(--brand-strong);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
}

.weekday-row {
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.days-grid {
    align-items: stretch;
    grid-auto-rows: minmax(120px, 1fr);
    min-height: min(70dvh, 900px);
}

.day-cell {
    display: grid;
    align-content: start;
    gap: 0.55rem;
    padding: 0.85rem;
    text-align: left;
    color: var(--text);
    cursor: pointer;
    min-width: 0;
}

.day-cell.current-month {
    background: rgba(255, 255, 255, 0.98);
}

.day-cell.outside-month {
    opacity: 0.45;
}

.day-cell.selected-day {
    border-color: rgba(44, 116, 247, 0.28);
    box-shadow: inset 0 0 0 1px rgba(44, 116, 247, 0.18);
}

.day-cell.has-event {
    border-color: rgba(49, 208, 170, 0.32);
    box-shadow: inset 0 0 0 1px rgba(49, 208, 170, 0.18);
    background: linear-gradient(180deg, rgba(49, 208, 170, 0.1), rgba(255, 255, 255, 0.98));
}

.day-cell.emergency-day {
    border-color: rgba(232, 87, 114, 0.26);
    box-shadow: inset 0 0 0 1px rgba(232, 87, 114, 0.12);
}

.day-topline {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: center;
}

.day-number {
    font-weight: 800;
    font-size: 1rem;
}

.day-body {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
}

.day-body strong {
    color: var(--text);
    font-size: 0.95rem;
}

.empty-day {
    font-size: 0.88rem;
}

.year-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-month {
    padding: 0.9rem;
    display: grid;
    gap: 0.85rem;
    transition: transform 180ms ease, border-color 180ms ease;
}

.mini-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}

.mini-day {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid transparent;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.78rem;
}

.mini-day.filled {
    color: var(--text);
    background: rgba(44, 116, 247, 0.1);
    border-color: rgba(44, 116, 247, 0.18);
}

.event-dialog {
    width: min(980px, calc(100% - 1rem));
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    padding: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
    color: var(--text);
    box-shadow: 0 40px 90px rgba(22, 38, 61, 0.22);
}

.event-dialog::backdrop {
    background: rgba(12, 20, 32, 0.32);
    backdrop-filter: blur(8px);
}

.event-form {
    padding: 1.2rem;
}

.inner-panel {
    background: rgba(248, 251, 255, 0.96);
}

.member-notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-note-card {
    padding: 0.9rem;
    display: grid;
    gap: 0.6rem;
}

.instruction-preview {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--muted);
    word-break: break-word;
}

.instruction-preview a {
    color: var(--brand);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
}

.member-note-card textarea[readonly] {
    opacity: 0.72;
}

.member-note-card.self-card {
    border-color: rgba(49, 208, 170, 0.18);
}

.member-note-card.owner-card {
    border-color: rgba(44, 116, 247, 0.18);
}

.member-note-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dialog-actions {
    justify-content: end;
}

.alert,
.empty-state {
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}

.alert.success {
    border-color: rgba(49, 208, 170, 0.18);
    background: rgba(49, 208, 170, 0.08);
}

.alert.error {
    border-color: rgba(232, 87, 114, 0.18);
    background: rgba(232, 87, 114, 0.08);
}

.alert.info {
    border-color: rgba(44, 116, 247, 0.18);
    background: rgba(44, 116, 247, 0.08);
}

.empty-state {
    min-height: 54dvh;
    align-content: center;
    justify-items: start;
    padding: 2rem;
}

.inline-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    width: min(760px, 100%);
}

.inline-actions {
    grid-auto-flow: column;
    justify-content: start;
}

.hero-card {
    width: min(680px, 100%);
    padding: 1.6rem;
    margin: 3rem auto 0;
    animation: lift 500ms ease both;
}

.auth-layout {
    min-height: 100dvh;
    place-items: center;
}

.auth-card {
    padding: 1.4rem;
}

.auth-links {
    margin: 0;
    color: var(--muted);
}

.auth-links a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 700;
}

.calendar-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 50;
    width: min(420px, calc(100vw - 1rem));
    height: 100dvh;
    padding: 1rem;
    display: grid;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.92);
    border-left: 1px solid var(--line);
    box-shadow: -30px 0 60px rgba(22, 38, 61, 0.12);
    transform: translateX(105%);
    transition: transform 220ms ease;
    backdrop-filter: blur(22px);
}

.dashboard-shell.drawer-open .calendar-drawer,
body.calendar-drawer-open .calendar-drawer {
    transform: translateX(0);
}

.calendar-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(12, 20, 32, 0.16);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.dashboard-shell.drawer-open .calendar-drawer-backdrop,
body.calendar-drawer-open .calendar-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.15rem 0.1rem 0.5rem;
}

.drawer-scroll {
    display: grid;
    gap: 1rem;
    overflow: auto;
    padding-right: 0.2rem;
    min-height: 0;
}

.admin-shell {
    display: grid;
    gap: 1rem;
}

.admin-hero,
.admin-panel {
    background: rgba(255, 255, 255, 0.96);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.admin-request-list {
    display: grid;
    gap: 0.85rem;
}

.empty-inline {
    padding: 0.85rem 0;
    color: var(--muted);
}

.calendar-stage > .calendar-toolbar {
    order: 1;
}

.calendar-stage > .calendar-shell,
.calendar-stage > .year-shell {
    order: 2;
}

.calendar-stage > .panel,
.calendar-stage > .members-panel {
    order: 3;
}

@keyframes lift {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 1280px) {
    .dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .calendar-stage {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1180px) {
    .content-panel {
        border-radius: 0;
    }

    .calendar-toolbar {
        grid-template-columns: 1fr;
    }

    .toolbar-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row;
        width: 100%;
    }

    .calendar-meta-grid {
        grid-template-columns: 1fr;
    }

    .calendar-drawer {
        width: min(92vw, 420px);
    }

    .year-grid,
    .member-notes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .topbar {
        padding: 0.85rem 0.85rem 0.75rem;
        align-items: stretch;
        gap: 0.7rem;
    }

    .brand-subtitle {
        display: none;
    }

    .topbar-actions {
        width: 100%;
        gap: 0.5rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        -webkit-overflow-scrolling: touch;
    }

    .topbar-actions .ghost-button,
    .topbar-actions .danger-button,
    .topbar-actions .primary-button {
        flex: 0 0 auto;
        justify-content: center;
        min-width: 0;
    }

    .topbar,
    .calendar-shell-header,
    .event-form-head,
    .panel-head,
    .member-note-head,
    .inline-form {
        grid-template-columns: 1fr;
        display: grid;
    }

    .topbar-actions {
        justify-content: flex-start;
    }

    .app-layout,
    .auth-layout {
        width: 100%;
    }

    .content-panel {
        padding: 0.5rem;
    }

    .calendar-drawer {
        width: 100vw;
        height: 88dvh;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-left: 0;
        border-radius: 24px 24px 0 0;
        transform: translateY(102%);
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .dashboard-shell.drawer-open .calendar-drawer,
    body.calendar-drawer-open .calendar-drawer {
        transform: translateY(0);
    }

    .drawer-scroll {
        padding-bottom: 1rem;
    }

    .calendar-grid {
        gap: 0.35rem;
    }

    .days-grid {
        grid-auto-rows: minmax(86px, 1fr);
        min-height: calc(100dvh - 15.5rem);
    }

    .day-cell {
        padding: 0.55rem;
        border-radius: 16px;
    }

    .day-number {
        font-size: 0.92rem;
    }

    .day-body strong {
        font-size: 0.84rem;
    }

    .day-body span {
        font-size: 0.76rem;
        line-height: 1.25;
    }

    .calendar-shell-header h1,
    .calendar-toolbar h2 {
        font-size: 1.25rem;
    }

    .calendar-shell-header,
    .calendar-toolbar,
    .panel,
    .event-form {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .calendar-toolbar,
    .calendar-shell-header {
        gap: 0.75rem;
    }

    .calendar-toolbar {
        top: 4.55rem;
        padding-top: 0.85rem;
        padding-bottom: 0.85rem;
    }

    .calendar-legend {
        justify-content: flex-start;
    }

    .toolbar-filters {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .toolbar-filters .primary-button {
        grid-column: 1 / -1;
    }

    .toolbar-filters select,
    .toolbar-filters input,
    .toolbar-filters .primary-button {
        width: 100%;
    }

    .selection-grid {
        grid-template-columns: 1fr;
    }

    .full-screen-chooser {
        min-height: auto;
    }

    .panel-head h3,
    .drawer-head h2,
    .admin-hero h1,
    .auth-card h1 {
        font-size: 1.08rem;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    .member-notes-grid,
    .mini-stats {
        grid-template-columns: 1fr;
    }

    .event-dialog {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        inset: 0;
    }

    .event-form {
        height: 100dvh;
        overflow: auto;
        padding-top: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .event-dialog::backdrop {
        background: rgba(12, 20, 32, 0.24);
    }

    .workspace-dialog {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        inset: 0;
    }

    .workspace-dialog .dialog-shell {
        height: 100dvh;
        overflow: auto;
        padding-top: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .workspace-dialog::backdrop {
        background: rgba(12, 20, 32, 0.24);
    }

    .dialog-actions {
        position: sticky;
        bottom: 0;
        padding: 0.85rem 0 0.25rem;
        background: linear-gradient(180deg, rgba(248, 251, 255, 0), rgba(248, 251, 255, 0.96) 30%);
    }

    .primary-button,
    .ghost-button,
    .danger-button {
        min-height: 48px;
    }
}
