:root {
    color-scheme: light;
    --bg: #edf3ee;
    --bg-accent: #d9ead8;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-strong: #ffffff;
    --ink: #16342d;
    --muted: #62746d;
    --line: rgba(22, 52, 45, 0.12);
    --brand: #0e7a5f;
    --brand-2: #ff7b54;
    --danger: #b64242;
    --success: #2e8b57;
    --vacation: #d8f2c8;
    --sick: #ffe0d2;
    --holiday: #d6e7ff;
    --neutral: #ece8dc;
    --shadow: 0 28px 70px rgba(17, 43, 37, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 26%),
        linear-gradient(180deg, var(--bg-accent), var(--bg));
    color: var(--ink);
    font-family: "Avenir Next", "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

.alerts {
    padding: 16px 20px 0;
}

.alert {
    max-width: 1240px;
    margin: 0 auto 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.alert.error {
    border-color: rgba(182, 66, 66, 0.35);
    color: var(--danger);
}

.alert.success {
    border-color: rgba(46, 139, 87, 0.35);
    color: var(--success);
}

.shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 26px 18px 56px;
}

.hero {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    font-family: "Iowan Old Style", "Palatino Linotype", serif;
    letter-spacing: -.03em;
}

h1 {
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    line-height: .94;
}

h2 {
    font-size: 1.3rem;
}

.lede {
    max-width: 44rem;
    margin: 18px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.hero-links {
    margin-top: 12px;
}

.hero-pill,
.stat-card,
.panel,
.calendar-panel,
.toolbar,
.login-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.login-recovery {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.login-recovery summary {
    color: var(--brand);
    cursor: pointer;
    font-weight: 800;
}

.login-recovery form {
    margin-top: 14px;
}

.hero-pill {
    display: grid;
    align-content: center;
    min-height: 46px;
    padding: 8px 14px;
    border-radius: 14px;
    box-shadow: none;
    background: rgba(14, 122, 95, 0.08);
}

.hero-pill span,
.stat-card span,
.help-text,
.empty-day,
.credentials-note,
.company-badge,
.week-marker span,
.day-name-mobile {
    color: var(--muted);
}

.hero-pill strong,
.stat-card strong {
    display: block;
    margin-top: 2px;
    font-size: .95rem;
}

.ghost-button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px;
    border: 0;
    border-radius: 14px;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
}

.ghost-button {
    background: rgba(14, 122, 95, 0.12);
    color: var(--brand);
}

.compact-button {
    min-height: 40px;
    padding: 0 12px;
}

button {
    background: linear-gradient(135deg, var(--brand), #159d79);
    color: #fff;
}

.top-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.stat-card {
    padding: 22px;
}

.stat-card strong {
    font-size: 2rem;
    font-family: "Iowan Old Style", "Palatino Linotype", serif;
}

.toolbar {
    position: relative;
    z-index: 35;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 16px 18px;
    align-items: center;
    overflow: visible;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.month-picker {
    position: relative;
    z-index: 36;
}

.month-picker[open] {
    z-index: 38;
}

.month-picker summary {
    display: grid;
    gap: 4px;
    min-width: 220px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-strong);
    cursor: pointer;
    list-style: none;
}

.month-picker summary::-webkit-details-marker {
    display: none;
}

.month-nav strong {
    font-size: 1.6rem;
    font-family: "Iowan Old Style", "Palatino Linotype", serif;
}

.month-picker-form {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 39;
    width: 260px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.field-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.month-progress-card {
    flex: 1;
    display: grid;
    gap: 10px;
    min-width: 240px;
}

.month-progress-copy {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
}

.month-progress-copy span {
    color: var(--muted);
}

.month-progress-copy strong {
    font-size: 1rem;
}

.month-progress-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(14, 122, 95, 0.12);
    overflow: hidden;
}

.month-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--brand), #159d79);
}

.nav-button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    text-decoration: none;
    background: var(--surface-strong);
    border: 1px solid var(--line);
}

.icon-button {
    width: 46px;
    min-width: 46px;
    padding: 0;
    border-radius: 999px;
    font-size: 1.5rem;
    line-height: 1;
}

.inline-form,
.stack-form {
    display: grid;
    gap: 10px;
}

.inline-form {
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, auto);
    align-items: center;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-strong);
    color: var(--ink);
    font: inherit;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

.checkbox {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: .95rem;
}

.checkbox input {
    width: auto;
    min-height: 0;
}

.subscription-panel,
.subscription-actions {
    display: grid;
    gap: 10px;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, .95fr);
    gap: 18px;
}

.mobile-planner {
    display: none;
}

.mobile-week-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mobile-week-copy {
    display: grid;
    justify-items: center;
    gap: 2px;
}

.mobile-week-copy strong {
    font-size: 1.4rem;
    font-family: "Iowan Old Style", "Palatino Linotype", serif;
}

.mobile-day-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.mobile-day-pill {
    display: grid;
    gap: 4px;
    justify-items: center;
    padding: 10px 6px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    text-decoration: none;
}

.mobile-day-pill span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mobile-day-pill strong {
    font-size: 1.1rem;
    font-family: "Iowan Old Style", "Palatino Linotype", serif;
}

.mobile-day-pill.selected {
    border-color: rgba(14, 122, 95, 0.42);
    background: rgba(14, 122, 95, 0.12);
}

.mobile-day-pill.today {
    box-shadow: inset 0 0 0 1px rgba(14, 122, 95, 0.24);
}

.mobile-day-pill.muted {
    opacity: .5;
}

.mobile-agenda,
.mobile-quick-add {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.mobile-agenda {
    padding: 18px;
}

.mobile-agenda-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    margin-bottom: 14px;
}

.mobile-agenda-list {
    display: grid;
    gap: 10px;
}

.mobile-quick-add summary {
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 700;
    color: var(--brand);
}

.mobile-quick-add-body {
    padding: 0 18px 18px;
}

.calendar-panel {
    padding: 14px;
    overflow: visible;
}

.calendar-head,
.calendar-week-row {
    display: grid;
    grid-template-columns: 84px repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.calendar-head {
    margin-bottom: 10px;
}

.calendar-head div {
    padding: 10px 8px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.calendar-body {
    display: grid;
    gap: 10px;
    overflow: visible;
}

.calendar-week-row {
    position: relative;
    overflow: visible;
}

.week-marker {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 16px 10px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(14, 122, 95, 0.08);
    text-align: center;
}

.week-marker strong {
    font-size: 1.7rem;
    font-family: "Iowan Old Style", "Palatino Linotype", serif;
}

.day-card {
    position: relative;
    min-height: 150px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    overflow: visible;
    z-index: 1;
}

.day-card.muted {
    opacity: .52;
}

.day-card:hover,
.day-card:focus-within {
    z-index: 12;
}

.day-card.today {
    border-color: rgba(14, 122, 95, 0.55);
    box-shadow: inset 0 0 0 1px rgba(14, 122, 95, 0.22);
}

.day-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.today-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(14, 122, 95, 0.14);
    color: var(--brand);
    font-size: .78rem;
    font-weight: 700;
}

.day-name-mobile {
    display: none;
    margin-bottom: 4px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.day-number {
    display: block;
    font-family: "Iowan Old Style", "Palatino Linotype", serif;
    font-size: 1.5rem;
}

.day-events {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
}

.event-chip {
    display: grid;
    gap: 2px;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    font-size: .9rem;
}

.event-button {
    position: relative;
    width: 100%;
    min-height: 0;
    padding: 9px 10px;
    justify-content: start;
    align-items: start;
    text-align: left;
    background: transparent;
    color: inherit;
    overflow: visible;
    z-index: 1;
}

.event-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(30, 39, 46, 0.10);
    z-index: 30;
}

.event-button::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 12px;
    top: calc(100% + 8px);
    z-index: 31;
    width: min(260px, 70vw);
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(25, 35, 42, 0.96);
    color: #fff;
    font-size: .82rem;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .16s ease, transform .16s ease;
}

.event-button:hover::after,
.event-button:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.event-button.tone-vacation {
    background: var(--vacation);
}

.event-button.tone-sick {
    background: var(--sick);
}

.event-button.tone-holiday {
    background: var(--holiday);
}

.event-button.tone-neutral {
    background: var(--neutral);
}

.event-chip strong {
    font-size: .92rem;
}

.tone-vacation {
    background: var(--vacation);
}

.tone-sick {
    background: var(--sick);
}

.tone-holiday {
    background: var(--holiday);
}

.tone-neutral {
    background: var(--neutral);
}

.sidebar,
.data-grid {
    display: grid;
    gap: 18px;
}

.support-company-picker {
    margin: 0 0 18px;
}

.support-company-picker label {
    display: grid;
    gap: 6px;
    max-width: 320px;
}

.support-grid {
    display: grid;
    grid-template-columns: minmax(300px, .75fr) minmax(0, 1.25fr);
    gap: 18px;
    align-items: start;
}

.support-list {
    display: grid;
    gap: 12px;
}

.support-request {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .56);
}

.support-request-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.support-request h3 {
    margin: 8px 0 0;
    font-size: 1.08rem;
}

.support-request time,
.support-meta {
    color: var(--muted);
    font-size: .88rem;
}

.support-request time {
    white-space: nowrap;
}

.support-meta {
    margin: 10px 0 0;
}

.support-message {
    margin: 12px 0 0;
    line-height: 1.55;
}

.support-forwarded-note {
    margin: 14px 0 0;
    color: var(--brand);
    font-size: .92rem;
    font-weight: 700;
}

.alco-support-card h1 {
    margin-top: 14px;
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.alco-support-card .stack-form {
    margin-top: 20px;
}

.support-status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(14, 122, 95, .12);
    color: var(--brand);
    font-size: .76rem;
    font-weight: 800;
}

.status-forwarded {
    background: rgba(255, 123, 84, .18);
    color: #a84325;
}

.status-archived {
    background: rgba(46, 139, 87, .16);
    color: var(--success);
}

.support-actions,
.support-action-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.support-actions {
    margin-top: 16px;
}

.support-action-form button {
    min-height: 38px;
    padding: 0 12px;
}

.check-label {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 12px;
    background: rgba(14, 122, 95, .08);
    color: var(--brand);
    font-size: .9rem;
    font-weight: 700;
}

.complete-button {
    background: linear-gradient(135deg, var(--success), #54a85c);
}

.panel {
    padding: 18px;
}

.panel header {
    margin-bottom: 14px;
}

.data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
    isolation: isolate;
}

.data-grid .panel {
    position: relative;
}

.data-grid .panel:has(.user-editor[open]) {
    z-index: 40;
}

.audit-panel {
    grid-column: 1 / -1;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .94rem;
}

.data-table th,
.data-table td {
    padding: 10px 0;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.table-editor {
    position: relative;
}

.table-editor summary {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(14, 122, 95, 0.2);
    border-radius: 12px;
    background: rgba(14, 122, 95, 0.1);
    color: var(--brand);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.table-editor summary::-webkit-details-marker {
    display: none;
}

.compact-form {
    margin-top: 10px;
}

.user-editor[open] {
    z-index: 30;
}

.user-editor-card {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 31;
    width: min(560px, calc(100vw - 72px));
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.user-editor-heading {
    display: grid;
    gap: 3px;
    margin-bottom: 16px;
}

.user-editor-heading span,
.user-editor-form label > span {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.user-editor-heading strong {
    font-family: "Iowan Old Style", "Palatino Linotype", serif;
    font-size: 1.35rem;
}

.user-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.user-editor-form label:not(.checkbox) {
    display: grid;
    gap: 6px;
}

.user-editor-form input,
.user-editor-form select {
    min-height: 44px;
}

.user-editor-form button,
.inline-delete-form .danger-button {
    width: 100%;
}

.inline-delete-form {
    margin-top: 10px;
}

.audit-summary {
    margin-bottom: 8px;
    line-height: 1.5;
}

.audit-details {
    gap: 8px;
}

.audit-block {
    margin-top: 10px;
}

.audit-block strong {
    display: block;
    margin-bottom: 6px;
}

.audit-json {
    margin: 0;
    padding: 12px;
    border-radius: 12px;
    background: rgba(22, 52, 45, 0.06);
    border: 1px solid var(--line);
    overflow: auto;
    font-size: .82rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.event-modal[hidden] {
    display: none;
}

.event-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
}

.event-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(25, 35, 42, 0.42);
    backdrop-filter: blur(6px);
}

.event-modal-card {
    position: relative;
    z-index: 1;
    width: min(720px, calc(100vw - 28px));
    margin: min(8vh, 60px) auto;
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    min-height: 40px;
    background: rgba(14, 122, 95, 0.12);
    color: var(--brand);
}

.event-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.event-meta span,
.event-notes span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.event-notes {
    margin-top: 18px;
}

.event-notes p {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.6;
}

.event-edit-form {
    margin-top: 18px;
}

.event-delete-form {
    margin-top: 18px;
}

.danger-button {
    background: linear-gradient(135deg, #c74a3a, #a8322b);
}

.modal-open {
    overflow: hidden;
}

.login-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 18px;
}

.login-card {
    width: min(560px, 100%);
    padding: 32px;
}

.login-form {
    margin-top: 20px;
}

.company-badge,
.credentials-note {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(14, 122, 95, 0.08);
}

.credentials-note {
    margin-top: 18px;
    font-size: .92rem;
    line-height: 1.6;
}

@media (max-width: 1180px) {
    .hero,
    .workspace,
    .data-grid,
    .top-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 900px) {

    body:has(.support-shell),
    body:has(.password-shell) {
        height: auto;
        overflow: auto;
    }

    .support-shell {
        display: block;
        height: auto;
        overflow: visible;
    }
    html,
    body {
        height: 100%;
    }

    body {
        overflow: hidden;
    }

    .shell {
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr);
        gap: 10px;
        height: 100dvh;
        padding: 10px 10px 12px;
        overflow: hidden;
    }

    .hero {
        gap: 10px;
        align-items: start;
        margin-bottom: 0;
        padding: 14px 16px;
    }

    .hero .eyebrow {
        margin-bottom: 6px;
        font-size: .66rem;
        letter-spacing: .14em;
    }

    .hero .lede {
        display: none;
    }

    .hero h1 {
        font-size: 1.7rem;
        line-height: 1;
    }

    .hero-links {
        margin-top: 8px;
    }

    .hero-actions {
        gap: 8px;
        justify-content: flex-start;
    }

    .hero-pill {
        min-width: 0;
        padding: 7px 12px;
    }

    .hero-pill span {
        display: block;
        font-size: .68rem;
    }

    .hero-pill strong {
        margin-top: 1px;
        font-size: .92rem;
    }

    .hero-actions .ghost-button,
    .hero-pill {
        min-height: 40px;
    }

    .support-request-heading {
        display: grid;
        gap: 8px;
    }

    .support-request time {
        white-space: normal;
    }

    .mobile-planner {
        display: grid;
        grid-template-rows: auto auto auto minmax(0, 1fr);
        gap: 10px;
        min-height: 0;
        margin-bottom: 0;
    }

    .desktop-calendar {
        display: none;
    }

    .workspace,
    .data-grid,
    .top-grid {
        display: none;
    }

    .calendar-head {
        display: none;
    }

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

    .week-marker {
        grid-auto-flow: column;
        align-items: center;
        justify-content: center;
    }

    .day-name-mobile {
        display: block;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 0;
        padding: 12px;
    }

    .month-nav {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        justify-content: normal;
    }

    .month-picker,
    .month-picker summary {
        width: 100%;
        min-width: 0;
    }

    .month-picker summary {
        padding: 10px 12px;
    }

    .month-picker summary .eyebrow {
        margin-bottom: 4px;
        font-size: .64rem;
    }

    .month-nav strong {
        font-size: 1.18rem;
    }

    .month-picker[open] {
        z-index: 90;
    }

    .month-picker[open]::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(25, 35, 42, 0.22);
        backdrop-filter: blur(4px);
        z-index: 0;
    }

    .month-picker-form {
        position: fixed;
        top: auto;
        right: 10px;
        bottom: 10px;
        left: 10px;
        z-index: 1;
        width: auto;
        max-height: min(460px, calc(100dvh - 24px));
        overflow: auto;
    }

    .month-progress-card {
        min-width: 0;
        gap: 8px;
    }

    .inline-form {
        grid-auto-flow: row;
        grid-auto-columns: auto;
        gap: 8px;
    }

    .month-progress-copy,
    .event-meta {
        grid-template-columns: 1fr;
        display: grid;
    }

    .month-progress-copy {
        gap: 4px;
    }

    .month-progress-bar {
        height: 8px;
    }

    .sidebar,
    .data-grid {
        gap: 12px;
    }

    .mobile-week-nav {
        padding: 0 2px;
    }


    .mobile-day-grid {
        gap: 6px;
    }

    .mobile-day-pill {
        gap: 2px;
        padding: 7px 4px;
        border-radius: 12px;
    }

    .mobile-agenda {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        min-height: 0;
        padding: 14px;
        overflow: hidden;
    }

    .mobile-agenda-header {
        margin-bottom: 10px;
    }

    .mobile-agenda-header h2 {
        font-size: 1.08rem;
        line-height: 1.1;
    }

    .mobile-agenda-list {
        min-height: 0;
        overflow: auto;
        align-content: start;
        padding-right: 2px;
    }

    .empty-day {
        margin: 0;
    }

    .mobile-quick-add {
        overflow: hidden;
    }

    .mobile-quick-add summary {
        padding: 12px 14px;
    }

    .mobile-quick-add-body {
        max-height: min(42dvh, 320px);
        overflow: auto;
        padding: 0 14px 14px;
    }

    .mobile-quick-add .stack-form {
        gap: 8px;
    }

    .mobile-quick-add input,
    .mobile-quick-add select,
    .mobile-quick-add textarea,
    .mobile-quick-add button {
        min-height: 42px;
        padding: 10px 12px;
    }
}

@media (max-width: 680px) {
    .hero,
    .login-card {
        padding: 14px;
    }

    .hero {
        gap: 10px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-actions {
        align-items: center;
    }

    .month-picker-form,
    .event-modal-card {
        width: calc(100vw - 20px);
    }

    .mobile-day-pill {
        padding: 6px 2px;
        border-radius: 12px;
    }

    .mobile-day-pill span {
        font-size: .62rem;
    }

    .mobile-day-pill strong {
        font-size: .92rem;
    }
}
