﻿:root {
    --bg: #eef6fb;
    --panel: #fbfdff;
    --panel-strong: #e7f3fb;
    --text: #1f2f3d;
    --muted: #607484;
    --border: #cbdce8;
    --accent: #2f7fb7;
    --accent-soft: #dceff9;
    --danger: #b6483a;
    --shadow: 0 18px 40px rgba(31, 47, 61, 0.08);
    --radius: 20px;
    --font-sans: "Aptos", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 400;
    background:
        radial-gradient(circle at top left, rgba(47, 127, 183, 0.12), transparent 30%),
        linear-gradient(180deg, #f7fbfe 0%, var(--bg) 100%);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

code {
    font-family: Consolas, monospace;
}

button,
input,
select,
textarea {
    font: inherit;
}

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

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    width: 100%;
    min-width: 0;
}

.sidebar {
    padding: 2rem 1.5rem;
    background: rgba(251, 253, 255, 0.88);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(14px);
}

.sidebar-brand h1 {
    margin-bottom: 0;
    font-size: 1.25rem;
    line-height: 1.2;
    font-weight: 700;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 2rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    text-decoration: none;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.is-active {
    background: var(--accent-soft);
    color: var(--accent);
}

.nav-icon {
    display: inline-flex;
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 1.2rem;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-form {
    margin-top: 1rem;
}

.nav-logout {
    width: 100%;
}

.main-content {
    padding: 2rem;
    min-width: 0;
    min-height: 100vh;
}

.email-page {
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 1.5rem;
    min-width: 0;
}

.email-page .page-header {
    margin-bottom: 0;
}

.main-content-auth {
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel {
    background: var(--panel);
    border: 1px solid rgba(203, 220, 232, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    min-width: 0;
    max-width: 100%;
}

.auth-card {
    width: min(100%, 520px);
}

.page-header {
    margin-bottom: 1rem;
    padding: 0.25rem 0 0.75rem;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(203, 220, 232, 0.82);
    border-radius: 0;
    box-shadow: none;
}

.page-header h2 {
    margin-bottom: 0.25rem;
    font-size: 1.18rem;
    line-height: 1.25;
    font-weight: 700;
}

.page-header .muted,
.page-header p {
    margin-bottom: 0;
    font-size: 0.92rem;
}

.page-header-with-indicator {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.daily-email-indicator {
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
    align-items: flex-end;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.2;
    white-space: nowrap;
}

.daily-email-indicator::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: var(--accent);
    opacity: 0.55;
}

.daily-email-indicator small {
    font-size: 0.7rem;
    color: var(--muted);
}

.dashboard-grid,
.grid-two {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-two {
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.metric-card strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.metric-card-alert strong {
    color: var(--danger);
}

.metric-label,
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    color: var(--muted);
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.92rem;
}

.stack-form {
    display: grid;
    gap: 1rem;
}

label {
    display: grid;
    gap: 0.4rem;
    font-weight: 600;
}

input,
select,
button {
    font: inherit;
}

input,
select {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.15rem;
    background: var(--accent);
    color: white;
    cursor: pointer;
    text-decoration: none;
}

.button-secondary {
    background: var(--accent-soft);
    color: var(--text);
}

.button-danger {
    background: var(--danger);
}

.alert {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
}

.alert-success {
    background: #dceff9;
    color: #27648f;
}

.alert-error {
    background: #f8e2de;
    color: #7f2b20;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
 td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.inline-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.inline-actions .inline-form {
    margin-bottom: 0;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
}

.danger-link {
    color: var(--danger);
}

.empty-state {
    max-width: 560px;
}

@media (max-width: 960px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .app-shell {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .sidebar {
        position: fixed;
        right: 0.6rem;
        bottom: 0.6rem;
        left: 0.6rem;
        z-index: 40;
        padding: 0.35rem;
        border-right: 0;
        border: 1px solid rgba(203, 220, 232, 0.95);
        border-radius: 16px;
        box-shadow: 0 18px 34px rgba(31, 47, 61, 0.18);
        transition: transform 220ms ease, opacity 220ms ease;
        will-change: transform;
    }

    .sidebar.mobile-nav-hidden {
        transform: translateY(calc(100% + 1rem));
        opacity: 0;
        pointer-events: none;
    }

    .sidebar-brand {
        display: none;
    }

    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 0.2rem;
        margin-top: 0;
        overflow: visible;
    }

    .sidebar-nav a,
    .sidebar-nav .button {
        min-width: 0;
        height: 2.65rem;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.14rem;
        padding: 0.22rem 0.12rem;
        border: 1px solid transparent;
        border-radius: 11px;
        background: transparent;
        color: var(--muted);
        line-height: 1.1;
        text-align: center;
    }

    .sidebar-nav a.is-active {
        border-color: rgba(47, 127, 183, 0.22);
        background: var(--accent-soft);
        color: var(--accent);
    }

    .sidebar-nav a:hover,
    .sidebar-nav .button:hover {
        background: rgba(255, 255, 255, 0.75);
        color: var(--accent);
    }

    .nav-icon {
        width: 1.05rem;
        height: 1.05rem;
        flex-basis: 1.05rem;
    }

    .nav-label {
        max-width: 100%;
        font-size: 0.58rem;
        font-weight: 700;
    }

    .dashboard-grid,
    .grid-two {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 1rem 1rem 7rem;
        min-width: 0;
        min-height: auto;
    }
}

@media (max-width: 380px) {
    .sidebar-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sidebar-nav a,
    .sidebar-nav .button {
        height: 2.45rem;
    }

    .nav-label {
        font-size: 0.54rem;
    }
}

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

.settings-card {
    display: grid;
    gap: 1rem;
}

.settings-card-wide {
    grid-column: span 2;
}

.settings-kv {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 0.6rem 1rem;
}

.settings-kv span {
    color: var(--muted);
}

.settings-disclosure {
    border-top: 1px solid var(--border);
    padding-top: 0.85rem;
}

.settings-disclosure summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--accent);
}

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

.mini-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0;
    border-top: 1px solid var(--border);
}

.inline-top-gap {
    margin-top: 1rem;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
}

.check-row input {
    width: auto;
}

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

textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    resize: vertical;
    font: inherit;
}

@media (max-width: 960px) {
    .settings-grid,
    .settings-card-wide,
    .grid-two-form,
    .task-form-secondary {
        grid-template-columns: 1fr;
    }

    .settings-card-wide {
        grid-column: span 1;
    }

    .settings-kv {
        grid-template-columns: 1fr;
    }

    .mini-row,
    .stack-mobile {
        flex-direction: column;
    }
}

.tasks-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.dashboard-quick-task {
    display: grid;
    gap: 1rem;
}

.dashboard-quick-task-form {
    display: grid;
    gap: 0.85rem;
}

.dashboard-quick-task-copy {
    display: grid;
    gap: 0.25rem;
}

.dashboard-quick-task-copy h3,
.dashboard-quick-task-copy p {
    margin-bottom: 0;
}

.dashboard-quick-task-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: stretch;
}

.dashboard-quick-task-input textarea {
    min-height: 4.35rem;
    resize: vertical;
}

.dashboard-quick-task-actions {
    display: flex;
    gap: 0.55rem;
    align-items: stretch;
}

.dashboard-quick-task-actions .button,
.dashboard-quick-task-actions .icon-button {
    min-height: 4.35rem;
}

.dashboard-quick-task-status {
    display: block;
}

.project-map-panel {
    display: grid;
    gap: 1rem;
}

.project-map-shell {
    display: grid;
    gap: 0.75rem;
}

.project-map-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-self: end;
}

.project-map-toolbar .icon-button {
    min-width: 38px;
    min-height: 38px;
    padding: 0.45rem 0.7rem;
    font-weight: 800;
}

.project-map-zoom-value {
    min-width: 3.6rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.project-map-viewport {
    position: relative;
    height: min(62vh, 620px);
    min-height: 360px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(rgba(203, 220, 232, 0.34) 1px, transparent 1px),
        linear-gradient(90deg, rgba(203, 220, 232, 0.34) 1px, transparent 1px),
        rgba(231, 243, 251, 0.38);
    background-size: 34px 34px;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.project-map-viewport.is-dragging {
    cursor: grabbing;
}

.project-map-surface {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    transform-origin: 0 0;
    will-change: transform;
}

.project-map-lines,
.project-map-nodes {
    position: absolute;
    inset: 0;
}

.project-map-lines {
    overflow: visible;
    pointer-events: none;
}

.project-map-line {
    fill: none;
    stroke: rgba(47, 127, 183, 0.38);
    stroke-width: 2.7;
    stroke-linecap: round;
}

.project-map-node {
    position: absolute;
    width: 220px;
    min-height: 74px;
    padding: 0.78rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(251, 253, 255, 0.95);
    box-shadow: 0 12px 28px rgba(31, 47, 61, 0.08);
    color: var(--text);
    text-decoration: none;
    display: grid;
    gap: 0.25rem;
    white-space: normal;
    cursor: pointer;
}

.project-map-node strong,
.project-map-node span {
    overflow-wrap: anywhere;
}

.project-map-node strong {
    font-size: 0.95rem;
}

.project-map-node span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.project-map-node-project {
    border-color: rgba(47, 127, 183, 0.42);
    background: linear-gradient(180deg, rgba(220, 239, 249, 0.96), rgba(251, 253, 255, 0.96));
}

.project-map-node-focus {
    box-shadow: inset 4px 0 0 var(--accent), 0 12px 28px rgba(31, 47, 61, 0.08);
}

.project-map-node-task-completed {
    opacity: 0.68;
}

.project-map-empty-task {
    border-style: dashed;
    color: var(--muted);
}

.tasks-list-card,
.tasks-create-card {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.voice-dictation-bar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.voice-dictation-button {
    min-width: 42px;
    min-height: 42px;
    padding: 0.55rem;
    font-size: 1.05rem;
}

.voice-dictation-button-active {
    box-shadow: 0 0 0 4px rgba(182, 72, 58, 0.16);
}

.task-form-secondary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(96px, 128px);
    gap: 0.6rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(231, 243, 251, 0.55);
    align-items: end;
}

.task-meta-field {
    gap: 0.3rem;
    font-size: 0.84rem;
    font-weight: 600;
    min-width: 0;
}

.task-meta-field span {
    color: var(--muted);
}

.task-meta-field input {
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    min-width: 0;
}

.task-meta-field input[type="time"] {
    max-width: 128px;
}

.calendar-blocked-warning {
    padding: 0.85rem 0.95rem;
    border: 1px solid #efc8c0;
    border-radius: 14px;
    background: #fff4f1;
    color: #8f2a1e;
    font-size: 0.92rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
}

.task-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    min-width: 0;
}

.task-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(231,243,251,0.86));
    display: grid;
    gap: 0.9rem;
    min-width: 0;
}

.task-card-overdue {
    background: linear-gradient(180deg, #fff6f4, #fde8e3);
    border-color: #efc8c0;
}

.task-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.task-card-head > div,
.weekly-item > div,
.detail-grid > div {
    min-width: 0;
}

.task-card strong,
.weekly-item strong,
.mini-row span,
td,
th {
    overflow-wrap: anywhere;
}

.task-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.task-card-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    background: rgba(231, 237, 240, 0.75);
    color: #3d5964;
    line-height: 1.15;
    align-self: flex-start;
}

.proposal-box {
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    background: rgba(255, 248, 220, 0.65);
    display: grid;
    gap: 0.35rem;
}

.task-card-actions,
.reschedule-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.task-card-disclosure {
    display: grid;
    gap: 0.65rem;
}

.task-card-disclosure-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    list-style: none;
    width: fit-content;
}

.task-card-disclosure-summary::-webkit-details-marker {
    display: none;
}

.task-card-disclosure-summary::before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(220, 239, 249, 0.55);
    font-size: 0.95rem;
    line-height: 1;
}

.task-card-disclosure[open] .task-card-disclosure-summary::before {
    content: '-';
}

.task-card-reschedule-form {
    padding-top: 0.15rem;
}

.task-card-reschedule-form label {
    min-width: 88px;
    flex: 1 1 110px;
    font-size: 0.82rem;
}

.task-card-reschedule-form input {
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
}

.task-card-reschedule-form input[type="time"] {
    max-width: 112px;
}

.task-card-reschedule-form input[type="number"] {
    max-width: 96px;
}

.icon-button,
.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0.6rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.85);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    align-self: flex-start;
}

.icon-button-danger {
    background: #f8e2de;
    color: #7f2b20;
    border-color: #e7b8b0;
}

.actions-cell {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    min-width: 0;
}

.latest-task-action-icons,
.inline-reschedule-form {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    align-items: end;
}

.latest-task-action-icons {
    width: 100%;
}

.latest-tasks-section tbody tr:not(.latest-task-separator-row) td {
    background: #f1f3f2;
}

.latest-tasks-section tbody tr:not(.latest-task-separator-row):hover td {
    background: #ecefed;
}

.latest-tasks-section tbody tr.task-row-overdue td {
    background: #fde8e3;
}

.latest-tasks-section tbody tr.task-row-overdue:hover td {
    background: #fbd8d0;
}

.latest-task-separator-row td {
    padding: 1.15rem 0.8rem 0.45rem;
    border-bottom: 1px solid rgba(203, 220, 232, 0.55);
    background: transparent;
}

.latest-task-separator-row span,
.latest-task-mobile-separator span {
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.latest-task-separator-row small,
.latest-task-mobile-separator small {
    margin-left: 0.55rem;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
}

.latest-tasks-mobile-list {
    display: none;
}

.latest-task-mobile-separator {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.15rem 0.1rem;
    border-bottom: 1px solid rgba(203, 220, 232, 0.7);
}

.latest-task-mobile-card {
    display: grid;
    gap: 0.75rem;
    padding: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #f1f3f2;
}

.latest-task-mobile-card.task-row-overdue {
    background: #fde8e3;
    border-color: #e7b8b0;
}

.latest-task-mobile-head,
.latest-task-mobile-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.latest-task-mobile-meta {
    color: var(--muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.inline-reschedule-form {
    width: 100%;
    margin-top: 0.25rem;
}

.inline-reschedule-form label {
    min-width: 90px;
    flex: 1 1 110px;
    font-size: 0.9rem;
}

.inline-reschedule-form input {
    padding: 0.55rem 0.7rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    text-transform: uppercase;
    align-self: flex-start;
}

.badge {
    align-self: flex-start;
}

.status-pill-completed {
    background: #dceff9;
    color: #27648f;
}

.status-pill-pending {
    background: #f3e5c4;
    color: #7a5a07;
}

.status-pill-scheduled {
    background: #e7edf0;
    color: #3d5964;
}

.task-row-completed td {
    opacity: 0.7;
}

.task-row-completed td:first-child {
    text-decoration: line-through;
}

.task-row-overdue td {
    background: #fde8e3;
}

.task-row-focus td {
    animation: task-focus-flash 2.4s ease-out 1;
}

.latest-tasks-section table tbody tr:not(.latest-task-separator-row):not(.task-row-overdue) > td {
    background-color: #f1f3f2;
}

.latest-tasks-section table tbody tr:not(.latest-task-separator-row):not(.task-row-overdue):hover > td {
    background-color: #ecefed;
}

.latest-tasks-section table tbody tr.task-row-overdue > td {
    background-color: #fde8e3;
}

.latest-tasks-section table tbody tr.task-row-overdue:hover > td {
    background-color: #fbd8d0;
}

.reschedule-form label {
    min-width: 120px;
    flex: 1 1 140px;
}

.weekly-list {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.15rem 0.15rem 0.85rem;
    margin-inline: -0.15rem;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: rgba(47, 127, 183, 0.35) rgba(231, 243, 251, 0.65);
    -webkit-overflow-scrolling: touch;
}

.weekly-list.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.weekly-list::-webkit-scrollbar {
    height: 10px;
}

.weekly-list::-webkit-scrollbar-track {
    background: rgba(231, 243, 251, 0.65);
    border-radius: 999px;
}

.weekly-list::-webkit-scrollbar-thumb {
    background: rgba(47, 127, 183, 0.35);
    border-radius: 999px;
}

.weekly-item {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    background: rgba(251, 253, 255, 0.92);
    scroll-snap-align: start;
    min-height: 220px;
    align-content: space-between;
}

.weekly-day-column {
    flex: 0 0 min(380px, calc(100vw - 3rem));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-self: stretch;
    scroll-snap-align: start;
}

.weekly-day-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.25rem 0.1rem;
    border-bottom: 1px solid rgba(203, 220, 232, 0.82);
}

.weekly-day-head strong {
    font-size: 0.92rem;
}

.weekly-day-head span,
.weekly-day-empty {
    color: var(--muted);
    font-size: 0.85rem;
}

.weekly-day-items {
    display: grid;
    gap: 0.85rem;
    align-content: start;
}

.weekly-day-empty {
    padding: 1rem;
    border: 1px dashed var(--border);
    border-radius: 16px;
    background: rgba(251, 253, 255, 0.56);
}

.weekly-item-overdue {
    background: #fff4f1;
    border: 1px solid #efc8c0;
    border-radius: 16px;
    padding: 1rem;
}

.weekly-meta {
    display: grid;
    gap: 0.3rem;
    color: var(--muted);
    text-align: left;
}

.weekly-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
    margin-top: 0.35rem;
}

@keyframes task-focus-flash {
    0% {
        box-shadow: inset 0 0 0 9999px rgba(243, 229, 196, 0.85);
    }

    100% {
        box-shadow: inset 0 0 0 9999px rgba(243, 229, 196, 0);
    }
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1rem;
    min-width: 0;
}

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

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

.calendar-grid-head {
    margin-bottom: 0.75rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.calendar-weekday {
    text-align: center;
    font-weight: 600;
}

.calendar-weekday-short {
    display: none;
}

.calendar-cell {
    min-height: 120px;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.9rem;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    display: grid;
    gap: 0.3rem;
}

.calendar-cell-shell {
    position: relative;
    min-height: 120px;
}

.calendar-cell-shell-blocked .calendar-cell {
    background: linear-gradient(180deg, #fff2f0, #f8deda);
    border-color: #efc8c0;
}

.calendar-cell-shell-blocked .calendar-cell strong {
    color: #8f2a1e;
}

.calendar-day-lock-form {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 2;
}

.calendar-day-lock-button {
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(251, 253, 255, 0.92);
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.calendar-cell-shell-blocked .calendar-day-lock-button {
    border-color: #efc8c0;
    background: #fff4f1;
    color: #8f2a1e;
}

.calendar-count {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.15;
}

.calendar-count-short {
    display: none;
}

.calendar-count-scheduled {
    background: #dceff9;
    color: #27648f;
}

.calendar-count-overdue {
    background: #f7d8d4;
    color: #8f2a1e;
}

.calendar-cell-empty {
    background: transparent;
    border-style: dashed;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    text-transform: uppercase;
}

.badge-critical {
    background: #f7d8d4;
    color: #8f2a1e;
}

.badge-high {
    background: #f3e5c4;
    color: #7a5a07;
}

.badge-medium {
    background: #dceff9;
    color: #27648f;
}

.badge-low {
    background: #e7edf0;
    color: #3d5964;
}

@media (max-width: 960px) {
    .tasks-layout,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .tasks-layout,
    .tasks-layout > *,
    .table-wrap,
    .section-head,
    .task-cards-row,
    .detail-grid {
        min-width: 0;
    }

    .calendar-head,
    .task-card-head {
        flex-direction: column;
    }

    .weekly-meta {
        text-align: left;
    }

    .weekly-item-actions {
        justify-content: flex-start;
    }

    .weekly-day-column {
        flex-basis: min(310px, calc(100vw - 2.3rem));
    }

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

    .quick-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .quick-links .button {
        width: 100%;
    }

    .dashboard-quick-task-input,
    .dashboard-quick-task-actions {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .dashboard-quick-task-actions .button,
    .dashboard-quick-task-actions .icon-button {
        width: 100%;
        min-height: 2.85rem;
    }

    .project-map-viewport {
        height: 470px;
        min-height: 340px;
    }

    .project-map-toolbar {
        justify-self: stretch;
        justify-content: flex-end;
    }

    .task-card-actions,
    .reschedule-form,
    .latest-task-action-icons {
        width: 100%;
    }

    .inline-reschedule-form label,
    .reschedule-form label {
        min-width: 0;
    }

    .table-wrap {
        max-width: 100%;
        overflow-x: auto;
    }

    .table-wrap table {
        min-width: 560px;
    }

    .table-wrap {
        display: none;
    }

    .latest-tasks-mobile-list {
        display: grid;
        gap: 0.85rem;
    }

    .actions-cell,
    .latest-task-action-icons {
        justify-content: flex-start;
    }

    .latest-task-mobile-head,
    .latest-task-mobile-meta {
        flex-direction: column;
    }

    .section-head,
    .section-head > div,
    .task-card p,
    .weekly-item p,
    td,
    th,
    span,
    strong {
        min-width: 0;
        word-break: break-word;
    }

    .calendar-grid {
        gap: 0.28rem;
    }

    .calendar-grid-head {
        margin-bottom: 0.4rem;
        font-size: 0.68rem;
    }

    .calendar-weekday-long {
        display: none;
    }

    .calendar-weekday-short {
        display: inline;
    }

    .calendar-cell {
        min-height: 68px;
        aspect-ratio: 1 / 1.05;
        padding: 0.35rem 0.28rem;
        border-radius: 12px;
        gap: 0.22rem;
        align-content: start;
    }

    .calendar-cell strong {
        font-size: 0.82rem;
        line-height: 1;
    }

    .calendar-count {
        justify-content: center;
        min-width: 1.55rem;
        padding: 0.16rem 0.22rem;
        font-size: 0.62rem;
        border-radius: 10px;
    }

    .calendar-count-label {
        display: none;
    }

    .calendar-count-short {
        display: inline;
    }

    .calendar-count-value {
        font-weight: 700;
    }

    .calendar-cell-shell {
        min-height: 68px;
    }

    .calendar-day-lock-form {
        top: 0.18rem;
        right: 0.18rem;
    }

    .calendar-day-lock-button {
        width: 1.2rem;
        height: 1.2rem;
        font-size: 0.68rem;
    }
}

.projects-layout,
.projects-detail-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.projects-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
    align-items: start;
}

.project-card,
.project-create-card {
    display: grid;
    gap: 1rem;
}

.project-card {
    gap: 0.75rem;
    padding: 1rem;
}

.project-card-head,
.project-card-meta,
.project-card-actions,
.project-task-main {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.project-card-meta,
.project-task-meta {
    color: var(--muted);
    flex-wrap: wrap;
}

.project-card-head {
    align-items: flex-start;
}

.project-card h3 {
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.project-card-description {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-meta {
    gap: 0.5rem;
}

.project-card-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 252, 246, 0.9);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
}

.project-card-actions {
    align-items: center;
}

.project-task-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: flex-start;
    justify-content: flex-end;
    margin-top: 0.85rem;
}

.project-task-actions form {
    margin: 0;
}

.project-task-edit-disclosure {
    position: relative;
}

.project-task-edit-disclosure > summary {
    list-style: none;
}

.project-task-edit-disclosure > summary::-webkit-details-marker {
    display: none;
}

.project-task-edit-form {
    width: min(560px, calc(100vw - 3rem));
    margin-top: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.project-task-minutes-field {
    max-width: 160px;
}

.project-card-disclosure {
    width: 100%;
}

.project-card-disclosure-summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.project-card-disclosure-summary::-webkit-details-marker {
    display: none;
}

.project-card-disclosure-body {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.project-task-tree {
    display: grid;
    gap: 1rem;
}

.project-task-node {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    background: rgba(251, 253, 255, 0.9);
}

.project-task-children {
    margin-top: 1rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border);
    display: grid;
    gap: 1rem;
}

.subtask-form {
    max-width: 720px;
}

.subtask-disclosure {
    max-width: 720px;
}

.subtask-disclosure-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    list-style: none;
}

.subtask-disclosure-summary::-webkit-details-marker {
    display: none;
}

.subtask-disclosure-summary::before {
    content: '+';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(220, 239, 249, 0.55);
    font-size: 0.95rem;
    line-height: 1;
}

.subtask-disclosure[open] .subtask-disclosure-summary::before {
    content: '-';
}

@media (max-width: 960px) {
    .projects-layout,
    .projects-detail-layout {
        grid-template-columns: 1fr;
    }

    .project-card-head,
    .project-card-meta,
    .project-card-actions,
    .project-task-actions,
    .project-task-main {
        flex-direction: column;
    }

    .project-card-disclosure,
    .project-card-disclosure-summary {
        width: 100%;
    }

    .project-task-children {
        margin-left: 0.5rem;
        padding-left: 0.75rem;
    }
}

.capture-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.capture-card,
.capture-item-card,
.capture-list {
    display: grid;
    gap: 1rem;
}

.capture-list {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.9rem;
    align-items: start;
}

.capture-card {
    min-width: 0;
}

.contacts-results {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.contact-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: end;
    padding: 1rem;
}

.contact-search-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.capture-item-card {
    gap: 0.8rem;
    padding: 1rem;
    min-width: 0;
    align-content: start;
    background:
        radial-gradient(circle at top right, rgba(220, 239, 249, 0.58), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(231, 243, 251, 0.92));
}

.capture-item-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.capture-item-head h3 {
    margin-bottom: 0.18rem;
    font-size: 1rem;
}

.capture-item-meta {
    margin: 0;
    font-size: 0.82rem;
}

.capture-item-preview {
    margin: 0;
    color: var(--text);
    font-size: 0.94rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-wrap;
    min-width: 0;
}

.contact-detail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.contact-detail-list a {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.capture-item-actions {
    display: flex;
    justify-content: flex-end;
}

.capture-item-disclosure {
    width: 100%;
}

.capture-item-disclosure-summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.45rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.capture-item-disclosure-summary::-webkit-details-marker {
    display: none;
}

.capture-item-disclosure-body {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 960px) {
    .capture-layout,
    .capture-list {
        grid-template-columns: 1fr;
    }

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

    .contact-search-actions {
        justify-content: stretch;
    }

    .contact-search-actions .button {
        flex: 1 1 120px;
    }

    .capture-item-head,
    .capture-item-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .capture-item-disclosure,
    .capture-item-disclosure-summary {
        width: 100%;
    }
}

.email-layout,
.email-detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.25rem;
    min-height: 0;
}

.email-detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
}

.email-accounts-card,
.email-list-card,
.email-detail-card,
.email-compose-card {
    display: grid;
    gap: 1rem;
    min-height: 0;
    overflow: hidden;
}

.email-accounts-card {
    grid-template-rows: auto auto auto;
    height: auto;
    overflow: visible;
}

.email-account-item,
.email-list-item {
    display: grid;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--text);
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(251, 253, 255, 0.9);
}

.email-list-item-active {
    border-color: rgba(47, 127, 183, 0.55);
    background: linear-gradient(180deg, rgba(220, 239, 249, 0.72), rgba(251, 253, 255, 0.96));
    box-shadow: inset 0 0 0 1px rgba(47, 127, 183, 0.08);
}

.email-account-item-active {
    border-color: rgba(47, 127, 183, 0.75);
    background: linear-gradient(135deg, rgba(47, 127, 183, 0.14), rgba(251, 253, 255, 0.96));
    box-shadow: inset 4px 0 0 var(--accent);
}

.email-pill {
    justify-self: start;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

.email-tracking-badge {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.email-tracking-sent {
    background: #dceff9;
    color: #27648f;
}

.email-tracking-pending {
    background: #f3ead8;
    color: #7a5a20;
}

.email-tracking-opened {
    background: #dceff9;
    color: #27648f;
}

.email-tracking-disabled {
    background: #ece7df;
    color: #6b6258;
}

.email-list-card {
    grid-template-rows: auto minmax(0, 1fr);
    height: 520px;
}

.email-sent-card {
    grid-column: 1 / -1;
    height: auto;
}

.email-sent-list {
    max-height: 305px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.email-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(240px, 1fr) auto auto;
    gap: 0.75rem;
    align-items: end;
}

.email-accounts-list,
.email-list {
    display: grid;
    gap: 0.8rem;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
    overscroll-behavior: contain;
}

.email-meta {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(231, 243, 251, 0.55);
}

.email-meta div {
    display: grid;
    gap: 0.28rem;
}

.email-meta strong {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.email-body {
    display: grid;
    gap: 1rem;
    padding: 1.2rem 1.25rem;
    background: rgba(255,255,255,0.86);
    border: 1px solid var(--border);
    border-radius: 18px;
    line-height: 1.62;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.email-detail-card {
    grid-template-rows: auto auto minmax(0, 1fr);
    height: 620px;
    min-height: 0;
}

.email-compose-card {
    align-content: start;
    height: 620px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.email-compose-field {
    display: grid;
    gap: 0.65rem;
}

.email-draft-trigger {
    display: grid;
    gap: 0.85rem;
    padding: 1rem 1.05rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(231, 243, 251, 0.55);
}

.email-draft-modal {
    width: min(860px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(231,243,251,0.96));
    box-shadow: 0 28px 80px rgba(31, 47, 61, 0.22);
}

.email-draft-modal::backdrop {
    background: rgba(24, 36, 48, 0.48);
    backdrop-filter: blur(2px);
}

.email-draft-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

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

.email-draft-subject {
    grid-column: 1 / -1;
}

.email-draft-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.email-body p,
.email-body-fallback {
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.email-body p + p,
.email-body-fallback p + p {
    margin-top: 0.15rem;
}

.email-rendered {
    display: grid;
    gap: 1rem;
}

.email-rendered p,
.email-rendered ul,
.email-rendered ol,
.email-rendered blockquote,
.email-rendered h1,
.email-rendered h2,
.email-rendered h3,
.email-rendered h4 {
    margin: 0;
}

.email-rendered ul,
.email-rendered ol {
    padding-left: 1.35rem;
}

.email-rendered li + li {
    margin-top: 0.45rem;
}

.email-rendered a {
    color: var(--accent);
    text-decoration: underline;
}

.email-rendered blockquote {
    padding-left: 1rem;
    border-left: 3px solid rgba(47, 127, 183, 0.28);
    color: var(--muted);
}

.email-accounts-list,
.email-list,
.email-body,
.email-accounts-card,
.email-compose-card {
    scrollbar-width: thin;
    scrollbar-color: rgba(47, 127, 183, 0.35) rgba(231, 243, 251, 0.65);
}

.email-accounts-list::-webkit-scrollbar,
.email-list::-webkit-scrollbar,
.email-body::-webkit-scrollbar,
.email-accounts-card::-webkit-scrollbar,
.email-compose-card::-webkit-scrollbar {
    width: 10px;
}

.email-accounts-list::-webkit-scrollbar-track,
.email-list::-webkit-scrollbar-track,
.email-body::-webkit-scrollbar-track,
.email-accounts-card::-webkit-scrollbar-track,
.email-compose-card::-webkit-scrollbar-track {
    background: rgba(231, 243, 251, 0.65);
    border-radius: 999px;
}

.email-accounts-list::-webkit-scrollbar-thumb,
.email-list::-webkit-scrollbar-thumb,
.email-body::-webkit-scrollbar-thumb,
.email-accounts-card::-webkit-scrollbar-thumb,
.email-compose-card::-webkit-scrollbar-thumb {
    background: rgba(47, 127, 183, 0.35);
    border-radius: 999px;
}

@media (max-width: 960px) {
    .email-page {
        grid-template-rows: auto;
        height: auto;
        gap: 1rem;
        overflow: visible;
    }

    .email-layout,
    .email-detail-layout {
        grid-template-columns: 1fr;
    }

    .email-accounts-card,
    .email-list-card,
    .email-detail-card,
    .email-compose-card,
    .email-accounts-list,
    .email-list,
    .email-body {
        overflow: visible;
        max-height: none;
        height: auto;
    }

    .email-draft-modal {
        width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
        padding: 1rem;
    }

    .email-draft-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 960px) {
    .logout-form {
        display: inline-flex;
        min-width: 0;
        margin-top: 0;
    }

    .main-content {
        padding-bottom: 7rem;
    }

    .table-wrap {
        -webkit-overflow-scrolling: touch;
    }
}
