:root {
    color-scheme: light;
    --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --bg-main: #f3f7ff;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --bg-muted: #edf2fc;
    --bg-sidebar: #0b1b42;
    --bg-sidebar-hover: rgb(255 255 255 / 8%);
    --bg-sidebar-active: rgb(255 255 255 / 13%);
    --bg-overlay: rgb(2 6 23 / 62%);

    --text-primary: #0b1b42;
    --text-secondary: #56668c;
    --text-muted: #7785a5;
    --text-inverse: #ffffff;
    --text-sidebar: #f8fafc;
    --text-sidebar-muted: rgb(248 250 252 / 68%);

    --border-color: #dce4f1;
    --border-strong: #c4cee0;
    --focus-ring: #235ff8;

    --accent-primary: #235ff8;
    --accent-primary-hover: #1748cb;
    --accent-secondary: #f15624;
    --accent-tangelo: #f15624;

    --capacity-available: #168a45;
    --capacity-moderate: #235ff8;
    --capacity-high: #f15624;
    --capacity-full: #d42d2d;

    --status-success: #168a45;
    --status-info: #235ff8;
    --status-warning: #b45309;
    --status-danger: #d42d2d;

    --shadow-sm: 0 2px 8px rgb(11 27 66 / 7%);
    --shadow-md: 0 12px 30px rgb(11 27 66 / 12%);
    --shadow-lg: 0 24px 60px rgb(2 6 23 / 25%);

    --radius-sm: 0.4rem;
    --radius-md: 0.65rem;
    --radius-lg: 0.85rem;
    --sidebar-width: 16rem;
    --content-max: 95rem;
    --transition-fast: 160ms ease;
    --transition-base: 260ms ease;
}

/* Follow Up */
.nav-count { display: grid; min-width: 1.35rem; height: 1.35rem; place-items: center; margin-left: auto; border-radius: 999px; background: var(--accent-secondary); color: #fff; font-size: 0.62rem; font-weight: 900; }
.follow-up-page { display: grid; gap: 1.5rem; }
.follow-up-page-heading { align-items: center; }
.follow-up-toggle { display: flex; min-width: min(100%, 22rem); align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-card); box-shadow: var(--shadow-sm); padding: 0.75rem 0.85rem; cursor: pointer; }
.follow-up-toggle > span:first-child { display: flex; min-width: 0; flex-direction: column; }
.follow-up-toggle strong { font-size: 0.76rem; }
.follow-up-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { position: relative; display: block; width: 2.65rem; height: 1.45rem; flex: 0 0 auto; border-radius: 999px; background: var(--border-strong); transition: background-color var(--transition-fast); }
.toggle-track > span { position: absolute; top: 0.2rem; left: 0.2rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--transition-fast); }
.follow-up-toggle input:checked + .toggle-track { background: var(--accent-primary); }
.follow-up-toggle input:checked + .toggle-track > span { transform: translateX(1.2rem); }
.follow-up-toggle input:focus-visible + .toggle-track { outline: 3px solid color-mix(in srgb, var(--focus-ring) 55%, transparent); outline-offset: 3px; }
.follow-up-summary-strip { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid color-mix(in srgb, var(--accent-primary) 20%, var(--border-color)); border-radius: var(--radius-md); background: color-mix(in srgb, var(--accent-primary) 6%, var(--bg-card)); padding: 0.85rem 1rem; }
.follow-up-summary-strip > div, .dashboard-return { display: flex; align-items: center; gap: 0.45rem; }
.follow-up-summary-strip > div > .material-icons-round { color: var(--accent-primary); }
.follow-up-summary-strip strong { font-size: 0.82rem; }
.follow-up-summary-strip > div > span:last-child { color: var(--text-secondary); font-size: 0.75rem; }
.follow-up-summary-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.4rem 1rem; }
.follow-up-summary-actions form { margin: 0; }
.dashboard-return, .clear-all-button { border: 0; background: transparent; cursor: pointer; }
.dashboard-return .material-icons-round, .clear-all-button .material-icons-round { font-size: 1rem; }
.follow-up-summary-actions .dashboard-return:hover,
.follow-up-summary-actions .clear-all-button:hover { text-decoration: none; }
.follow-up-summary-actions .clear-all-button { display: flex; align-items: center; gap: 0.35rem; color: var(--status-danger); }
.clear-all-button:disabled { cursor: default; opacity: 0.4; }
.follow-up-message { border: 1px solid color-mix(in srgb, var(--status-success) 35%, var(--border-color)); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--status-success) 8%, var(--bg-card)); color: var(--status-success); padding: 0.65rem 0.8rem; font-size: 0.72rem; font-weight: 800; }
.follow-up-message.is-error { border-color: color-mix(in srgb, var(--status-danger) 35%, var(--border-color)); background: color-mix(in srgb, var(--status-danger) 8%, var(--bg-card)); color: var(--status-danger); }
.follow-up-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(18rem, 0.8fr); align-items: start; gap: 1.5rem; }
.follow-up-list-panel, .bullet-preview-card { border: 1px solid var(--border-color); border-top: 0.28rem solid var(--accent-primary); border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--shadow-sm); }
.follow-up-list-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border-color); padding: 1.15rem 1.25rem; }
.follow-up-list-panel h2, .bullet-preview-card h2 { margin: 0; font-size: 1rem; }
.follow-up-list-panel header p, .bullet-preview-card header p { margin: 0.15rem 0 0; color: var(--text-secondary); font-size: 0.7rem; }
.saved-state { display: inline-flex; align-items: center; gap: 0.2rem; color: var(--status-success); font-size: 0.68rem; font-weight: 800; }
.saved-state .material-icons-round { font-size: 0.95rem; }
.saved-state.is-saving { color: var(--text-muted); }
.follow-up-list { display: grid; gap: 0.8rem; padding: 1rem; }
.follow-up-item { display: grid; grid-template-columns: auto minmax(0, 1fr); border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-main); transition: border-color var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast); }
.follow-up-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.follow-up-item.is-dragging { opacity: 0.42; }
.follow-up-item.is-drag-target { border-top: 3px solid var(--accent-primary); }
.follow-up-item.is-unavailable { border-style: dashed; }
.follow-up-item__drag { display: flex; align-items: flex-start; border-right: 1px solid var(--border-color); padding: 1rem 0.45rem; }
.follow-up-item__content { min-width: 0; padding: 0.9rem 1rem 1rem; }
.follow-up-item__content > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.follow-up-item__labels { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.item-type-badge { border-radius: 999px; background: color-mix(in srgb, var(--accent-primary) 11%, var(--bg-card)); color: var(--accent-primary); padding: 0.2rem 0.5rem; font-size: 0.6rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.item-context { overflow: hidden; color: var(--text-secondary); font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.item-unavailable { color: var(--status-danger); font-size: 0.63rem; font-weight: 800; }
.follow-up-item__actions { display: flex; align-items: center; }
.remove-button { width: 1.9rem; height: 1.9rem; color: var(--text-muted); }
.remove-button .material-icons-round { font-size: 1rem; }
.remove-button:hover { background: color-mix(in srgb, var(--status-danger) 10%, transparent); color: var(--status-danger); }
.item-title { margin: 0.55rem 0 0.75rem; font-size: 0.94rem; line-height: 1.35; }
.note-field { display: grid; gap: 0.35rem; }
.note-field > span { color: var(--text-secondary); font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.note-field small { color: var(--text-muted); font-size: 0.58rem; font-weight: 600; }
.note-field textarea { width: 100%; min-height: 3.6rem; resize: vertical; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-primary); padding: 0.65rem 0.75rem; font-size: 0.76rem; }
.note-field textarea:focus { border-color: var(--accent-primary); outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 14%, transparent); }
.bullet-preview-card { position: sticky; top: 2rem; overflow: hidden; }
.bullet-preview-card > header { display: flex; gap: 0.7rem; border-bottom: 1px solid var(--border-color); padding: 1.15rem 1.25rem; }
.bullet-preview-card > header > .material-icons-round { color: var(--accent-primary); }
.bullet-preview { display: grid; gap: 0.85rem; margin: 0; padding: 1.25rem 1.25rem 1.25rem 2.35rem; color: var(--text-secondary); font-size: 0.76rem; }
.bullet-preview-empty { margin: 1.25rem; color: var(--text-muted); font-size: 0.76rem; }
.send-email-action { display: grid; gap: 0.45rem; margin: 0 1.25rem 1.25rem; text-align: center; }
.send-email-action small, .last-sent { color: var(--text-muted); font-size: 0.62rem; line-height: 1.35; }
.last-sent { font-weight: 700; }
.follow-up-empty { display: grid; justify-items: center; padding: 3rem 1rem; text-align: center; }
.follow-up-empty > .material-icons-round { color: var(--text-muted); font-size: 2.4rem; }
.follow-up-empty h3 { margin: 0.4rem 0 1rem; font-size: 1rem; }
.follow-up-source-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.follow-up-source-button { display: inline-grid; width: 1.9rem; height: 1.9rem; flex: 0 0 auto; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--bg-card); color: var(--text-secondary); cursor: pointer; transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast); }
.follow-up-source-button:hover { border-color: var(--accent-primary); color: var(--accent-primary); transform: translateY(-1px); }
.follow-up-source-button.is-selected { border-color: color-mix(in srgb, var(--status-success) 32%, var(--border-color)); background: color-mix(in srgb, var(--status-success) 10%, var(--bg-card)); color: var(--status-success); }
.follow-up-source-button .material-icons-round { font-size: 1rem; }
.source-priority-list, .assignment-source-list { padding-left: 0 !important; list-style: none; counter-reset: priorities; }
.source-priority-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; counter-increment: priorities; }
.source-priority-list li > span::before { content: counter(priorities) ". "; }
.assignment-source-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.team-person__follow { display: flex; min-width: 13rem; align-items: center; justify-content: space-between; gap: 0.75rem; }
.editor-average.has-follow-up { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 0.75rem; }
.editor-average.has-follow-up > div { display: flex; flex-direction: column; }
.editor-item.has-follow-up { grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
.editor-person__identity.has-follow-up { min-width: 0; }
.editor-person__identity.has-follow-up > .follow-up-source-button { margin-left: auto; }

@media (max-width: 70rem) { .follow-up-layout { grid-template-columns: 1fr; } .bullet-preview-card { position: static; } }
@media (max-width: 52rem) { .follow-up-page-heading, .follow-up-summary-strip { align-items: stretch; flex-direction: column; } .follow-up-toggle { width: 100%; } }
@media (max-width: 34rem) { .follow-up-summary-actions { align-items: flex-start; flex-direction: column; } .follow-up-item { grid-template-columns: auto 1fr; } .follow-up-item__content > header { align-items: flex-start; } .follow-up-item__labels { align-items: flex-start; flex-direction: column; } .item-context { max-width: 12rem; } }
:root[data-theme="endeavor-dark"] {
    color-scheme: dark;
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-elevated: #273449;
    --bg-muted: #172033;
    --bg-sidebar: #020617;
    --bg-sidebar-hover: rgb(255 255 255 / 8%);
    --bg-sidebar-active: rgb(255 255 255 / 14%);
    --bg-overlay: rgb(0 0 0 / 72%);

    --text-primary: #f8fafc;
    --text-secondary: #aab7cf;
    --text-muted: #8492ac;
    --text-inverse: #ffffff;
    --text-sidebar: #f8fafc;
    --text-sidebar-muted: rgb(248 250 252 / 68%);

    --border-color: #334155;
    --border-strong: #475569;
    --focus-ring: #6c9bff;

    --accent-primary: #4f83ff;
    --accent-primary-hover: #76a0ff;
    --accent-secondary: #ff7b4f;
    --accent-tangelo: #ff7b4f;

    --capacity-available: #38b96a;
    --capacity-moderate: #6c9bff;
    --capacity-high: #ff7b4f;
    --capacity-full: #ff6262;

    --status-success: #38b96a;
    --status-info: #6c9bff;
    --status-warning: #fbbf24;
    --status-danger: #ff6262;

    --shadow-sm: 0 2px 8px rgb(0 0 0 / 18%);
    --shadow-md: 0 12px 30px rgb(0 0 0 / 25%);
    --shadow-lg: 0 24px 60px rgb(0 0 0 / 45%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 20rem;
    background: var(--bg-main);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    transition: background-color var(--transition-base), color var(--transition-base);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--focus-ring) 55%, transparent);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    transform: translateY(-200%);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    padding: 0.7rem 1rem;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    transform: none;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    width: 100vw;
    height: 100vh;
}

.sidebar {
    position: relative;
    z-index: 30;
    display: flex;
    min-height: 0;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid rgb(255 255 255 / 10%);
    background: var(--bg-sidebar);
    box-shadow: 0 0 30px rgb(2 6 23 / 18%);
    color: var(--text-sidebar);
}

.sidebar__scroll {
    min-height: 0;
    overflow-y: auto;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 1.4rem 1.5rem;
    border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.brand__organization {
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand__product {
    color: var(--text-sidebar-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.primary-navigation {
    padding: 0.9rem 1rem 1.5rem;
}

.nav-group + .nav-group {
    margin-top: 0.85rem;
}

.nav-group__label {
    margin: 0;
    padding: 0.55rem 0.75rem 0.3rem;
    color: rgb(255 255 255 / 48%);
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-list li + li {
    margin-top: 0.15rem;
}

.nav-link {
    display: flex;
    min-height: 2.45rem;
    align-items: center;
    gap: 0.7rem;
    border-radius: var(--radius-sm);
    padding: 0.48rem 0.7rem;
    color: var(--text-sidebar-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

a.nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: #ffffff;
}

.nav-link.is-active {
    background: var(--bg-sidebar-active);
    color: #ffffff;
    font-weight: 700;
}

.nav-link.is-planned {
    cursor: default;
}

.nav-link__icon {
    width: 1.25rem;
    font-size: 1.15rem;
    text-align: center;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-top: 1px solid rgb(255 255 255 / 10%);
    background: rgb(0 0 0 / 10%);
    padding: 0.75rem;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
}

.profile-avatar {
    display: grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-secondary);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
}

.profile-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.profile-copy strong {
    color: #ffffff;
    font-size: 0.78rem;
    line-height: 1.2;
}

.profile-copy small {
    overflow: hidden;
    color: var(--text-sidebar-muted);
    font-size: 0.59rem;
    letter-spacing: 0.05em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.main-content {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
}

.page-content {
    width: min(100%, var(--content-max));
    margin: 0 auto;
    padding: 2rem clamp(1.5rem, 3vw, 3rem) 3rem;
}

.mobile-header {
    display: none;
}

.dashboard {
    display: grid;
    min-width: 0;
    gap: 2rem;
}

.capacity-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-bottom: 0.38rem solid var(--accent-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-sidebar);
    box-shadow: var(--shadow-md);
    color: #ffffff;
    padding: clamp(2rem, 4vw, 2.6rem);
}

.capacity-hero__watermark {
    position: absolute;
    z-index: -1;
    top: -3.7rem;
    right: -3.2rem;
    color: rgb(255 255 255 / 5%);
    font-size: clamp(12rem, 22vw, 18rem);
}

.capacity-hero__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.capacity-hero__intro h2 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    color: rgb(255 255 255 / 92%);
    font-size: clamp(1.25rem, 2.5vw, 1.55rem);
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1.25;
    text-transform: uppercase;
}

.capacity-hero__intro p {
    max-width: 28rem;
    margin: 0.65rem 0 0;
    color: rgb(255 255 255 / 68%);
    font-size: 0.88rem;
}

.hero-info-button {
    display: inline-grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: rgb(255 255 255 / 48%);
    padding: 0.1rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.hero-info-button:hover {
    color: #ffffff;
}

.hero-info-button .material-icons-round {
    font-size: 1.2rem;
}

.capacity-hero__metric {
    display: flex;
    max-width: 24rem;
    flex-direction: column;
    text-align: right;
}

.capacity-hero__metric strong {
    color: #ffffff;
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
}

:is(
    .capacity-hero.capacity-band--capacity-available,
    .capacity-hero.capacity-band--moderately-committed,
    .capacity-hero.capacity-band--highly-committed,
    .capacity-hero.capacity-band--at-or-near-capacity
) .capacity-hero__metric strong {
    font-size: clamp(4.5rem, 8vw, 6rem);
}

.capacity-hero.capacity-band--capacity-available .capacity-hero__metric strong { color: var(--capacity-available); }
.capacity-hero.capacity-band--moderately-committed .capacity-hero__metric strong { color: var(--capacity-moderate); }
.capacity-hero.capacity-band--highly-committed .capacity-hero__metric strong { color: var(--capacity-high); }
.capacity-hero.capacity-band--at-or-near-capacity .capacity-hero__metric strong { color: var(--capacity-full); }

.capacity-hero__metric span {
    margin-top: 0.75rem;
    color: rgb(255 255 255 / 66%);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.capacity-hero__track {
    height: 1rem;
    margin-top: 2.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgb(0 0 0 / 40%);
    box-shadow: inset 0 2px 5px rgb(0 0 0 / 24%);
}

.capacity-hero__track span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--capacity-moderate);
    transition: width 1s ease;
}

.capacity-hero.capacity-band--capacity-available .capacity-hero__track span { background: var(--capacity-available); }
.capacity-hero.capacity-band--moderately-committed .capacity-hero__track span { background: var(--capacity-moderate); }
.capacity-hero.capacity-band--highly-committed .capacity-hero__track span { background: var(--capacity-high); }
.capacity-hero.capacity-band--at-or-near-capacity .capacity-hero__track span { background: var(--capacity-full); }

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.team-card {
    display: flex;
    min-width: 0;
    min-height: 26rem;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-top: 0.28rem solid var(--accent-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base), transform var(--transition-base), background-color var(--transition-base);
}

.team-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.team-card__body {
    padding: 1.5rem;
}

.team-card__header h2 {
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.35;
}

.team-card__header p {
    margin: 0.2rem 0 0;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
}

.team-card__header p span {
    color: var(--text-muted);
}

.team-capacity {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    margin: 1.55rem 0;
}

.capacity-ring {
    position: relative;
    display: grid;
    width: 4rem;
    height: 4rem;
    flex: 0 0 auto;
    place-items: center;
    border: 0.36rem solid color-mix(in srgb, var(--text-secondary) 15%, transparent);
    border-radius: 50%;
    color: var(--text-muted);
}

.team-capacity[class*="capacity-band--"] .capacity-ring {
    border: 0;
    background: conic-gradient(
        var(--capacity-ring-color) var(--capacity-progress),
        color-mix(in srgb, var(--text-secondary) 15%, transparent) 0
    );
}

.team-capacity[class*="capacity-band--"] .capacity-ring::before {
    position: absolute;
    inset: 0.36rem;
    border-radius: 50%;
    background: var(--bg-card);
    content: "";
}

.capacity-ring > * {
    position: relative;
    z-index: 1;
}

.capacity-ring .material-icons-round {
    font-size: 1.5rem;
}

.team-capacity .capacity-ring__value {
    font-size: 1.125rem;
    font-weight: 900;
}

.team-capacity.capacity-band--capacity-available .capacity-ring { --capacity-ring-color: var(--capacity-available); color: var(--capacity-available); }
.team-capacity.capacity-band--moderately-committed .capacity-ring { --capacity-ring-color: var(--capacity-moderate); color: var(--capacity-moderate); }
.team-capacity.capacity-band--highly-committed .capacity-ring { --capacity-ring-color: var(--capacity-high); color: var(--capacity-high); }
.team-capacity.capacity-band--at-or-near-capacity .capacity-ring { --capacity-ring-color: var(--capacity-full); color: var(--capacity-full); }

.team-capacity.capacity-band--capacity-available > div:last-child > strong { color: var(--capacity-available); }
.team-capacity.capacity-band--moderately-committed > div:last-child > strong { color: var(--capacity-moderate); }
.team-capacity.capacity-band--highly-committed > div:last-child > strong { color: var(--capacity-high); }
.team-capacity.capacity-band--at-or-near-capacity > div:last-child > strong { color: var(--capacity-full); }

.team-capacity > div:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.team-capacity strong {
    color: var(--text-primary);
    font-size: 0.82rem;
}

.team-capacity span {
    color: var(--text-secondary);
    font-size: 0.68rem;
}

.team-priorities h3 {
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.72rem;
    padding-bottom: 0.35rem;
}

.team-card__narrative {
    display: -webkit-box;
    margin: 0 0 1rem;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.45;
}

.team-priorities ol,
.assignment-list {
    margin: 0.75rem 0 0;
    color: var(--text-secondary);
    font-size: 0.76rem;
    padding-left: 1.1rem;
}

.team-priorities li + li,
.assignment-list li + li {
    margin-top: 0.35rem;
}

.empty-state {
    margin: 1rem 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

.team-card__footer {
    padding: 0 1.5rem 1.25rem;
}

.team-card__footer p {
    margin: 0.65rem 0 0;
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 600;
    text-align: center;
}

.button {
    display: inline-flex;
    min-height: 2.45rem;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 0.62rem 1rem;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    transition: background-color var(--transition-fast), transform var(--transition-fast), opacity var(--transition-fast);
}

button.button {
    cursor: pointer;
}

.button--primary {
    background: var(--accent-primary);
    color: #ffffff;
}

.button--primary:hover:not(.is-disabled) {
    background: var(--accent-primary-hover);
    transform: translateY(-1px);
}

.button--block {
    width: 100%;
}

.button.is-disabled {
    cursor: default;
    opacity: 0.48;
}

.icon-button {
    display: inline-grid;
    width: 2.4rem;
    height: 2.4rem;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.icon-button:hover {
    background: color-mix(in srgb, var(--text-primary) 7%, transparent);
}

.team-drawer {
    position: relative;
    min-width: 0;
    max-width: 100%;
    border: 1px solid var(--border-color);
    border-top: 0.28rem solid var(--accent-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    padding: clamp(1.5rem, 3vw, 2rem);
}

.team-drawer[hidden] {
    display: none;
}

.team-drawer__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    color: var(--text-secondary);
}

.team-drawer__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    padding-right: 2.5rem;
}

.team-drawer__header h2 {
    margin: 0;
    font-size: 1.45rem;
}

.team-drawer__header p {
    margin: 0.2rem 0 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.table-scroll {
    margin-top: 1.4rem;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th,
td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-muted);
    color: var(--text-secondary);
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.table-number {
    text-align: center;
    white-space: nowrap;
}

.table-empty {
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 1.5rem;
    text-align: center;
}

.team-person strong,
.team-person span {
    display: block;
}

.team-person span {
    margin-top: 0.15rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.assignment-list {
    margin: 0;
}

.dialog {
    width: min(100% - 2rem, 30rem);
    max-height: calc(100vh - 2rem);
    border: 0;
    background: transparent;
    color: var(--text-primary);
    padding: 0;
}

.dialog::backdrop {
    background: var(--bg-overlay);
}

.dialog__panel {
    position: relative;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    padding: 1.8rem;
}

.dialog__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    color: var(--text-secondary);
}

.dialog h2 {
    margin: 0;
    font-size: 1.3rem;
}

.dialog__intro {
    margin: 0.3rem 0 1.35rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 0 2rem 1rem 0;
}

.capacity-legend {
    display: grid;
    gap: 1rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.capacity-legend li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.capacity-legend div {
    display: flex;
    flex-direction: column;
}

.capacity-legend strong {
    font-size: 0.88rem;
}

.capacity-legend span:not(.capacity-swatch) {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.capacity-swatch {
    display: block;
    width: 1.4rem;
    height: 1.4rem;
    flex: 0 0 auto;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgb(0 0 0 / 16%);
}

.capacity-swatch--available { background: var(--capacity-available); }
.capacity-swatch--moderate { background: var(--capacity-moderate); }
.capacity-swatch--high { background: var(--capacity-high); }
.capacity-swatch--full { background: var(--capacity-full); }

.error-page {
    display: grid;
    min-height: calc(100vh - 5rem);
    place-content: center;
    justify-items: center;
    text-align: center;
}

.error-page > .material-icons-round {
    color: var(--text-muted);
    font-size: 3rem;
}

.error-page .eyebrow {
    margin: 0.75rem 0 0;
    color: var(--accent-primary);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.error-page h1 {
    margin: 0.15rem 0;
}

.error-page p:not(.eyebrow) {
    max-width: 28rem;
    margin: 0 0 1.25rem;
    color: var(--text-secondary);
}

.nav-scrim {
    display: none;
}

@media (max-width: 67rem) {
    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-card {
        min-height: 22rem;
    }
}

@media (max-width: 52rem) {
    body {
        overflow: auto;
    }

    .app-shell {
        display: block;
        width: 100%;
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(var(--sidebar-width), calc(100vw - 3rem));
        transform: translateX(-105%);
        transition: transform var(--transition-base);
    }

    .app-shell.is-nav-open .sidebar {
        transform: translateX(0);
    }

    .main-content {
        min-height: 100vh;
        overflow: visible;
    }

    .mobile-header {
        position: sticky;
        top: 0;
        z-index: 20;
        display: flex;
        align-items: center;
        gap: 0.6rem;
        border-bottom: 1px solid var(--border-color);
        background: color-mix(in srgb, var(--bg-card) 94%, transparent);
        box-shadow: var(--shadow-sm);
        padding: 0.55rem 0.75rem;
        backdrop-filter: blur(12px);
    }

    .mobile-header > div {
        display: flex;
        flex-direction: column;
    }

    .mobile-header strong {
        font-size: 0.8rem;
    }

    .mobile-header span:not(.material-icons-round) {
        color: var(--text-secondary);
        font-size: 0.62rem;
    }

    .page-content {
        padding: 1.25rem 1rem 2rem;
    }

    .capacity-hero__content,
    .team-drawer__header {
        align-items: stretch;
        flex-direction: column;
    }

    .capacity-hero__metric {
        max-width: none;
        text-align: left;
    }

    .nav-scrim {
        position: fixed;
        z-index: 25;
        inset: 0;
        border: 0;
        background: var(--bg-overlay);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-base);
    }

    .app-shell.is-nav-open .nav-scrim {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 32rem) {
    .capacity-hero {
        padding: 1.45rem;
    }

    .capacity-hero__intro h2 {
        align-items: flex-start;
        font-size: 1.08rem;
    }

    .team-card__body,
    .team-card__footer {
        padding-right: 1.15rem;
        padding-left: 1.15rem;
    }

    .team-drawer {
        padding: 1.2rem;
    }
}

/* Update Editor */
.update-editor-page {
    display: grid;
    gap: 1.5rem;
}

.page-heading.update-editor-heading {
    align-items: center;
}

.save-feedback {
    display: inline-flex;
    min-width: 6.5rem;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid color-mix(in srgb, var(--status-success) 28%, var(--border-color));
    border-radius: 999px;
    background: color-mix(in srgb, var(--status-success) 8%, var(--bg-card));
    color: var(--status-success);
    padding: 0.45rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 800;
}

.save-feedback .material-icons-round { font-size: 1rem; }
.save-feedback.is-saving { border-color: var(--border-color); background: var(--bg-card); color: var(--text-secondary); }
.save-feedback.is-pending { border-style: dashed; border-color: var(--border-strong); background: var(--bg-muted); color: var(--text-primary); }
.save-feedback.is-error { border-color: color-mix(in srgb, var(--status-danger) 35%, var(--border-color)); background: color-mix(in srgb, var(--status-danger) 8%, var(--bg-card)); color: var(--status-danger); }
.save-feedback.is-session-expired { min-width: 16rem; border-color: color-mix(in srgb, var(--status-warning) 38%, var(--border-color)); background: color-mix(in srgb, var(--status-warning) 9%, var(--bg-card)); color: var(--status-warning); }
.save-feedback a { color: inherit; font-weight: 900; }

.editor-validation,
.editor-submit-success { margin: 0; }
.editor-validation strong { display: block; color: var(--status-danger); font-size: 0.78rem; }

.editor-card {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-top: 0.3rem solid var(--accent-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.editor-context {
    display: grid;
    grid-template-columns: minmax(13rem, 1.5fr) repeat(3, minmax(9rem, 0.75fr));
    gap: 1rem;
    align-items: stretch;
    border-bottom: 1px solid var(--border-color);
    padding: clamp(1.15rem, 3vw, 1.65rem);
}

.editor-context > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-muted);
    padding: 0.8rem 0.9rem;
}

.editor-context__team label,
.context-label {
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.editor-context__team label span { color: var(--text-muted); font-weight: 600; }
.editor-context select { min-height: 2.65rem; margin-top: 0.35rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-primary); padding: 0.55rem 0.7rem; font-size: 0.8rem; font-weight: 800; }
.editor-context strong { overflow-wrap: anywhere; font-size: 0.86rem; }
.editor-context small { margin-top: 0.15rem; color: var(--text-muted); font-size: 0.64rem; }

.editor-average strong { font-size: 1.8rem; font-weight: 900; line-height: 1.15; }
.editor-average.capacity-band--capacity-available strong { color: var(--capacity-available); }
.editor-average.capacity-band--moderately-committed strong { color: var(--capacity-moderate); }
.editor-average.capacity-band--highly-committed strong { color: var(--capacity-high); }
.editor-average.capacity-band--at-or-near-capacity strong { color: var(--capacity-full); }

.reporting-status { color: var(--text-secondary); }
.reporting-status--needs-review {
    color: var(--accent-tangelo);
}
.reporting-status--confirmed { color: var(--status-success); }
.reporting-status--confirmation-required,
.reporting-status--overdue-unconfirmed { color: var(--status-warning); }
.reporting-status--in-progress { color: var(--status-info); }

.editor-sections { display: grid; gap: 1.25rem; padding: clamp(1.15rem, 3vw, 1.8rem); }
.editor-section { border: 1px solid var(--border-color); border-radius: var(--radius-md); background: color-mix(in srgb, var(--bg-muted) 72%, var(--bg-card)); padding: clamp(1rem, 2.5vw, 1.35rem); }
.editor-section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.editor-section > header > div { display: flex; align-items: flex-start; gap: 0.75rem; }
.section-number { display: grid; width: 1.65rem; height: 1.65rem; flex: 0 0 auto; place-items: center; border-radius: 50%; margin: 0; background: var(--accent-primary); color: #fff; font-size: 0.68rem; font-weight: 900; }
.editor-section h2 { margin: 0; color: var(--text-secondary); font-size: 0.82rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.editor-section header p:not(.section-number) { margin: 0.18rem 0 0; color: var(--text-secondary); font-size: 0.7rem; }
.character-count { color: var(--text-muted); font-size: 0.65rem; font-weight: 800; }
.character-count.is-near-limit { color: var(--status-warning); }

.editor-section textarea,
.editor-item input,
.capacity-field input {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}
.editor-section textarea { min-height: 6.5rem; resize: vertical; padding: 0.75rem; font-size: 0.8rem; }
.editor-section textarea:focus,
.editor-item input:focus,
.capacity-field input:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 14%, transparent); outline: 0; }
.capacity-field input[aria-invalid="true"] { border-color: var(--status-danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-danger) 12%, transparent); }

.editor-item-list,
.assignment-list { display: grid; gap: 0.45rem; }
.editor-item { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 0.35rem; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 0.2rem; transition: border-color var(--transition-fast), background-color var(--transition-fast), opacity var(--transition-fast); }
.editor-item.is-dragging { opacity: 0.44; }
.editor-item.is-drag-target { border-top-color: var(--accent-primary); background: color-mix(in srgb, var(--accent-primary) 6%, transparent); }
.editor-item.is-empty { opacity: 0.78; }
.editor-item input { min-height: 2.55rem; padding: 0.55rem 0.65rem; font-size: 0.78rem; }
.item-rank { display: grid; width: 1.35rem; height: 1.35rem; place-items: center; border-radius: 50%; background: var(--bg-muted); color: var(--text-muted); font-size: 0.61rem; font-weight: 900; }
.drag-handle,
.remove-item { display: inline-grid; width: 2rem; height: 2rem; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); padding: 0; cursor: pointer; }
.drag-handle { cursor: grab; }
.drag-handle:active { cursor: grabbing; }
.drag-handle .material-icons-round,
.remove-item .material-icons-round { font-size: 1.05rem; }
.remove-item { color: var(--status-danger); }
.drag-handle:hover:not(:disabled),
.drag-handle:focus-visible { background: var(--bg-muted); color: var(--accent-primary); }
.remove-item:hover:not(:disabled) { background: color-mix(in srgb, var(--status-danger) 9%, transparent); }
.drag-handle:disabled,
.remove-item:disabled { cursor: default; opacity: 0.25; }
.editor-list-empty { margin: 0.8rem 0 0; color: var(--text-muted); font-size: 0.72rem; font-style: italic; }

.editor-roster { display: grid; gap: 0.8rem; }
.editor-person { display: grid; grid-template-columns: minmax(10rem, 0.8fr) 7.5rem minmax(17rem, 1.8fr); align-items: start; gap: 1rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-card); box-shadow: var(--shadow-sm); padding: 1rem; }
.editor-person__identity { display: flex; align-items: center; gap: 0.65rem; padding-top: 0.25rem; }
.editor-person__identity > div { display: flex; min-width: 0; flex-direction: column; }
.editor-person__identity strong { font-size: 0.82rem; }
.editor-person__identity > div > span { color: var(--text-secondary); font-size: 0.68rem; }
.editor-person__identity small { color: var(--accent-primary); font-size: 0.6rem; font-weight: 900; text-transform: uppercase; }
.capacity-field { display: grid; gap: 0.28rem; }
.capacity-field label,
.assignment-fieldset__label > span { color: var(--text-secondary); font-size: 0.63rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.capacity-field input { min-height: 2.65rem; padding: 0.5rem; font-weight: 800; text-align: center; }
.capacity-field small,
.assignment-fieldset__label small { color: var(--text-muted); font-size: 0.59rem; }
.assignment-fieldset__label { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.25rem; }
.assignment-item { grid-template-columns: auto auto minmax(0, 1fr) auto; }

.editor-submit { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; border-top: 1px solid var(--border-color); background: var(--bg-muted); padding: 1.15rem clamp(1.15rem, 3vw, 1.8rem); }
.editor-submit strong { font-size: 0.84rem; }
.editor-submit p { margin: 0.15rem 0 0; color: var(--text-secondary); font-size: 0.68rem; }
.editor-submit__button { min-width: 13rem; }
.editor-submit__actions { display: flex; align-items: center; gap: 0.75rem; }
.save-feedback--footer { flex: 0 0 auto; }
.editor-unavailable { display: grid; min-height: 20rem; place-content: center; justify-items: center; text-align: center; }
.editor-unavailable > .material-icons-round { color: var(--text-muted); font-size: 2.7rem; }
.editor-unavailable h2 { margin-top: 0.7rem; }
.editor-unavailable p { max-width: 28rem; color: var(--text-secondary); }

@media (max-width: 76rem) {
    .editor-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .editor-person { grid-template-columns: minmax(10rem, 1fr) 7.5rem; }
    .assignment-fieldset { grid-column: 1 / -1; }
}

@media (max-width: 52rem) {
    .page-heading.update-editor-heading { align-items: flex-start; }
    .save-feedback { align-self: flex-start; }
    .editor-context { grid-template-columns: 1fr; }
    .editor-submit { align-items: stretch; flex-direction: column; }
    .editor-submit__actions { align-items: stretch; flex-direction: column; }
    .editor-submit__button { width: 100%; }
}

@media (max-width: 38rem) {
    .editor-section > header,
    .assignment-fieldset__label { align-items: stretch; flex-direction: column; }
    .editor-person { grid-template-columns: 1fr; }
    .assignment-fieldset { grid-column: auto; min-width: 0; }
    .editor-item { grid-template-columns: auto auto minmax(0, 1fr) auto; }
    .save-feedback.is-session-expired { min-width: 0; }
}

/* Reporting schedule and reminder administration */
.schedule-page,
.reminders-page {
    display: grid;
    gap: 1.75rem;
}

.schedule-stack {
    display: grid;
    width: min(100%, 58rem);
    gap: 1.5rem;
}

.schedule-status-card {
    border: 1px solid var(--border-color);
    border-top: 0.28rem solid var(--status-success);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.25rem, 3vw, 1.6rem);
}

.schedule-status-card h2 {
    margin: 0.25rem 0 0;
    font-size: clamp(1.15rem, 3vw, 1.4rem);
}

.schedule-status-card__note {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.schedule-status-card__note .material-icons-round {
    font-size: 1rem;
}

.schedule-status-card__note p,
.schedule-rules p {
    margin: 0;
}

.schedule-card-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.schedule-card-header h2 {
    margin: 0;
}

.button--compact {
    min-height: 2.25rem;
    padding: 0.45rem 0.7rem;
    font-size: 0.68rem;
}

.schedule-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.schedule-rules {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    margin-top: 1.25rem;
    background: color-mix(in srgb, var(--accent-primary) 8%, var(--bg-card));
    padding: 0.9rem;
    font-size: 0.75rem;
}

.schedule-rules > .material-icons-round {
    color: var(--accent-primary);
    font-size: 1.1rem;
}

.schedule-rules strong {
    color: var(--text-primary);
}

.schedule-rules p {
    margin-top: 0.25rem;
    color: var(--text-secondary);
}

.schedule-configuration .form-actions,
.reminder-templates-card .form-actions {
    border-top: 1px solid var(--border-color);
    margin-top: 1.4rem;
    padding-top: 1.1rem;
}

.reminders-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr);
    align-items: start;
    gap: 1.5rem;
}

.reminder-timeline {
    display: grid;
    gap: 1.35rem;
}

.reminder-template {
    position: relative;
    display: grid;
    gap: 0.65rem;
    border-left: 2px solid var(--border-strong);
    padding-left: 1.25rem;
}

.reminder-template__marker {
    position: absolute;
    top: 0;
    left: -0.48rem;
    width: 0.85rem;
    height: 0.85rem;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    background: var(--bg-card);
}

.reminder-template:nth-child(4) .reminder-template__marker {
    border-color: var(--status-danger);
}

.reminder-template h3 {
    margin: 0;
    font-size: 0.82rem;
}

.reminder-template .form-field {
    gap: 0.3rem;
}

.reminder-template textarea {
    resize: vertical;
}

.delivery-errors-card {
    border-top-color: var(--border-strong);
}

.delivery-errors-empty {
    display: grid;
    justify-items: center;
    gap: 0.65rem;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.78rem;
}

.delivery-errors-empty .material-icons-round {
    display: grid;
    width: 2.6rem;
    height: 2.6rem;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--status-success) 14%, var(--bg-card));
    color: var(--status-success);
}

.delivery-error-list {
    display: grid;
    gap: 0.75rem;
}

.delivery-error-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    border: 1px solid color-mix(in srgb, var(--status-danger) 25%, var(--border-color));
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--status-danger) 6%, var(--bg-card));
    padding: 0.8rem;
}

.delivery-error-item > .material-icons-round {
    color: var(--status-danger);
    font-size: 1.1rem;
}

.delivery-error-item div {
    display: grid;
    min-width: 0;
}

.delivery-error-item strong {
    color: var(--status-danger);
    font-size: 0.75rem;
}

.delivery-error-item span,
.delivery-error-item small {
    overflow-wrap: anywhere;
    color: var(--text-secondary);
    font-size: 0.68rem;
}

@media (max-width: 70rem) {
    .reminders-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 42rem) {
    .schedule-card-header {
        align-items: stretch;
        flex-direction: column;
    }

    .schedule-card-header .button {
        width: 100%;
    }

    .schedule-fields {
        grid-template-columns: 1fr;
    }
}

/* Theme selection */
.themes-page {
    display: grid;
    gap: 1.75rem;
}

.themes-card {
    width: min(100%, 58rem);
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.theme-option {
    position: relative;
    display: grid;
    min-height: 10rem;
    align-content: center;
    justify-items: center;
    gap: 0.75rem;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    text-align: center;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.theme-option:hover {
    transform: translateY(-2px);
}

.theme-option:has(input:focus-visible) {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.theme-option:has(input:checked) {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 16%, transparent);
}

.theme-option--light {
    background: #f3f7ff;
    color: #0b1b42;
}

.theme-option--dark {
    background: #0f172a;
    color: #f8fafc;
}

.theme-option__icon {
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border-radius: 50%;
    background: #ffffff;
    color: #f15624;
    box-shadow: var(--shadow-sm);
}

.theme-option--dark .theme-option__icon {
    background: #1e293b;
    color: #6c9bff;
}

.theme-option__check {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    color: var(--accent-primary);
    opacity: 0;
}

.theme-option:has(input:checked) .theme-option__check {
    opacity: 1;
}

.themes-card .form-actions {
    border-top: 1px solid var(--border-color);
    margin-top: 1.25rem;
    padding-top: 1.1rem;
}

@media (max-width: 42rem) {
    .theme-options {
        grid-template-columns: 1fr;
    }
}

/* Organization and account administration */
.admin-page {
    display: grid;
    gap: 1.5rem;
}

.access-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.access-overview article {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
}

.access-overview .material-icons-round {
    display: grid;
    flex: 0 0 2.35rem;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent-primary) 10%, var(--bg-card));
    color: var(--accent-primary);
    font-size: 1.2rem;
    line-height: 1;
    overflow: hidden;
}

.access-overview article > div {
    display: flex;
    flex-direction: column;
}

.access-overview strong {
    font-size: 1.2rem;
    line-height: 1;
}

.access-overview span:not(.material-icons-round) {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.admin-grid {
    display: grid;
    gap: 1.25rem;
}

.admin-grid--access {
    grid-template-columns: minmax(18rem, 0.9fr) minmax(22rem, 1.1fr);
    align-items: stretch;
}

.settings-card--warning {
    border-top-color: var(--status-warning);
}

.management-card {
    border: 1px solid var(--border-color);
    border-top: 0.28rem solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.15rem, 3vw, 1.6rem);
}

.management-card--primary { border-top-color: var(--accent-primary); }
.management-card--success { border-top-color: var(--status-success); }

.management-card > header,
.management-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.management-card h2 {
    margin: 0;
    font-size: 1.1rem;
}

.management-card header p {
    margin: 0.2rem 0 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.form-field select,
.move-member-form select {
    width: 100%;
    min-height: 2.85rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    color: var(--text-primary);
    padding: 0.68rem 0.8rem;
}

.form-field small {
    color: var(--text-muted);
    font-size: 0.66rem;
}

.field-optional {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0;
    margin-left: 0.35rem;
    text-transform: none;
}

[hidden] {
    display: none !important;
}

.account-list {
    display: grid;
    gap: 0.65rem;
}

.account-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    padding: 0.8rem;
}

.account-row__identity {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.account-row__identity strong,
.account-row__identity span,
.account-row__identity small {
    overflow-wrap: anywhere;
}

.account-row__identity strong { font-size: 0.82rem; }
.account-row__identity span { color: var(--text-secondary); font-size: 0.7rem; }
.account-row__identity small { color: var(--text-muted); font-size: 0.65rem; }

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    font-size: 0.61rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-pill--active { background: color-mix(in srgb, var(--status-success) 10%, transparent); color: var(--status-success); }
.status-pill--pending { background: color-mix(in srgb, var(--status-warning) 10%, transparent); color: var(--status-warning); }
.status-pill--inactive { background: color-mix(in srgb, var(--text-secondary) 9%, transparent); color: var(--text-secondary); }

.row-actions,
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.row-actions form,
.toolbar-actions form {
    margin: 0;
}

.text-button {
    border: 0;
    background: transparent;
    color: var(--accent-primary);
    padding: 0.25rem;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 800;
}

.text-button:hover:not(:disabled) { text-decoration: underline; }
.text-button--danger { color: var(--status-danger); }
.text-button:disabled { cursor: not-allowed; opacity: 0.42; }
.button--small { min-height: 2rem; padding: 0.4rem 0.7rem; font-size: 0.68rem; }
.button--danger-outline { border: 1px solid var(--status-danger); background: transparent; color: var(--status-danger); }

.table-subline {
    display: block;
    color: var(--text-secondary);
    font-size: 0.68rem;
}

.table-actions { text-align: right; }

.team-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.team-selector__item {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.75rem 0.9rem;
    text-decoration: none;
}

.team-selector__item:hover,
.team-selector__item.is-active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-primary) 12%, transparent);
}

.team-selector__item.is-inactive { opacity: 0.66; }
.team-selector__item span { font-size: 0.78rem; font-weight: 800; }
.team-selector__item small { color: var(--text-secondary); font-size: 0.64rem; }

.team-admin-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.inline-edit-form {
    display: flex;
    flex: 1;
    align-items: flex-end;
    gap: 0.6rem;
}

.inline-edit-form .form-field { flex: 1; }
.roster-list {
    display: grid;
    gap: 0.65rem;
}

.roster-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-main);
    padding: 0.85rem;
}

.roster-row.is-inactive { opacity: 0.72; }

.roster-avatar {
    display: grid;
    width: 2.45rem;
    height: 2.45rem;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-primary);
    color: var(--text-inverse);
    font-size: 0.8rem;
    font-weight: 900;
}

.roster-identity {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.roster-identity > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.roster-identity strong { font-size: 0.84rem; }
.roster-identity span:not(.role-chip) { color: var(--text-secondary); font-size: 0.72rem; }
.roster-identity small { color: var(--text-muted); font-size: 0.64rem; }

.role-chip {
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
    color: var(--accent-primary);
    padding: 0.14rem 0.4rem;
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
}

.move-member-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.45rem; }
.move-member-form select { min-width: 0; min-height: 2.25rem; padding: 0.4rem 0.55rem; font-size: 0.7rem; }
.roster-lead-note { color: var(--text-muted); font-size: 0.66rem; }

.member-management-dialog {
    width: min(100% - 2rem, 34rem);
}

.member-lifecycle-actions {
    display: grid;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1.25rem;
    padding-top: 1rem;
}

.member-lifecycle-actions > form {
    margin: 0;
}
@media (max-width: 78rem) {
    .admin-grid--access { grid-template-columns: 1fr; }
}

@media (max-width: 62rem) {
    .access-overview,
    .team-selector { grid-template-columns: 1fr; }
    .team-admin-toolbar,
    .inline-edit-form { align-items: stretch; flex-direction: column; }
    .toolbar-actions { flex-wrap: wrap; }
}

@media (max-width: 38rem) {
    .account-row,
    .roster-row { grid-template-columns: auto minmax(0, 1fr); }
    .account-row > :last-child,
    .roster-row > :last-child { grid-column: 1 / -1; }
    .row-actions { justify-content: flex-end; }
    .table-actions { min-width: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Reporting history */
.history-page {
    display: grid;
    gap: 1.25rem;
}

.history-list-card {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.history-table th,
.history-table td {
    padding: 1rem 1.15rem;
}

.history-capacity-text,
.history-team-card__capacity strong {
    color: var(--history-capacity-color, var(--text-primary));
}

.capacity-text--capacity-available,
.history-team-card.capacity-band--capacity-available,
.history-global.capacity-band--capacity-available { --history-capacity-color: var(--capacity-available); }
.capacity-text--moderately-committed,
.history-team-card.capacity-band--moderately-committed,
.history-global.capacity-band--moderately-committed { --history-capacity-color: var(--capacity-moderate); }
.capacity-text--highly-committed,
.history-team-card.capacity-band--highly-committed,
.history-global.capacity-band--highly-committed { --history-capacity-color: var(--capacity-high); }
.capacity-text--at-or-near-capacity,
.history-team-card.capacity-band--at-or-near-capacity,
.history-global.capacity-band--at-or-near-capacity { --history-capacity-color: var(--capacity-full); }

.status-pill--archived {
    border: 1px solid color-mix(in srgb, var(--text-secondary) 30%, transparent);
    background: color-mix(in srgb, var(--text-secondary) 9%, transparent);
    color: var(--text-secondary);
}

.history-empty {
    padding: 2.5rem 1.25rem;
    text-align: center;
}

.history-snapshot-overlay {
    position: fixed;
    z-index: 45;
    inset: 0 0 0 var(--sidebar-width);
    overflow-y: auto;
    padding: 2rem;
    background: var(--bg-overlay);
}

.history-snapshot {
    width: min(75rem, 100%);
    margin: 0 auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
}

.history-snapshot__header,
.history-roster > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.history-snapshot__header {
    padding: 1.4rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.history-snapshot__header h2,
.history-roster h3,
.history-team-card h3,
.history-priorities h4 {
    margin: 0;
}

.history-snapshot__header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.history-snapshot .icon-button {
    text-decoration: none;
}

.history-global {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.5rem;
    border: 1px solid color-mix(in srgb, var(--history-capacity-color, var(--border-strong)) 35%, var(--border-color));
    border-left: 5px solid var(--history-capacity-color, var(--border-strong));
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    background: var(--bg-muted);
}

.history-global div {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
}

.history-global div > span,
.history-global > span {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
}

.history-global strong {
    color: var(--history-capacity-color, var(--text-primary));
    font-size: 2rem;
    line-height: 1;
}

.history-team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 0 1.5rem 1.5rem;
}

.history-team-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.8rem;
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--history-capacity-color, var(--border-strong));
    border-radius: var(--radius-md);
    padding: 1rem;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
}

.history-team-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.history-team-card h3 {
    overflow-wrap: anywhere;
    font-size: 1rem;
}

.history-close-outcome {
    flex: 0 0 auto;
    color: var(--status-success);
    font-size: 0.68rem;
    font-weight: 800;
}

.history-close-outcome--overdue-unconfirmed {
    color: var(--status-warning);
}

.history-team-card__capacity {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
}

.history-team-card__capacity strong {
    font-size: 1.45rem;
}

.history-team-card__capacity span,
.history-baseline-source {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.history-baseline-source,
.history-team-card__narrative {
    margin: 0;
}

.history-team-card__narrative {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.history-priorities {
    flex: 1;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.history-priorities h4 {
    font-size: 0.75rem;
}

.history-priorities ol {
    margin: 0.45rem 0 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.history-roster {
    margin: 0 1.5rem 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.history-roster > header {
    padding: 1rem 1.15rem;
    background: var(--bg-muted);
}

@media (max-width: 74rem) {
    .history-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 52rem) {
    .history-snapshot-overlay { inset: 0; padding: 1rem; }
    .history-team-grid { grid-template-columns: 1fr; }
}

@media (max-width: 38rem) {
    .history-snapshot-overlay { padding: 0; }
    .history-snapshot { min-height: 100%; border-radius: 0; }
    .history-snapshot__header,
    .history-global { align-items: flex-start; flex-direction: column; }
    .history-snapshot__header,
    .history-team-grid { padding-right: 1rem; padding-left: 1rem; }
    .history-global,
    .history-roster { margin-right: 1rem; margin-left: 1rem; }
    .history-team-card > header { flex-direction: column; }
    .history-list-card .table-scroll { overflow: visible; }
    .history-table,
    .history-table tbody,
    .history-table tr,
    .history-table td { display: block; width: 100%; }
    .history-table thead { display: none; }
    .history-table tr { padding: 0.7rem 1rem; }
    .history-table tr + tr { border-top: 1px solid var(--border-color); }
    .history-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        border: 0;
        padding: 0.45rem 0;
        text-align: right;
    }
    .history-table td::before {
        content: attr(data-label);
        color: var(--text-secondary);
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-align: left;
        text-transform: uppercase;
    }
}

/* Authentication and account security */
.auth-body {
    min-height: 100vh;
    overflow: auto;
    background:
        radial-gradient(circle at 12% 15%, color-mix(in srgb, var(--accent-primary) 14%, transparent), transparent 31rem),
        radial-gradient(circle at 88% 86%, color-mix(in srgb, var(--accent-secondary) 11%, transparent), transparent 27rem),
        var(--bg-main);
}

.auth-shell {
    display: grid;
    width: min(100% - 2rem, 31rem);
    min-height: 100vh;
    align-content: center;
    gap: 1.25rem;
    margin: 0 auto;
    padding: 2rem 0;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.auth-brand__mark {
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    place-items: center;
    border-radius: 0.8rem;
    background: var(--bg-sidebar);
    box-shadow: var(--shadow-md);
    color: var(--text-inverse);
}

.auth-brand > div:last-child {
    display: flex;
    flex-direction: column;
}

.auth-brand__organization {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.auth-brand__product {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
}

.auth-card {
    border: 1px solid var(--border-color);
    border-top: 0.28rem solid var(--accent-primary);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    padding: clamp(1.5rem, 5vw, 2.35rem);
}

.auth-card__header {
    margin-bottom: 1.5rem;
}

.eyebrow {
    margin: 0;
    color: var(--accent-primary);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-card__header h1,
.auth-result h1,
.page-heading h1 {
    margin: 0.2rem 0 0;
    font-size: clamp(1.55rem, 4vw, 2rem);
    line-height: 1.2;
}

.auth-card__header > p:last-child,
.auth-result > p:not(.eyebrow),
.page-heading > div > p:last-child {
    margin: 0.5rem 0 0;
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.auth-footer {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.form-stack {
    display: grid;
    gap: 1rem;
}

.form-field {
    display: grid;
    gap: 0.38rem;
}

.form-field label {
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-field input,
.form-field textarea {
    width: 100%;
    min-height: 2.85rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    color: var(--text-primary);
    padding: 0.72rem 0.85rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus-ring) 16%, transparent);
    outline: 0;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    display: grid;
    width: 2.2rem;
    height: 2.2rem;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.password-toggle:hover {
    background: var(--bg-muted);
    color: var(--text-primary);
}

.password-toggle .material-icons-round {
    font-size: 1.15rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.form-actions--split {
    align-items: center;
    justify-content: space-between;
}

.text-link {
    color: var(--accent-primary);
    font-size: 0.78rem;
    font-weight: 750;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.button--secondary {
    border-color: var(--border-strong);
    background: var(--bg-card);
    color: var(--text-primary);
}

.button--secondary:hover {
    background: var(--bg-muted);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin: 0 0 1rem;
    padding: 0.75rem 0.85rem;
    font-size: 0.78rem;
}

.alert p {
    margin: 0;
}

.alert p + p {
    margin-top: 0.25rem;
}

.alert > .material-icons-round {
    font-size: 1.1rem;
}

.alert--danger {
    border-color: color-mix(in srgb, var(--status-danger) 34%, var(--border-color));
    background: color-mix(in srgb, var(--status-danger) 9%, var(--bg-card));
    color: var(--status-danger);
}

.alert--success {
    border-color: color-mix(in srgb, var(--status-success) 34%, var(--border-color));
    background: color-mix(in srgb, var(--status-success) 9%, var(--bg-card));
    color: var(--status-success);
}

.alert--info {
    border-color: color-mix(in srgb, var(--status-info) 30%, var(--border-color));
    background: color-mix(in srgb, var(--status-info) 8%, var(--bg-card));
    color: var(--text-primary);
}

.password-requirements {
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    color: var(--text-secondary);
    padding: 0.8rem 0.9rem;
    font-size: 0.7rem;
}

.password-requirements strong {
    color: var(--text-primary);
    font-size: 0.72rem;
}

.password-requirements ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2rem 1.1rem;
    margin: 0.45rem 0 0;
    padding-left: 1rem;
}

.auth-result {
    display: grid;
    justify-items: center;
    text-align: center;
}

.auth-result__icon {
    display: grid;
    width: 3.5rem;
    height: 3.5rem;
    place-items: center;
    border-radius: 50%;
    margin-bottom: 1rem;
    background: color-mix(in srgb, var(--accent-primary) 12%, var(--bg-card));
    color: var(--accent-primary);
    font-size: 1.8rem;
}

.auth-result__icon--success {
    background: color-mix(in srgb, var(--status-success) 12%, var(--bg-card));
    color: var(--status-success);
}

.auth-result__icon--danger {
    background: color-mix(in srgb, var(--status-danger) 10%, var(--bg-card));
    color: var(--status-danger);
}

.auth-result .button {
    margin-top: 1.4rem;
}

.profile-link {
    color: inherit;
    text-decoration: none;
}

.profile-link:hover,
.profile-link.is-active {
    background: var(--bg-sidebar-active);
}

.sidebar-footer form {
    margin: 0;
}

.sign-out-link {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.7rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-sidebar-muted);
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sign-out-link:hover {
    background: color-mix(in srgb, var(--status-danger) 20%, transparent);
    color: #ff8d8d;
}

.sign-out-link .material-icons-round {
    width: 2rem;
    font-size: 1rem;
}

.profile-page {
    display: grid;
    gap: 1.75rem;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.role-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 800;
}

.role-badge .material-icons-round {
    color: var(--accent-primary);
    font-size: 1rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.settings-card {
    border: 1px solid var(--border-color);
    border-top: 0.28rem solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.25rem, 3vw, 1.8rem);
}

.settings-card--primary {
    border-top-color: var(--accent-primary);
}

.settings-card > header {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
}

.settings-card > header.settings-card__header--single-line {
    align-items: center;
    padding-bottom: 0.65rem;
}

.settings-card > header > .material-icons-round {
    display: grid;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    place-items: center;
    color: var(--accent-primary);
    line-height: 1;
}

.settings-card h2 {
    margin: 0;
    font-size: 1.05rem;
}

.settings-card header p {
    margin: 0.15rem 0 0;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.account-summary {
    display: grid;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    background: var(--bg-muted);
    padding: 0.85rem;
}

.account-summary span,
.account-summary small {
    color: var(--text-secondary);
    font-size: 0.68rem;
}

.account-summary strong {
    overflow-wrap: anywhere;
    font-size: 0.86rem;
}

.session-warning__icon {
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    place-items: center;
    border-radius: 50%;
    margin-bottom: 0.8rem;
    background: color-mix(in srgb, var(--status-warning) 13%, var(--bg-card));
    color: var(--status-warning);
}

.session-warning__countdown {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.session-warning__countdown strong {
    color: var(--text-primary);
}

.dialog-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.dialog-actions form {
    margin: 0;
}

@media (max-width: 62rem) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 32rem) {
    .auth-shell {
        width: min(100% - 1.25rem, 31rem);
        padding: 1rem 0;
    }

    .auth-card {
        padding: 1.3rem;
    }

    .password-requirements ul {
        grid-template-columns: 1fr;
    }

    .form-actions--split,
    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .form-actions--split .button {
        width: 100%;
    }

    .role-badge {
        align-self: flex-start;
    }
}

/* Checkpoint 6 visual-accessibility and team-order refinements */
.editor-section [data-priority-add] {
    border-width: 2px;
    border-color: var(--border-strong);
}

.team-management-switcher {
    display: grid;
    width: min(100%, 30rem);
    gap: 0.35rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    padding: 0.9rem 1rem;
}

.team-management-switcher label {
    color: var(--text-secondary);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.team-management-switcher select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 2.7rem;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.55rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 800;
}

.team-summary-header__identity {
    min-width: 0;
}

.team-summary-header__name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.team-summary-header__actions {
    display: grid;
    flex: 0 0 auto;
    gap: 0.55rem;
}

.team-summary-header__actions form {
    margin: 0;
}

.team-summary-header__actions .button {
    width: 100%;
}

.team-display-order {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.team-display-order__value {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.team-display-order__value strong {
    color: var(--text-primary);
    font-size: 0.78rem;
}

.team-display-order__controls {
    display: flex;
    gap: 0.3rem;
}

.team-display-order__controls form {
    margin: 0;
}

.team-display-order small {
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 700;
}

.team-order-button {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border-strong);
    background: var(--bg-card);
    color: var(--accent-primary);
}

.team-order-button .material-icons-round {
    font-size: 1rem;
}

.roster-row {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
}

.roster-order-anchor,
.roster-drag-handle {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
}

.roster-drag-handle {
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    padding: 0;
    cursor: grab;
}

.roster-drag-handle:hover,
.roster-drag-handle:focus-visible {
    border-color: var(--border-strong);
    background: var(--bg-muted);
    color: var(--accent-primary);
}

.roster-drag-handle .material-icons-round {
    font-size: 1.15rem;
}

.roster-row.is-dragging {
    opacity: 0.45;
}

.roster-row.is-drag-target {
    border-top: 3px solid var(--accent-primary);
    background: color-mix(in srgb, var(--accent-primary) 7%, var(--bg-main));
}

.roster-order-feedback {
    display: block;
    min-height: 1rem;
    margin-top: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 800;
}

.roster-order-feedback.is-saved { color: var(--status-success); }
.roster-order-feedback.is-error { color: var(--status-danger); }

@media (max-width: 38rem) {
    .team-summary-header {
        align-items: stretch;
        flex-direction: column;
    }

    .team-summary-header__actions {
        width: 100%;
    }

    .roster-row {
        grid-template-columns: auto auto minmax(0, 1fr);
    }

    .roster-row > :last-child {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .roster-order-anchor,
    .roster-drag-handle {
        grid-column: 1;
        grid-row: 1;
    }

    .roster-avatar {
        grid-column: 2;
        grid-row: 1;
    }

    .roster-identity {
        grid-column: 3;
        grid-row: 1;
    }
}
