:root {
    --bg: #f9fafb;
    --panel: #ffffff;
    --panel-soft: #f4f6f8;
    --text: #111927;
    --muted: #637381;
    --line: #dfe3e8;
    --line-strong: #c4cdd5;
    --blue: #00a76f;
    --blue-soft: #e9f9f1;
    --green: #0f8a5f;
    --green-soft: #ecfdf5;
    --yellow: #b7791f;
    --yellow-soft: #fffbeb;
    --red: #c93434;
    --red-soft: #fef2f2;
    --dark: #1c252e;
    --purple: #7c3aed;
    --shadow: 0 8px 20px rgba(17, 25, 39, .06);
    --shadow-lg: 0 24px 54px rgba(17, 25, 39, .10);
    --radius: 8px;
}

html[data-theme="dark"] {
    --bg: #161c24;
    --panel: #1f2a36;
    --panel-soft: #243241;
    --text: #f4f6f8;
    --muted: #a7b4c2;
    --line: #344456;
    --line-strong: #4b6178;
    --blue: #00a76f;
    --blue-soft: #113b32;
    --green: #36b37e;
    --green-soft: #12382e;
    --yellow: #f4b740;
    --yellow-soft: #3b2f16;
    --red: #ff6b6b;
    --red-soft: #3b2027;
    --dark: #0b1117;
    --purple: #b18cff;
    --shadow: 0 8px 24px rgba(0, 0, 0, .24);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, .38);
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Public Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 0;
    margin: 0;
}

html[data-theme="dark"] body {
    background: var(--bg);
    color: var(--text);
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    color: #1d4ed8;
}

strong {
    font-weight: 600;
}

/* Interactive motion system */
.card-hover,
.shot-card,
.task-card,
.list-item,
.blocker-card,
.panel-soft-card,
.metric-card,
.readiness-chip,
.progress-tile,
.info-grid div,
.settings-grid div,
.brand,
.nav-link,
.button,
.icon-button {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease;
}

.card-hover:hover,
.shot-card:hover,
.task-card:hover,
.list-item:hover,
.blocker-card:hover,
.panel-soft-card:hover,
.metric-card:hover,
.readiness-chip:hover,
.progress-tile:hover,
.info-grid div:hover,
.settings-grid div:hover,
.brand:hover,
.nav-link:hover,
.button:hover,
.icon-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(16, 24, 35, 0.12);
}

.card-hover:focus-within,
.shot-card:focus-within,
.task-card:focus-within,
.list-item:focus-within,
.blocker-card:focus-within,
.panel-soft-card:focus-within,
.metric-card:focus-within,
.readiness-chip:focus-within,
.progress-tile:focus-within,
.info-grid div:focus-within,
.settings-grid div:focus-within,
.brand:focus-within,
.nav-link:focus-within,
.button:focus-visible,
.icon-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 167, 111, 0.16);
    transform: translateY(-1px);
}

.svg-sprite {
    display: none;
}

.icon {
    display: inline-block;
    fill: currentColor;
    flex: 0 0 auto;
    height: 18px;
    width: 18px;
}

.shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: #ffffff;
    border-right: 1px solid var(--line);
    padding: 22px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .detail-header,
html[data-theme="dark"] .login-panel,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .user-pill,
html[data-theme="dark"] .info-grid div,
html[data-theme="dark"] .settings-grid div,
html[data-theme="dark"] .progress-tile,
html[data-theme="dark"] .readiness-chip,
html[data-theme="dark"] .list-item,
html[data-theme="dark"] .blocker-card {
    background: var(--panel);
    border-color: var(--line);
    color: var(--text);
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .detail-header {
    box-shadow: var(--shadow);
}

.brand {
    align-items: center;
    border-radius: var(--radius);
    color: var(--text);
    display: flex;
    gap: 10px;
    min-height: 44px;
    padding: 6px 8px;
}

.brand:hover {
    background: var(--panel-soft);
    color: var(--text);
}

html[data-theme="dark"] .brand:hover,
html[data-theme="dark"] tbody tr:hover {
    background: var(--panel-soft);
}

.brand-logo {
    display: block;
    height: 30px;
    width: 30px;
}

.brand strong {
    font-size: 18px;
    letter-spacing: 0;
}

.brand small,
.eyebrow,
.muted {
    color: var(--muted);
}

.brand small {
    display: block;
    margin-top: 2px;
}

.nav {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.nav-group {
    display: grid;
    gap: 3px;
}

.nav-group-title {
    color: #919eab;
    font-size: 11px;
    font-weight: 800;
    margin: 4px 12px 2px;
    text-transform: uppercase;
}

.nav-link {
    align-items: center;
    border-radius: 10px;
    color: #454f5b;
    display: flex;
    font-weight: 700;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px;
}

.nav-link:hover,
.nav-link.active {
    background: #e9f9f1;
    color: #007867;
}

html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.active {
    background: #103a32;
    color: #5be49b;
}

html[data-theme="dark"] .nav-link {
    color: #c8d2df;
}

.nav-icon {
    align-items: center;
    color: currentColor;
    display: inline-flex;
    justify-content: center;
    width: 22px;
}

.nav-label {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
}

.nav-label small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.main {
    min-width: 0;
    padding: 0;
}

.topbar,
.panel-head,
.detail-header,
.user-menu {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 4px rgba(17, 25, 39, .04);
    min-height: 76px;
    padding: 14px 28px;
    position: sticky;
    top: 0;
    z-index: 10;
}

html[data-theme="dark"] .topbar h1,
html[data-theme="dark"] .detail-header h2,
html[data-theme="dark"] .dashboard-hero h2,
html[data-theme="dark"] .metric-card strong {
    color: var(--text);
}

.topbar h1,
.detail-header h2 {
    color: #1c252e;
    font-size: 26px;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 3px 0 0;
}

.eyebrow {
    font-size: 12px;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
}

.icon-button.mobile-menu {
    display: none;
}

.content-container {
    margin: 0 auto;
    max-width: 1280px;
    padding: 28px;
}

.section-intro {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-intro p {
    color: var(--muted);
    line-height: 1.55;
    margin: 4px 0 0;
    max-width: 720px;
}

.section-intro h2 {
    margin: 0;
}

.helper-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 18px;
}

.helper-pill {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
}

.soft-empty {
    background: var(--panel-soft);
    border: 1px dashed var(--line);
    border-radius: 14px;
    color: var(--muted);
    padding: 18px 20px;
}

.info-card-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 16px 0 20px;
}

.info-card {
    background: linear-gradient(135deg, var(--panel) 0%, var(--panel-soft) 100%);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
}

.info-card .label {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.info-card .value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    margin-top: 8px;
}

.resource-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.resource-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 14px 12px;
}

.resource-card .resource-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.resource-card h3 {
    font-size: 15px;
    margin: 0;
}

.resource-card p {
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
}

.resource-card .resource-foot {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 13px;
    justify-content: space-between;
    margin-top: auto;
}

.panel,
.metric-card,
.detail-header,
.login-panel {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-lg {
    box-shadow: var(--shadow-lg);
}

.panel,
.detail-header {
    margin-bottom: 18px;
    padding: 20px;
}

.panel h2 {
    font-size: 17px;
    letter-spacing: 0;
    margin: 0 0 14px;
}

.panel-head h2 {
    margin-bottom: 0;
}

.card-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 24px;
}

.metric-card {
    overflow: hidden;
    padding: 22px;
    position: relative;
}

.metric-head {
    align-items: flex-start;
    color: var(--muted);
    display: flex;
    font-weight: 700;
    gap: 12px;
    line-height: 1.25;
}

.metric-card span {
    font-weight: 700;
}

.metric-card strong {
    display: block;
    color: var(--text);
    font-size: 32px;
    line-height: 1;
    margin-top: 18px;
}

.metric-card.blue { color: var(--blue); }
.metric-card.green { color: var(--green); }
.metric-card.yellow { color: var(--yellow); }
.metric-card.dark { color: var(--dark); }

.split-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr);
}

.dashboard-hero {
    align-items: center;
    background: linear-gradient(94.82deg, #fff1f2 1.11%, #e9f9f1 99.11%);
    border: 1px solid rgba(0, 120, 103, 0.14);
    border-radius: 20px;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr);
    margin-bottom: 24px;
    min-height: 196px;
    padding: 28px 30px;
}

html[data-theme="dark"] .dashboard-hero {
    background: linear-gradient(94.82deg, #2a2230 1.11%, #15352e 99.11%);
    border-color: rgba(91, 228, 155, 0.18);
}

.dashboard-hero h2 {
    color: #1c252e;
    font-size: 28px;
    letter-spacing: 0;
    margin: 6px 0 10px;
}

.dashboard-hero p:last-child {
    color: #637381;
    margin: 0;
    max-width: 620px;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.hero-chip-list {
    display: grid;
    gap: 10px;
}

.hero-chip {
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(0, 120, 103, 0.12);
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
}

.hero-chip-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.hero-chip strong {
    color: var(--text);
    font-size: 18px;
}

html[data-theme="dark"] .hero-chip {
    background: rgba(16, 24, 35, 0.76);
    border-color: rgba(91, 228, 155, 0.16);
}

html[data-theme="dark"] .capture-validation-note {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #ffd6a5;
}

html[data-theme="dark"] .capture-modal {
    background: var(--panel);
}

html[data-theme="dark"] .capture-panel-head h3,
html[data-theme="dark"] .capture-modal-header h3 {
    color: var(--text);
}

html[data-theme="dark"] .capture-panel-head p,
html[data-theme="dark"] .capture-modal-header p {
    color: var(--muted);
}

.planner-workflow {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.planner-step {
    align-items: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    gap: 12px;
    padding: 12px 14px;
}

.planner-step strong {
    align-items: center;
    background: var(--blue);
    border-radius: 999px;
    color: white;
    display: inline-flex;
    font-size: 13px;
    height: 28px;
    justify-content: center;
    min-width: 28px;
}

.login-intro {
    margin-bottom: 16px;
}

.login-intro h2 {
    font-size: 20px;
    margin: 0 0 6px;
}

.login-intro p {
    color: var(--muted);
    margin: 0;
}

@media (max-width: 980px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .dashboard-hero,
    .split-grid,
    .card-grid,
    .planner-workflow,
    .info-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .content-container {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .topbar {
        padding: 12px 16px;
    }

    .content-container {
        padding: 14px;
    }

    .dashboard-hero {
        padding: 20px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .button {
        width: 100%;
    }
}

.icon-shape {
    align-items: center;
    background: #007867;
    border-radius: 999px;
    color: #c8fad6;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.metric-card.dark .icon-shape {
    background: #1c252e;
    color: #f4f6f8;
}

.metric-card.green .icon-shape {
    background: #007867;
    color: #c8fad6;
}

.metric-card.yellow .icon-shape {
    background: #7a4100;
    color: #fff1c2;
}

.table-wrap {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    padding: 4px;
    box-shadow: none;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px 12px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--panel-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    position: sticky;
    top: 0;
    text-transform: uppercase;
    z-index: 1;
}

th:first-child {
    border-top-left-radius: 12px;
}

th:last-child {
    border-top-right-radius: 12px;
}

html[data-theme="dark"] th {
    background: linear-gradient(180deg, rgba(16, 24, 35, 0.96) 0%, rgba(20, 30, 42, 0.98) 100%);
    color: #e9f2fb;
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] td {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] tbody tr {
    background: transparent;
}

html[data-theme="dark"] tbody tr:hover {
    background: rgba(91, 228, 155, 0.11);
}

tbody tr {
    transition: background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

tbody tr[data-href] {
    cursor: pointer;
}

tbody tr:hover {
    background: var(--panel-soft);
    box-shadow: inset 3px 0 0 #00a76f;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.row-link {
    color: var(--text);
    display: inline-flex;
    font-weight: 800;
}

.row-link:hover {
    color: #007867;
}

.badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    min-height: 24px;
    padding: 3px 9px;
    white-space: nowrap;
}

.badge.draft { background: #eef2f7; color: #475467; }
.badge.waiting_review,
.badge.review { background: #f3e8ff; color: var(--purple); }
.badge.approved,
.badge.ready,
.badge.exact,
.badge.done { background: #e9f9f1; color: #007867; }
.badge.needs_fix,
.badge.similar { background: var(--yellow-soft); color: var(--yellow); }
.badge.missing { background: var(--red-soft); color: var(--red); }
.badge.blocked { background: #eef2f7; color: var(--dark); }
.badge.deprecated { background: #f3f4f6; color: #6b7280; }

.button,
.icon-button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    gap: 8px;
    justify-content: center;
    min-height: 40px;
}

.button {
    padding: 9px 13px;
}

.icon-button {
    background: white;
    border-color: var(--line);
    color: var(--muted);
    height: 38px;
    width: 38px;
}

.icon-button:hover {
    background: #e9f9f1;
    border-color: #9de8c1;
    color: var(--blue);
}

.icon-button:active,
.button:active {
    transform: translateY(0);
    box-shadow: inset 0 1px 2px rgba(17, 25, 39, 0.12);
}

.button.primary,
.button:not(.secondary):not(.ghost) {
    background: var(--blue);
    color: white;
}

.button.secondary {
    background: var(--blue-soft);
    border-color: #9de8c1;
    color: #007867;
}

.button.ghost {
    background: white;
    border-color: var(--line);
    color: #344054;
}

.theme-toggle {
    position: relative;
}

.theme-light-icon {
    display: none;
}

html[data-theme="light"] .theme-dark-icon {
    display: none;
}

html[data-theme="light"] .theme-light-icon {
    display: inline-block;
}

html[data-theme="dark"] .button.ghost,
html[data-theme="dark"] .icon-button {
    background: var(--panel);
    color: var(--muted);
}

html[data-theme="dark"] .button.secondary {
    background: var(--blue-soft);
    border-color: #176e58;
    color: #5be49b;
}

html[data-theme="dark"] .user-pill,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background: #17212b;
    border-color: var(--line);
    color: var(--text);
}

.user-pill {
    align-items: center;
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #344054;
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    padding: 8px 12px;
}

.avatar-dot {
    align-items: center;
    background: #e9f9f1;
    border-radius: 999px;
    color: #007867;
    display: inline-flex;
    font-size: 12px;
    height: 24px;
    justify-content: center;
    width: 24px;
}

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

.shot-card-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.shot-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 16px;
    display: grid;
    gap: 8px;
    padding: 14px;
    transition: transform .16s ease, border-color .16s ease;
}

.shot-card:hover {
    border-color: var(--blue);
}

.shot-card-top,
.shot-card-meta,
.task-card-head,
.inline-form {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.shot-card-meta {
    color: var(--muted);
    font-size: 13px;
    justify-content: flex-start;
}

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

.task-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    gap: 8px;
    padding: 12px 13px;
}

.task-card:hover,
.resource-card:hover {
    border-color: var(--blue);
    box-shadow: 0 8px 18px rgba(16, 24, 35, 0.08);
    transform: translateY(-1px);
}

.ai-draft-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 14px;
}

.panel-soft-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: 8px;
    padding: 14px;
}

.mini-list-item {
    background: rgba(255,255,255,0.55);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    gap: 2px;
    padding: 8px 10px;
}

html[data-theme="dark"] .mini-list-item {
    background: rgba(17, 24, 39, 0.7);
}

.quick-change-form {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: 180px minmax(180px, 1fr) 140px auto;
}

.quick-change-form .span-2 {
    grid-column: span 2;
}

.note-preview {
    align-items: flex-start;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    border-radius: var(--radius);
    color: var(--text);
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    max-width: 520px;
    overflow: hidden;
    padding: 9px 10px 9px 24px;
    position: relative;
    --note-accent: var(--blue);
}

.note-trigger {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--blue);
    cursor: pointer;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    padding: 0 8px;
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}

.note-trigger:hover {
    transform: translateY(-1px);
}

.note-trigger .icon {
    height: 13px;
    width: 13px;
}

.note-trigger.is-green {
    background: var(--green-soft);
    border-color: #8fe0b6;
    color: #007867;
}

.note-trigger.is-amber {
    background: var(--yellow-soft);
    border-color: #f6d76a;
    color: #9a5b00;
}

.note-trigger.is-red {
    background: var(--red-soft);
    border-color: #f4b2b2;
    color: #b42318;
}

.note-trigger.is-blue {
    background: #eef4ff;
    border-color: #bcd0ff;
    color: #1746a2;
}

html[data-theme="dark"] .note-trigger.is-blue {
    background: rgba(36, 93, 199, 0.2);
    border-color: rgba(99, 141, 255, 0.35);
    color: #a9c3ff;
}

html[data-theme="dark"] .note-trigger.is-green {
    background: rgba(27, 94, 67, 0.28);
    border-color: rgba(111, 216, 164, 0.35);
    color: #7fe6b1;
}

html[data-theme="dark"] .note-trigger.is-amber {
    background: rgba(134, 88, 26, 0.28);
    border-color: rgba(244, 183, 64, 0.35);
    color: #ffd98f;
}

html[data-theme="dark"] .note-trigger.is-red {
    background: rgba(134, 37, 37, 0.28);
    border-color: rgba(255, 107, 107, 0.35);
    color: #ffb3b3;
}

.note-modal-backdrop {
    align-items: center;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 80;
}

.note-modal-backdrop.is-open {
    display: flex;
}

.note-modal {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    max-width: 560px;
    padding: 18px;
    width: min(100%, 560px);
}

.note-modal-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.note-modal-header h3 {
    margin: 0;
}

.note-modal-close {
    align-items: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font-size: 20px;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.note-modal-body p {
    color: var(--text);
    line-height: 1.7;
    margin: 0;
    white-space: pre-wrap;
}

.note-preview::before {
    background: var(--note-accent);
    border-radius: 999px;
    content: "";
    height: 7px;
    left: 10px;
    position: absolute;
    top: 15px;
    width: 7px;
}

.note-preview.moho {
    border-left-color: var(--green);
    --note-accent: var(--green);
}

.note-preview.sound {
    border-left-color: var(--purple);
    --note-accent: var(--purple);
}

.note-preview.blocker {
    border-left-color: var(--red);
    --note-accent: var(--red);
}

.note-preview.task {
    border-left-color: var(--yellow);
    --note-accent: var(--yellow);
}

.note-preview.review-note {
    border-left-color: var(--purple);
    --note-accent: var(--purple);
}

html[data-theme="dark"] .note-preview {
    background: #18232d;
}

.list-item,
.blocker-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 7px;
    padding: 14px;
}

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

.info-grid div,
.settings-grid div {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
}

.info-grid span,
.settings-grid span {
    color: var(--muted);
    display: block;
    margin-bottom: 6px;
}

.shot-sheet {
    display: grid;
    gap: 10px;
}

.shot-sheet dt {
    color: var(--muted);
    font-weight: 800;
}

.shot-sheet dd {
    margin: -4px 0 8px;
}

.blocker-grid {
    display: grid;
    gap: 12px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.tabs span,
.tabs a {
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-weight: 800;
    padding: 9px 12px;
}

html[data-theme="dark"] .tabs span,
html[data-theme="dark"] .tabs a,
html[data-theme="dark"] .progress-item {
    background: var(--panel);
    border-color: var(--line);
    color: var(--muted);
}

html[data-theme="dark"] .tabs span.active,
html[data-theme="dark"] .tabs a.active {
    background: #0b1117;
    color: #5be49b;
}

.tabs span.active,
.tabs a.active {
    background: var(--dark);
    color: white;
}

.character-head {
    align-items: center;
    display: flex;
    gap: 16px;
}

.thumbnail-placeholder {
    align-items: center;
    aspect-ratio: 1;
    background: #eef4ff;
    border: 1px solid #c7d7fe;
    border-radius: var(--radius);
    color: #1746a2;
    display: grid;
    font-weight: 900;
    min-width: 72px;
    place-items: center;
}

html[data-theme="dark"] .thumbnail-placeholder {
    background: #17212b;
    border-color: var(--line);
    color: #5be49b;
}

.header-actions {
    align-items: flex-end;
    display: grid;
    gap: 10px;
    justify-items: end;
}

.helper-note {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.wide-left {
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, .7fr);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags span {
    background: #e9f9f1;
    border: 1px solid #c8fad6;
    border-radius: 999px;
    color: #007867;
    font-weight: 800;
    padding: 7px 10px;
}

html[data-theme="dark"] .tags span {
    background: var(--blue-soft);
    border-color: #176e58;
    color: #5be49b;
}

.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    background: linear-gradient(94.82deg, #fff1f2 1.11%, #e9f9f1 99.11%);
}

html[data-theme="dark"] .auth-page {
    background: linear-gradient(94.82deg, #2a2230 1.11%, #15352e 99.11%);
}

.login-panel {
    background: white;
    max-width: 420px;
    padding: 26px;
    width: calc(100% - 30px);
}

.login-brand {
    margin-bottom: 20px;
}

.form-stack {
    display: grid;
    gap: 14px;
}

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

.modern-planner-shell {
    display: grid;
    gap: 18px;
}

.planner-starter-card {
    background: linear-gradient(135deg, var(--panel) 0%, var(--panel-soft) 100%);
    border: 1px solid var(--line);
    border-radius: 16px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 18px 20px;
}

.planner-starter-card h3 {
    font-size: 18px;
    margin: 4px 0 8px;
}

.planner-starter-card p {
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

.planner-starter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    max-width: 290px;
}

.planner-starter-tags span {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    font-size: 10px;
    font-weight: 700;
    justify-content: center;
    min-height: 24px;
    padding: 4px 8px;
    text-align: center;
}

@media (max-width: 720px) {
    .planner-starter-card {
        flex-direction: column;
    }

    .planner-starter-tags {
        justify-content: flex-start;
        max-width: none;
    }
}

.capture-toolbar {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.capture-tile {
    align-items: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    min-height: 92px;
    padding: 14px 10px;
    position: relative;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.capture-tile:hover,
.capture-tile.active {
    background: linear-gradient(135deg, var(--blue-soft) 0%, var(--panel) 100%);
    border-color: #8fe0b6;
    box-shadow: 0 10px 24px rgba(16, 24, 35, 0.08);
    transform: translateY(-2px);
}

.capture-tile.missing {
    border-color: #f59e0b;
}

.capture-label-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}

.capture-title {
    font-size: 14px;
    font-weight: 800;
}

.capture-label-group small {
    color: var(--muted);
    font-size: 11px;
}

.capture-status {
    align-items: center;
    background: #f59e0b;
    border-radius: 999px;
    color: white;
    display: none;
    height: 18px;
    justify-content: center;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 18px;
}

.capture-status .icon {
    height: 10px;
    width: 10px;
}

.capture-tile.missing .capture-status {
    display: inline-flex;
    background: #f59e0b;
}

.capture-tile.done .capture-status {
    display: inline-flex;
    background: #00a76f;
}

.capture-icon {
    align-items: center;
    background: var(--panel);
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(17, 25, 39, .08);
    color: var(--blue);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.capture-modal-backdrop {
    background: rgba(15, 23, 42, 0.45);
    display: none;
    inset: 0;
    padding: 24px;
    position: fixed;
    z-index: 50;
}

.capture-modal-backdrop.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.capture-modal {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: min(90vh, 860px);
    max-width: 760px;
    overflow: hidden;
    padding: 18px;
    width: min(100%, 760px);
}

.capture-modal-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.capture-modal-header h3 {
    margin: 0 0 4px;
}

.capture-modal-header p {
    color: var(--muted);
    margin: 0;
}

.capture-close {
    align-items: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font-size: 20px;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.capture-modal-body {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

.capture-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    display: none;
    padding: 18px;
}

.capture-panel.active {
    display: block;
}

.capture-panel-head {
    margin-bottom: 14px;
}

.capture-panel-head h3 {
    font-size: 16px;
    margin: 0 0 4px;
}

.capture-panel-head p {
    color: var(--muted);
    margin: 0;
}

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

.capture-grid .span-2,
.span-2 {
    grid-column: 1 / -1;
}

.capture-panel-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.field-hint {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

.capture-footer {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 14px;
}

.capture-validation-note {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    color: #9a4f00;
    font-size: 13px;
    font-weight: 700;
    margin-top: 12px;
    padding: 10px 12px;
}

input.is-invalid,
textarea.is-invalid {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

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

.prompt-output {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    min-height: 520px;
    white-space: pre;
    width: 100%;
}

.prompt-output.compact {
    min-height: 220px;
}

.sr-copy {
    height: 1px;
    left: -9999px;
    min-height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.progress-ring {
    --progress: 0;
    align-items: center;
    aspect-ratio: 1;
    background:
        radial-gradient(circle at center, #fff 58%, transparent 59%),
        conic-gradient(#00a76f calc(var(--progress) * 1%), #e5e7eb 0);
    border-radius: 999px;
    display: grid;
    height: 72px;
    justify-items: center;
    place-content: center;
}

html[data-theme="dark"] .progress-ring {
    background:
        radial-gradient(circle at center, var(--panel) 58%, transparent 59%),
        conic-gradient(#00a76f calc(var(--progress) * 1%), #344456 0);
}

.progress-ring.large {
    height: 132px;
}

.progress-ring strong {
    color: var(--text);
    font-size: 20px;
    line-height: 1;
}

.progress-ring span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.progress-bar {
    background: #e5e7eb;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    width: 100%;
}

html[data-theme="dark"] .progress-bar {
    background: #344456;
}

.progress-bar span {
    background: #00a76f;
    display: block;
    height: 100%;
}

.metric-card.compact strong {
    font-size: 24px;
    margin: 10px 0;
}

.progress-overview {
    align-items: center;
    display: grid;
    gap: 22px;
    grid-template-columns: 150px minmax(0, 1fr);
}

.progress-category-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.progress-tile {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 8px;
    padding: 12px;
}

.progress-tile strong {
    font-size: 20px;
}

.progress-board {
    display: grid;
    gap: 14px;
}

.progress-group summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.progress-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.progress-item,
.inline-form {
    align-items: center;
    display: flex;
    gap: 10px;
}

.progress-item {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
}

.progress-item-main {
    display: grid;
    gap: 2px;
    min-width: 180px;
}

.progress-item input {
    min-width: 160px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.next-action {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.clickable {
    color: inherit;
}

.readiness-strip {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.readiness-chip {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    display: grid;
    gap: 8px;
    padding: 12px;
}

.readiness-chip span {
    color: var(--muted);
    font-weight: 800;
}

label {
    color: var(--muted);
    display: grid;
    font-weight: 800;
    gap: 7px;
}

input,
textarea,
select {
    background: #fcfdfd;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    color: var(--text);
    font: inherit;
    padding: 11px 12px;
    box-shadow: inset 0 1px 2px rgba(17, 25, 39, .03);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #7f90a3;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #5be49b;
    box-shadow: 0 0 0 3px rgba(0, 167, 111, .14);
    outline: none;
}

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

select {
    width: 100%;
}

.checkline {
    align-items: center;
    color: var(--text);
    display: flex;
    flex-direction: row;
    font-weight: 800;
}

.checkline input {
    width: auto;
}

.alert {
    border-radius: var(--radius);
    margin-bottom: 14px;
    padding: 10px 12px;
}

.alert.danger {
    background: var(--red-soft);
    color: var(--red);
}

.alert.success {
    background: var(--green-soft);
    color: var(--green);
}

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

@media (max-width: 1100px) {
    .detail-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        justify-items: start;
        width: 100%;
    }

    .header-actions .button {
        min-width: 180px;
    }

    .card-grid,
    .info-grid,
    .settings-grid,
    .progress-category-grid,
    .readiness-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .quick-change-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        height: auto;
        position: static;
    }

    .mobile-menu {
        display: inline-flex;
    }

    .nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid,
    .split-grid,
    .card-grid,
    .info-grid,
    .settings-grid,
    .progress-category-grid,
    .readiness-strip,
    .quick-change-form {
        grid-template-columns: 1fr;
    }

    .quick-change-form .span-2 {
        grid-column: 1;
    }

    .note-preview {
        max-width: none;
    }

    .main {
        padding: 0;
    }

    .topbar {
        align-items: flex-start;
        padding: 16px;
    }

    .content-container {
        padding: 18px;
    }

    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
        padding: 24px;
    }

    .topbar,
    .detail-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions {
        justify-items: start;
    }

    .helper-note,
    .character-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

.compact-resource-grid {
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.compact-task-list {
    gap: 8px;
}

.compact-card {
    border-radius: 8px;
    gap: 7px;
    min-height: 0;
    padding: 10px 11px;
}

.compact-title {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 0;
}

.compact-title h3,
.compact-title strong {
    font-size: 14px;
    line-height: 1.3;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.state-dot {
    background: var(--muted);
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(99, 115, 129, .12);
    flex: 0 0 auto;
    height: 9px;
    width: 9px;
}

.state-dot.is-ready,
.state-dot.is-approved,
.state-dot.is-done,
.state-dot.is-exact {
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(15, 138, 95, .14);
}

.state-dot.is-missing,
.state-dot.is-blocked {
    background: var(--red);
    box-shadow: 0 0 0 3px rgba(201, 52, 52, .14);
}

.state-dot.is-needs_fix,
.state-dot.is-similar,
.state-dot.is-waiting_review,
.state-dot.is-review {
    background: var(--yellow);
    box-shadow: 0 0 0 3px rgba(183, 121, 31, .16);
}

.compact-chip {
    align-items: center;
    background: var(--blue-soft);
    border: 1px solid rgba(0, 167, 111, .18);
    border-radius: 999px;
    color: var(--blue);
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    min-height: 22px;
    padding: 4px 8px;
    white-space: nowrap;
}

.compact-chip.neutral {
    background: var(--panel-soft);
    border-color: var(--line);
    color: var(--muted);
}

.compact-chip.priority-high {
    background: var(--red-soft);
    border-color: rgba(201, 52, 52, .2);
    color: var(--red);
}

.compact-chip.priority-normal {
    background: var(--yellow-soft);
    border-color: rgba(183, 121, 31, .2);
    color: var(--yellow);
}

.compact-chip.priority-low {
    background: var(--green-soft);
    border-color: rgba(15, 138, 95, .2);
    color: var(--green);
}

.resource-meta,
.task-meta-row,
.task-actions-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.task-actions-row {
    justify-content: space-between;
}

.compact-status-form {
    justify-content: flex-start;
}

.compact-status-form select {
    min-height: 32px;
    padding: 6px 28px 6px 9px;
}

.compact-status-form .icon-button,
.compact-card .note-trigger {
    height: 30px;
    min-height: 30px;
}

.truncate-line {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-response-workbench textarea {
    min-height: 190px;
}

.draft-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.draft-stats span {
    align-items: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    gap: 5px;
    min-height: 28px;
    padding: 5px 10px;
}

.draft-stats strong {
    color: var(--text);
}

.raw-response-details {
    margin-top: 14px;
}

.raw-response-details summary {
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
}

.raw-response-details textarea {
    margin-top: 10px;
}

.mobile-nav-scrim {
    display: none;
}

.planner-top-actions {
    align-items: center;
}

.response-import-button {
    background: var(--blue-soft);
    border-color: rgba(0, 167, 111, .25);
    color: var(--blue);
    height: 42px;
    min-height: 42px;
    width: 42px;
}

.response-import-button .icon {
    height: 20px;
    width: 20px;
}

.planner-quick-actions {
    display: flex;
    justify-content: flex-end;
    margin: 14px 0;
}

.planner-action-icon {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
}

.planner-action-icon:hover,
.object-review-card:hover,
.object-review-row:hover {
    border-color: rgba(0, 167, 111, .45);
    box-shadow: var(--shadow-sm);
}

.planner-modal-backdrop {
    align-items: center;
    background: rgba(15, 23, 42, .66);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 80;
}

.planner-modal-backdrop.is-open {
    display: flex;
}

.planner-modal {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    max-height: min(86vh, 920px);
    max-width: 760px;
    overflow: hidden;
    width: min(100%, 760px);
}

.planner-modal.compact {
    max-width: 560px;
}

.planner-modal.large {
    max-width: 980px;
    width: min(100%, 980px);
}

.planner-modal.xlarge {
    max-width: 1180px;
    width: min(100%, 1180px);
}

.planner-modal-header,
.planner-modal-footer {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 14px 16px;
}

.planner-modal-header {
    border-bottom: 1px solid var(--line);
}

.planner-modal-footer {
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.planner-modal-footer form {
    margin: 0;
}

.planner-modal-body {
    max-height: calc(86vh - 140px);
    overflow: auto;
    padding: 16px;
}

.planner-modal-body .prompt-output {
    min-height: 420px;
}

.planner-loading-overlay {
    align-items: center;
    background: rgba(15, 23, 42, .62);
    color: #fff;
    display: none;
    flex-direction: column;
    font-weight: 800;
    gap: 12px;
    inset: 0;
    justify-content: center;
    position: fixed;
    z-index: 90;
}

.planner-loading-overlay.is-open {
    display: flex;
}

.planner-loader {
    animation: planner-spin .8s linear infinite;
    border: 3px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    border-top-color: #fff;
    height: 34px;
    width: 34px;
}

@keyframes planner-spin {
    to {
        transform: rotate(360deg);
    }
}

.toast-stack {
    bottom: 18px;
    display: grid;
    gap: 8px;
    position: fixed;
    right: 18px;
    z-index: 120;
}

.app-toast {
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 4px solid var(--green);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    color: var(--text);
    font-weight: 800;
    min-width: 180px;
    padding: 10px 12px;
    transition: opacity .2s ease, transform .2s ease;
}

.app-toast.is-hiding {
    opacity: 0;
    transform: translateY(6px);
}

.planner-review-tabs {
    display: grid;
    gap: 14px;
}

.planner-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.planner-tab-button {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    padding: 7px 10px;
}

.planner-tab-button.active {
    background: var(--blue-soft);
    border-color: rgba(0, 167, 111, .28);
    color: var(--blue);
}

.planner-tab-panel {
    display: none;
}

.planner-tab-panel.active {
    display: block;
}

.planner-review-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.planner-review-grid.two {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.planner-review-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.object-review-card,
.object-review-row {
    cursor: pointer;
}

.review-card-head {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 0;
}

.review-card-head h3 {
    font-size: 15px;
    line-height: 1.25;
    margin: 0;
    min-width: 0;
}

.review-field-grid {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.review-field {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 3px;
    padding: 8px;
}

.review-field span,
.review-chip-group > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.review-field strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.review-chip-group {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.animator-checklist {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.animator-checklist li {
    align-items: center;
    color: var(--text);
    display: flex;
    gap: 8px;
}

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

.review-table {
    border-collapse: collapse;
    min-width: 820px;
    width: 100%;
}

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

.review-table th {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.comment-badge {
    background: var(--yellow-soft);
    border: 1px solid rgba(183, 121, 31, .22);
    border-radius: 999px;
    color: var(--yellow);
    font-size: 11px;
    font-weight: 900;
    margin-left: auto;
    padding: 4px 7px;
}

.planner-revision-footer {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 14px;
    padding: 12px;
}

.planner-revision-footer p {
    margin: 4px 0 0;
}

@media (max-width: 720px) {
    .planner-modal-backdrop {
        padding: 10px;
    }

    .planner-modal,
    .planner-modal.large,
    .planner-modal.xlarge {
        max-height: 92vh;
        width: 100%;
    }

    .planner-modal-header,
    .planner-modal-footer,
    .planner-revision-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .planner-modal-body {
        max-height: calc(92vh - 165px);
    }
}

@media (max-width: 980px) {
    body.mobile-nav-open {
        overflow: hidden;
    }

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

    .icon-button.mobile-menu {
        display: inline-flex;
    }

    .sidebar {
        box-shadow: var(--shadow-lg);
        display: block;
        height: 100vh;
        left: 0;
        max-width: min(84vw, 310px);
        overflow-y: auto;
        position: fixed;
        top: 0;
        transform: translateX(-105%);
        transition: transform .2s ease;
        width: 310px;
        z-index: 70;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .mobile-nav-scrim {
        background: rgba(15, 23, 42, .55);
        border: 0;
        display: none;
        inset: 0;
        padding: 0;
        position: fixed;
        z-index: 60;
    }

    body.mobile-nav-open .mobile-nav-scrim {
        display: block;
    }

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

    .topbar {
        gap: 10px;
    }
}
