:root {
    --bg: #dfe7eb;
    --panel: #f7f4ef;
    --panel-soft: #edf1f3;
    --border: #b8c6d0;
    --text: #0f2940;
    --muted: #61768a;
    --primary: #486986;
    --danger: #b7473f;
    --danger-soft: #f8ecea;
    --danger-border: #d8b0ab;
    --danger-text: #8f302b;
    --warning: #c98d2c;
    --avatar-bg: #d7e0e7;
    --avatar-text: #22405d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    background: var(--bg);
    color: var(--text);
}

body.theme-dark {
    --bg: #10263b;
    --panel: #12283d;
    --panel-soft: #17324a;
    --border: #38526a;
    --text: #e3edf5;
    --muted: #9fb4c7;
    --primary: #88a9c7;
    --danger-soft: #4d2b2a;
    --danger-border: #8b5551;
    --danger-text: #f0c3be;
    --avatar-bg: #28445d;
    --avatar-text: #e3edf5;
}

a {
    color: #275170;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.app-shell {
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(180deg, #eef2f4, #dde5ea);
    border-bottom: 1px solid #a8b7c2;
    box-shadow: none;
}

.topbar-main,
.page-shell {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0 8px;
}

.topbar-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 42px;
    height: 42px;
    padding: 0;
}

.topbar-mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #082343;
}

.topbar-mobile-panel {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
}

.brand-link:hover {
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 2px;
    background: #2f5877;
    color: white;
    font-weight: bold;
    letter-spacing: 0.04em;
    border: 1px solid #24465f;
}

.brand {
    display: block;
    font-size: 22px;
    font-weight: bold;
    color: #082343;
}

.brand-subtitle {
    display: block;
    margin-top: 0;
    color: var(--muted);
    font-size: 12px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.topbar-utility {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.topbar-utility-label {
    font-size: 11px;
    font-weight: bold;
    color: var(--muted);
    text-transform: uppercase;
}

.locale-form {
    margin: 0;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    white-space: nowrap;
}

.theme-toggle-icon {
    font-size: 13px;
    line-height: 1;
}

.locale-select {
    min-width: 110px;
    padding-right: 24px;
}

.user-chip {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 0;
    background: transparent;
    border: 0;
    white-space: nowrap;
}

.user-chip-name {
    font-weight: bold;
}

.user-chip-role {
    color: var(--muted);
    font-size: 11px;
}

.user-chip-avatar,
.profile-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--avatar-bg);
    color: var(--avatar-text);
    font-weight: 700;
}

.user-chip-avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
}

.user-chip-avatar-image {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    object-fit: cover;
    display: block;
}

.topbar-logout {
    margin-top: 0;
}

.topnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 0 10px;
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
    border-top: 1px solid #cdd8df;
}

.topnav-primary {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.topnav a,
.topnav-menu summary {
    padding: 8px 12px;
    border-radius: 0;
    color: var(--text);
    background: #d7e1e8;
    border: 1px solid #b3c2cc;
    transition: background 0.18s ease, border-color 0.18s ease;
    font-size: 13px;
    margin-right: 2px;
}

.topnav a.active,
.topnav a:hover,
.topnav-menu summary.active,
.topnav-menu summary:hover {
    background: #edf2f4;
    border-color: #9eb1bd;
    text-decoration: none;
}

.topnav-menu {
    position: relative;
}

.project-index-toolbar,
.project-category-manager {
    margin-bottom: 16px;
}

.project-index-filters,
.project-category-form {
    display: grid;
    gap: 12px;
}

.project-index-filters {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
}

.project-index-filter-actions,
.project-list-card-actions,
.project-category-checks,
.project-group-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-category-manager-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 16px;
}

.project-category-list,
.project-group-stack {
    display: grid;
    gap: 12px;
}

.project-settings-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

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

.project-category-inline-card,
.project-group,
.project-list-card {
    border: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: 10px;
}

.project-category-inline-card,
.project-list-card {
    padding: 14px;
}

.project-category-inline-head,
.project-group-summary,
.project-list-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.project-group {
    overflow: hidden;
}

.project-group-summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    background: var(--panel);
}

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

.project-group-heading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.project-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    padding: 0 14px 14px;
}

.project-list-card {
    border-left: 6px solid var(--project-accent, var(--primary));
    background: linear-gradient(180deg, var(--panel) 0%, var(--panel-soft) 100%);
}

.project-edit-cta-card {
    border: 1px solid var(--primary);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.project-list-card-body,
.project-list-card-meta {
    display: grid;
    gap: 10px;
}

.project-list-card-meta {
    font-size: 12px;
}

.project-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
    background: var(--project-accent, var(--primary));
    border: 1px solid rgba(0, 0, 0, 0.18);
}

@media (max-width: 900px) {
    .project-category-manager-grid {
        grid-template-columns: 1fr;
    }
}

.topnav-menu summary {
    list-style: none;
    cursor: pointer;
}

.topnav-menu summary::-webkit-details-marker {
    display: none;
}

.topnav-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    display: grid;
    gap: 4px;
    padding: 10px;
    border-radius: 0;
    background: #f8fbfd;
    border: 1px solid #b8c9d8;
    box-shadow: none;
}

.topnav-menu-panel a {
    display: block;
}

.content {
    padding: 18px 0 28px;
}

.page-shell {
    display: block;
}

.app-workspace {
    background: #ffffff;
    border: 1px solid #aebfce;
    padding: 18px;
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 16px 0 24px;
    background: transparent;
    color: #deebf4;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr auto;
    gap: 18px;
    align-items: start;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

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

.project-page-header {
    align-items: flex-start;
}

.project-heading h1 {
    margin: 0 0 4px;
    font-size: 28px;
    line-height: 1.1;
}

.page-header-actions {
    align-items: center;
}

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

.card,
.panel,
.login-panel {
    background: var(--panel);
    border: 1px solid #c7d3db;
    border-radius: 0;
    padding: 16px;
    box-shadow: none;
}

.card h3,
.panel h3 {
    margin-top: 0;
}

.panel-soft {
    background: var(--panel-soft);
    box-shadow: none;
}

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

.btn,
button,
input[type="submit"] {
    background: #dfe7ec;
    color: #17324f;
    border: 1px solid #afc0cb;
    border-radius: 2px;
    padding: 7px 11px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
    background: #e9eef1;
    border-color: #96abba;
    box-shadow: none;
}

.btn-secondary {
    background: #e6ecef;
    color: #22405d;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: #8e342f;
}

.btn-danger-outline {
    background: var(--danger-soft);
    color: var(--danger-text);
    border-color: var(--danger-border);
}

.btn-danger-outline:hover {
    text-decoration: none;
    filter: brightness(0.98);
}

.inline-form {
    display: inline;
}

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

label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

input,
textarea,
select {
    width: 100%;
    padding: 7px 8px;
    border-radius: 2px;
    border: 1px solid var(--border);
    background: #fbfaf7;
    color: var(--text);
}

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

.form-block {
    margin-top: 12px;
}

.form-note {
    margin-top: 8px;
}

.form-check-row {
    margin: 12px 0;
}

.table-wrap {
    overflow: auto;
}

.project-list-title {
    display: grid;
    gap: 4px;
}

.project-list-title > a {
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.project-progress-cell {
    display: grid;
    gap: 6px;
    min-width: 120px;
}

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

th,
td {
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid #d6e0ea;
}

.flash {
    padding: 10px 12px;
    border-radius: 0;
    margin-bottom: 14px;
}

.flash-success {
    background: #edf7ef;
    border: 1px solid #a5c8aa;
}

.flash-error {
    background: #faefee;
    border: 1px solid #d6a7a2;
}

.flash-warning {
    background: #fcf5e6;
    border: 1px solid #dabb80;
}

.errors {
    margin: 0 0 18px;
    padding: 14px 16px 14px 32px;
    border-radius: 0;
    border: 1px solid #d6a7a2;
    background: #faefee;
}

.stats-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}

.hero-panel {
    padding: 28px;
    overflow: hidden;
    position: relative;
}

.hero-panel::after {
    content: "";
    position: absolute;
    right: -50px;
    top: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.24), transparent 65%);
}

.hero-title {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.15;
}

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

.hero-panel .pill {
    background: #e6eef5;
    color: #294864;
    border-color: #bdd0de;
    font-weight: 600;
}

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

.login-page {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 32%),
        linear-gradient(180deg, #7e96a8 0%, #667e90 100%);
}

.login-panel {
    width: min(460px, 100%);
    padding: 24px;
}

.login-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.login-brand-pill {
    margin-bottom: 12px;
}

.login-title {
    margin: 0 0 8px;
}

.login-field {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
}

.login-demo {
    margin: 18px 0 16px;
    padding: 14px 16px;
    border: 1px solid #b9cddb;
    border-left: 4px solid var(--primary);
    background: #eef4f8;
}

.login-demo h2 {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--primary);
}

.login-demo__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    border-top: 1px solid #d7e2e9;
    font-size: 13px;
}

.login-demo__row:first-of-type {
    border-top: 0;
}

.login-demo__row span {
    color: var(--muted);
}

.login-demo__row code {
    font-weight: 700;
    color: var(--text);
    text-align: right;
    word-break: break-all;
}

.login-demo p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

body.theme-dark .login-demo {
    background: #17324a;
    border-color: #38526a;
    border-left-color: var(--primary);
}

body.theme-dark .login-demo__row {
    border-top-color: #38526a;
}

body.theme-dark .login-demo__row code {
    color: #e3edf5;
}

.login-panel label {
    color: #17324f;
    font-weight: 600;
}

.login-panel .locale-form {
    margin: 0;
}

.pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 2px;
    font-size: 12px;
    line-height: 1.2;
    background: #e7ecef;
    color: #234460;
    border: 1px solid #bfccd5;
}

.pill-status,
.pill-priority {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.pill-status {
    background: #dfe7ec;
    color: #294864;
    border-color: #b6c6d0;
}

.pill-status-active {
    background: #e4f2e5;
    color: #1f5d2c;
    border-color: #a7cdae;
}

.pill-status-paused {
    background: #fff1dc;
    color: #8a5a12;
    border-color: #dfc08f;
}

.pill-status-completed {
    background: #e2efff;
    color: #1d517f;
    border-color: #abc4df;
}

.pill-status-default {
    background: #e7ecef;
    color: #234460;
    border-color: #bfccd5;
}

.pill-priority {
    background: #eceff1;
    color: #465f76;
    border-color: #c7d1d9;
}

.comment {
    border: 1px solid #cdd7de;
    border-radius: 0;
    padding: 12px;
    margin-bottom: 14px;
    background: #faf8f4;
}

.empty-state {
    padding: 18px;
    text-align: center;
    color: var(--muted);
    background: #eef2f3;
    border: 1px dashed #bcc9d2;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.comment-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.attachment {
    padding: 10px;
    border-radius: 2px;
    background: #eff3f4;
    border: 1px solid #cdd7de;
    display: grid;
    gap: 8px;
    max-width: 240px;
}

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

.project-shell {
    display: grid;
    gap: 14px;
}

.project-main {
    display: grid;
    gap: 14px;
}

.project-summary-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 14px;
    padding: 0 0 12px;
    border-bottom: 1px solid #d6e0ea;
}

.project-dashboard-panel {
    display: grid;
    gap: 14px;
}

.project-summary-main {
    display: grid;
    gap: 10px;
}

.project-kicker {
    font-size: 11px;
    font-weight: bold;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.project-summary-description {
    color: var(--text);
    line-height: 1.45;
}

.project-progress-strip {
    display: grid;
    gap: 6px;
    padding-top: 4px;
}

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

.project-progress-bar {
    height: 10px;
    background: #e4edf4;
    border: 1px solid #c8d6e1;
}

.project-progress-bar span {
    display: block;
    height: 100%;
    background: #2f5877;
}

.progress-meter {
    height: 8px;
    background: #e4edf4;
    border: 1px solid #c8d6e1;
}

.progress-meter span {
    display: block;
    height: 100%;
    background: #2f5877;
}

.progress-meter-compact {
    height: 6px;
}

.progress-edit-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-top: 6px;
}

.section-separator {
    margin: 16px 0;
    border: 0;
    border-top: 1px solid #d6e0ea;
}

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

.project-facts dt {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.project-facts dd {
    margin: 0;
    font-weight: 600;
}

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

.project-info-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid #d6e0ea;
    background: #f9fbfd;
}

.project-info-card-head {
    display: grid;
    gap: 2px;
}

.project-info-card-head strong {
    font-size: 16px;
}

.project-info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin: 0;
}

.project-info-list dt {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-info-list dd {
    margin: 0;
    font-weight: 600;
}

.project-info-callouts,
.project-info-feed {
    display: grid;
    gap: 10px;
}

.project-callout,
.project-feed-item {
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid #d6e0ea;
    background: #ffffff;
}

.project-callout-label {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 0 10px;
    border-bottom: 1px solid #b7c6d0;
}

.section-nav a,
.section-nav button {
    padding: 8px 12px;
    border-radius: 2px 2px 0 0;
    background: #d7e1e8;
    border: 1px solid #b3c2cc;
    color: var(--text);
    font-size: 13px;
    margin-right: 2px;
    position: relative;
    top: 1px;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
}

.section-nav a:hover,
.section-nav button:hover {
    text-decoration: none;
    border-color: #9eb1bd;
    background: #e7edf0;
}

.section-nav a.active,
.section-nav button.active {
    background: var(--panel);
    border-bottom-color: var(--panel);
}

[data-tab-panel][hidden] {
    display: none !important;
}

.workspace-section,
.workspace-subsection,
.entity-card {
    border: 1px solid #ccd6dd;
    border-radius: 0;
    background: #f1f4f5;
}

.workspace-section-planning {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.workspace-section-planning > summary {
    padding: 8px 0 12px;
}

.workspace-section-planning[open] > summary {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.workspace-section-support {
    background: transparent;
}

.workspace-section > summary,
.workspace-subsection > summary,
.entity-card > summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    cursor: pointer;
}

.workspace-section > summary::-webkit-details-marker,
.workspace-subsection > summary::-webkit-details-marker,
.entity-card > summary::-webkit-details-marker {
    display: none;
}

.workspace-section[open] > summary,
.workspace-subsection[open] > summary,
.entity-card[open] > summary {
    border-bottom: 1px solid #d6e0ea;
}

.detail-summary-copy,
.detail-summary-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.detail-summary-copy {
    min-width: 0;
}

.detail-summary-copy strong {
    font-size: 16px;
}

.workspace-body {
    display: grid;
    gap: 14px;
    padding: 12px;
}

.workspace-body-single {
    grid-template-columns: 1fr;
}

.workspace-main {
    display: grid;
    gap: 18px;
}

.planning-layout {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

.planning-sidebar {
    display: grid;
    gap: 16px;
}

.planning-side-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #d6e0ea;
    background: #f8fbfd;
}

.planning-layout-legacy {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
}

.planning-primary {
    display: grid;
    gap: 16px;
}

.planning-group {
    display: grid;
    gap: 10px;
}

.planning-group-tree {
    gap: 14px;
}

.planning-group-board {
    padding-top: 4px;
}

.planning-tools {
    padding-left: 16px;
    border-left: 1px solid #d6e0ea;
}

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

.workspace-subsection > summary {
    font-weight: bold;
    background: #edf3f7;
}

.workspace-subsection form,
.entity-card-body {
    padding: 12px 14px 14px;
}

.entity-card-body {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.section-title-row p,
.section-title-row h3 {
    margin: 0;
}

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

.planning-tree {
    display: grid;
    gap: 16px;
}

.planning-cluster {
    display: grid;
    gap: 0;
    border: 1px solid #d6e0ea;
    background: #f8fbfd;
}

.planning-cluster-head {
    padding: 0;
}

.planning-cluster-head .milestone-card {
    border: 0;
    background: #eef4f8;
}

.planning-cluster-body {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 12px;
    border-top: 1px solid #d6e0ea;
}

.milestone-progress,
.task-list-progress {
    margin: 0 12px 10px;
}

.planning-cluster-body[hidden],
.task-list-body[hidden] {
    display: none !important;
}

.planning-cluster-empty {
    margin: 0;
}

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

.planning-unassigned-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #d6e0ea;
    background: #eef3f7;
}

.planning-collapse-toggle {
    display: inline-grid;
    place-items: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}

.planning-collapse-toggle span {
    display: block;
    font-weight: 700;
    transform: translateY(-1px);
}

.planning-collapse-toggle.is-collapsed {
    background: #dfe8ef;
}

.kanban-column {
    display: grid;
    align-content: start;
    gap: 0;
    padding: 0;
    border-radius: 0;
    background: #ffffff;
    border: 1px solid #c7d5e0;
    min-height: 0;
}

.planning-list-stack > .kanban-column {
    margin: 0;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    background: #2f5877;
    color: #ffffff;
}

.kanban-column-title {
    display: block;
    margin-bottom: 2px;
}

.kanban-column-meta {
    font-size: 12px;
    line-height: 1.45;
    color: #dde9f1;
}

.kanban-column-description {
    font-size: 13px;
    padding: 8px 10px 0;
}

.kanban-column-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 10px 7px;
    border-bottom: 1px solid #d6e0ea;
    background: #f4f8fb;
}

.kanban-column-actions a {
    color: #4f6d87;
    font-size: 12px;
}

.task-list-body {
    display: grid;
    gap: 0;
    padding: 0 0 10px;
}

.kanban-task-stack {
    align-content: start;
    min-height: 0;
    padding: 8px 10px 0;
    border-left: 0;
    margin: 0;
}

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

.member-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 0;
    background: #ffffff;
    border: 1px solid #d6e0ea;
}

.member-card-main {
    display: grid;
    gap: 2px;
}

.member-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.member-manage-form {
    display: grid;
    gap: 10px;
}

.member-picker-list,
.choice-picker-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    margin-top: 10px;
    align-items: stretch;
    max-height: 250px;
    overflow: auto;
    padding-right: 4px;
}

.choice-picker-list-compact {
    grid-template-columns: 1fr;
    overflow-x: hidden;
}

.member-picker-toolbar,
.choice-picker-toolbar {
    margin-top: 10px;
}

.choice-picker-panel {
    display: grid;
    gap: 10px;
    align-content: start;
}

.notification-preferences {
    display: grid;
    gap: 10px;
}

.notification-mode-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
}

.notification-mode-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    cursor: pointer;
}

.notification-mode-option input[type="radio"] {
    width: auto;
    margin: 0;
    accent-color: var(--primary);
}

.notification-recipient-panel {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--panel-soft);
}

.choice-picker-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.choice-picker-head label {
    margin-bottom: 0;
}

.choice-picker-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.choice-picker-actions {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.choice-picker-actions .btn {
    padding: 5px 8px;
    font-size: 12px;
}

.member-picker-search,
.choice-picker-search {
    width: 100%;
    max-width: none;
}

.member-picker-item,
.choice-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #d6e0ea;
    background: #ffffff;
    cursor: pointer;
    min-height: 62px;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.member-picker-item input[type="checkbox"],
.choice-picker-item input[type="checkbox"] {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    accent-color: var(--primary);
}

.member-picker-copy,
.choice-picker-copy {
    display: grid;
    gap: 2px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.member-picker-copy strong,
.choice-picker-copy strong,
.member-picker-copy .muted,
.choice-picker-copy .muted {
    display: block;
    overflow-wrap: anywhere;
}

.member-picker-item:hover,
.choice-picker-item:hover {
    background: #f7fafc;
    border-color: #b7c9d8;
}

.member-picker-item:has(input[type="checkbox"]:checked),
.choice-picker-item:has(input[type="checkbox"]:checked) {
    background: #edf4f9;
    border-color: #9ab6ca;
    box-shadow: inset 0 0 0 1px rgba(47, 88, 119, 0.12);
}

.member-manage-actions {
    justify-content: flex-start;
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
}

.mini-card {
    padding: 12px;
    border-radius: 0;
    border: 1px solid #d6e0ea;
    background: #f8fbfd;
}

.danger-panel {
    border-color: var(--danger-border);
}

.danger-title {
    color: var(--danger-text);
}

.mini-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}

.milestone-inline-meta {
    font-size: 12px;
    line-height: 1.4;
}

.milestone-description {
    font-size: 13px;
    line-height: 1.45;
}

.empty-inline {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    padding: 10px;
    border-top: 1px solid #e1e8ef;
}

.task-stack {
    display: grid;
    gap: 0;
    margin-top: 0;
}

.task-item {
    padding: 8px 10px;
    border-radius: 0;
    background: #ffffff;
    border: 0;
    border-top: 1px solid #e1e8ef;
    border-left: 3px solid #d6e0ea;
    box-shadow: none;
}

.task-stack .task-item:first-child {
    border-top: 0;
}

.task-item-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}

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

.task-item-title {
    display: block;
    margin-right: 10px;
    line-height: 1.3;
    font-size: 14px;
}

.task-hierarchy-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 4px;
    color: #dce8f0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.task-item .task-hierarchy-line {
    color: var(--muted);
}

.task-hierarchy-tag {
    display: inline-block;
    padding: 2px 5px;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, 0.08);
}

.task-item-description {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.45;
}

.task-progress-inline {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.task-item-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 12px;
    line-height: 1.45;
}

.task-item-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
    font-size: 12px;
}

.task-item-badges {
    align-items: flex-start;
}

#planning-modal-root {
    position: fixed;
    inset: 0;
    z-index: 1200;
    pointer-events: none;
}

#planning-modal-root:empty {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 35, 67, 0.45);
    pointer-events: auto;
}

.modal-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    padding: 18px;
    border-radius: 0;
    background: #f9fbfd;
    border: 1px solid #aebfce;
    box-shadow: 0 14px 36px rgba(8, 35, 67, 0.18);
    display: grid;
    gap: 16px;
    pointer-events: auto;
    overflow: auto;
}

.modal-card-wide {
    width: min(760px, calc(100% - 32px));
}

.modal-comments-panel {
    display: grid;
    gap: 10px;
}

.comment-stream {
    display: grid;
    gap: 12px;
}

.attachment-stream {
    display: grid;
    gap: 8px;
}

.attachment-entry {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #d6e0ea;
    background: #ffffff;
}

.attachment-entry-preview {
    display: grid;
    align-content: start;
    gap: 8px;
}

.attachment-entry-preview img {
    display: block;
    width: 100%;
    max-width: 56px;
    max-height: 56px;
    object-fit: cover;
    border: 1px solid #d6e0ea;
}

.attachment-thumbnail-link {
    display: inline-block;
}

.attachment-audio {
    display: block;
    width: min(100%, 220px);
    max-width: 100%;
}

.attachment-audio--compact {
    width: min(100%, 180px);
}

body.lightbox-open {
    overflow: hidden;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.image-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 18, 28, 0.84);
}

.image-lightbox-card {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    max-width: min(92vw, 1100px);
    max-height: 92vh;
    margin: 4vh auto;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.35);
}

.image-lightbox-media {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 96px);
    margin: 0 auto;
    border-radius: 12px;
}

.image-lightbox-caption {
    color: #4b5563;
    font-size: 0.95rem;
    text-align: center;
    word-break: break-word;
}

.image-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    font-size: 1.4rem;
    cursor: pointer;
}

.attachment-entry-body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.attachment-entry-meta,
.attachment-entry-note {
    font-size: 11px;
    line-height: 1.35;
}

.modal-inline-comment-form {
    display: grid;
    gap: 8px;
}

.modal-inline-comment-form .form-block {
    margin-top: 0;
}

.modal-inline-comment-form textarea {
    min-height: 72px;
}

.attachment-entry-note {
    overflow-wrap: anywhere;
}

.modal-card-header,
.modal-card-actions,
.delete-dependency-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

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

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

.modal-form .section-nav {
    padding-bottom: 0;
}

.modal-section-nav {
    margin-top: -2px;
}

.modal-tab-panel {
    display: grid;
    gap: 12px;
    padding-top: 2px;
}

.modal-form-actions {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #d6e0ea;
}

.form-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.delete-dependencies {
    display: grid;
    gap: 10px;
}

.delete-dependency-row {
    padding: 10px 12px;
    border-radius: 0;
    background: #ffffff;
    border: 1px solid #d6e0ea;
}

.profile-avatar-image {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    object-fit: cover;
    display: block;
    margin-bottom: 12px;
}

.profile-avatar-fallback {
    width: 96px;
    height: 96px;
    font-size: 32px;
    margin-bottom: 12px;
}

.modal-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.priority-low {
    border-left: 4px solid #22c55e;
}

.priority-medium {
    border-left: 4px solid #38bdf8;
}

.priority-high {
    border-left: 4px solid #f59e0b;
}

.priority-critical {
    border-left: 4px solid #ef4444;
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline-item {
    padding: 12px;
    border-radius: 0;
    background: #ffffff;
    border: 1px solid #d6e0ea;
}

.gantt-panel {
    overflow: hidden;
}

.gantt-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.gantt-grid-header,
.gantt-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 14px;
}

.gantt-grid-header {
    margin-bottom: 10px;
}

.gantt-days {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
    gap: 2px;
}

.gantt-day {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    padding: 4px 0;
    background: #edf3f7;
    border-radius: 2px;
}

.gantt-grid-body {
    display: grid;
    gap: 10px;
}

.gantt-label {
    padding: 10px 12px;
    border-radius: 0;
    background: #f9fbfd;
    border: 1px solid #d6e0ea;
}

.gantt-label-clickable {
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.gantt-label-clickable:hover,
.gantt-label-clickable:focus-visible {
    background: #f2f7ff;
    border-color: #9cb5ff;
    box-shadow: 0 0 0 2px rgba(53, 88, 232, 0.12);
    outline: none;
}

.gantt-item-kind {
    display: inline-block;
    margin-bottom: 4px;
    padding: 2px 6px;
    border: 1px solid #c9d6e1;
    background: #edf3f7;
    color: #4f6d87;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gantt-hierarchy {
    margin: 2px 0;
}

.gantt-row.is-milestone .gantt-label {
    background: #eef4f8;
}

.gantt-row.is-task-list .gantt-label {
    background: #f8fbfd;
}

.gantt-row.is-task .gantt-label {
    background: #ffffff;
    border-left: 4px solid #d6e0ea;
}

.gantt-track {
    position: relative;
    min-height: 58px;
    border-radius: 0;
    background:
        linear-gradient(to right, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
        #f4f8fb;
    background-size: calc(100% / 31) 100%;
    border: 1px solid #d6e0ea;
}

.gantt-bar {
    position: absolute;
    top: 10px;
    height: 38px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 10px 0 12px;
    color: white;
    cursor: grab;
    box-shadow: none;
    user-select: none;
}

.gantt-bar[data-gantt-modal-url] {
    cursor: pointer;
}

.gantt-bar[data-gantt-modal-url]:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: 1px;
}

.gantt-bar.priority-milestone {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.gantt-bar.priority-task-list {
    background: linear-gradient(135deg, #14b8a6, #0f766e);
}

.gantt-bar.priority-low {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.gantt-bar.priority-medium {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.gantt-bar.priority-high {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.gantt-bar.priority-critical {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.gantt-bar-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: bold;
}

.gantt-resize-handle {
    width: 10px;
    height: 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    cursor: ew-resize;
    flex: 0 0 auto;
}

.attachment img {
    display: block;
    max-width: 180px;
    max-height: 140px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}

.workspace-body-plain {
    padding: 12px 0 0;
}

.workspace-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px 0 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.support-block {
    padding: 12px;
    background: #f9fbfd;
    border: 1px solid #d6e0ea;
}

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

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

.expense-budget-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
    padding: 14px;
    border: 1px solid #c8d8e4;
    background: linear-gradient(180deg, #f7fbfe 0%, #eef5fa 100%);
}

.expense-budget-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.expense-summary-board {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
    gap: 14px;
}

.expense-summary-main {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #c8d8e4;
    background: linear-gradient(180deg, #f7fbfe 0%, #edf4f9 100%);
}

.expense-summary-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.expense-summary-total {
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1;
    font-weight: 700;
    color: #123251;
}

.expense-summary-caption {
    color: #5a748d;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

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

.expense-summary-inline > div {
    display: grid;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(18, 50, 81, 0.12);
}

.expense-summary-inline-label,
.expense-kpi-label {
    color: #5a748d;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.expense-kpi-card {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid #d6e0ea;
    background: #fffdf9;
}

.expense-kpi-value {
    font-size: 20px;
    line-height: 1.1;
    color: #123251;
}

.expense-kpi-note {
    color: #6b8398;
    font-size: 12px;
}

.expense-budget-banner {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #d6e0ea;
    background: #f7fafc;
}

.expense-budget-banner strong {
    font-size: 14px;
}

.expense-budget-banner span {
    color: #5f768c;
    font-size: 13px;
}

.expense-budget-banner-ok {
    background: #edf7ef;
    border-color: #b8d4bf;
}

.expense-budget-banner-warning {
    background: #fcf5e6;
    border-color: #dfc186;
}

.expense-budget-banner-danger {
    background: #faefee;
    border-color: #d6a7a2;
}

.project-legacy-shell {
    background: #ffffff;
    color: #082343;
    border-radius: 0;
    border: 1px solid rgba(8, 35, 67, 0.18);
    box-shadow: none;
    padding: 18px 18px 24px;
}

.project-legacy-shell a {
    color: #1e5879;
}

.project-legacy-shell .muted {
    color: #58728b;
}

.project-legacy-shell .page-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #d6e0ea;
}

.project-legacy-shell .page-header h1,
.project-legacy-shell h2,
.project-legacy-shell h3,
.project-legacy-shell strong,
.project-legacy-shell label {
    color: #082343;
}

.project-legacy-shell .page-header .btn-secondary {
    background: #f2f6f9;
    color: #22405d;
    border-color: #b8c9d8;
}

.project-legacy-shell .btn,
.project-legacy-shell button,
.project-legacy-shell input[type="submit"] {
    border-radius: 2px;
    box-shadow: none;
    background: #e9eff4;
    color: #17324f;
    border-color: #b8c9d8;
}

.project-legacy-shell .btn-danger {
    background: #c74b40;
    border-color: #a43a31;
    color: #fff;
}

.project-legacy-shell .pill {
    background: #eef3f7;
    color: #234460;
    border: 1px solid #c9d6e1;
    border-radius: 2px;
}

.project-legacy-shell .project-summary-panel {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #d6e0ea;
}

.project-legacy-shell .project-summary-description {
    color: #284863;
}

.project-legacy-shell .project-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    padding-top: 4px;
    gap: 0;
    border-bottom: 1px solid #bccddd;
}

.project-legacy-shell .project-tabs a,
.project-legacy-shell .project-tabs button {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    white-space: nowrap;
    margin-right: 2px;
    padding: 8px 12px;
    border-radius: 2px 2px 0 0;
    background: #d7e1e8;
    border: 1px solid #b3c2cc;
    border-bottom-color: #b7c6d0;
    color: #264663;
    position: relative;
    top: 1px;
    font-weight: 600;
    text-decoration: none;
}

.project-legacy-shell .project-tabs a:hover,
.project-legacy-shell .project-tabs a:focus,
.project-legacy-shell .project-tabs button:hover,
.project-legacy-shell .project-tabs button:focus {
    background: #e7edf0;
    border-color: #9eb1bd;
}

.project-legacy-shell .project-tabs a.active,
.project-legacy-shell .project-tabs button.active {
    background: var(--panel);
    border-bottom-color: var(--panel);
    color: #173b5c;
}

body:not(.theme-dark) .project-shell.project-legacy-shell .project-tabs a,
body:not(.theme-dark) .project-shell.project-legacy-shell .project-tabs button {
    color: #264663 !important;
}

body:not(.theme-dark) .project-shell.project-legacy-shell .project-tabs a.active,
body:not(.theme-dark) .project-shell.project-legacy-shell .project-tabs button.active {
    color: #173b5c !important;
}

.project-legacy-shell .workspace-section,
.project-legacy-shell .workspace-section-support,
.project-legacy-shell .workspace-section-planning {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.project-legacy-shell .workspace-section-head {
    padding: 18px 0 8px;
    border-bottom: 1px solid #d6e0ea;
}

.project-legacy-shell .workspace-section-head strong {
    font-size: 20px;
    font-weight: 700;
}

.project-legacy-shell .planning-tools {
    padding-top: 0;
    padding-left: 18px;
    border-top: 0;
    border-left: 1px solid #d6e0ea;
}

.project-legacy-shell .kanban-board {
    display: grid;
    overflow: visible;
    padding-bottom: 0;
}

.project-legacy-shell .kanban-column {
    display: grid;
    min-height: 0;
    margin-bottom: 16px;
    padding: 0;
    border-radius: 0;
    background: #ffffff;
    border: 1px solid #c7d5e0;
}

.project-legacy-shell .kanban-column-header {
    padding: 8px 10px;
    background: #2f5877;
    color: #fff;
    align-items: center;
}

.project-legacy-shell .kanban-column-header strong,
.project-legacy-shell .kanban-column-header .muted,
.project-legacy-shell .kanban-column-header a {
    color: #fff;
}

.project-legacy-shell .kanban-column-actions {
    padding: 6px 10px 7px;
    border-bottom: 1px solid #d6e0ea;
    background: #f4f8fb;
}

.project-legacy-shell .kanban-column-description {
    padding: 8px 10px 0;
}

.project-legacy-shell .mini-card {
    padding: 8px 10px;
    border-radius: 0;
    border: 1px solid #d6e0ea;
    background: #f8fbfd;
}

.project-legacy-shell .task-stack {
    gap: 0;
    margin-top: 0;
    padding-left: 18px;
    border-left: 2px solid #dce5ed;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.project-legacy-shell .task-item {
    padding: 8px 10px;
    border-radius: 0;
    background: #fff;
    border: 0;
    border-top: 1px solid #e1e8ef;
    border-left: 3px solid #d6e0ea;
}

.project-legacy-shell .task-stack .task-item:first-child {
    border-top: 0;
}

.project-legacy-shell .project-progress-bar {
    max-width: 420px;
}

.project-legacy-shell .task-item-links a,
.project-legacy-shell .kanban-column-actions a,
.project-legacy-shell .milestone-card-actions a {
    color: #58728b;
}

.project-legacy-shell .task-item-links a:hover,
.project-legacy-shell .kanban-column-actions a:hover,
.project-legacy-shell .milestone-card-actions a:hover {
    color: #264663;
}

.project-legacy-shell .milestone-card,
.project-legacy-shell .task-list-block {
    box-shadow: none;
}

.deliverable-link-row {
    margin-top: 10px;
}

.deliverables-board {
    display: grid;
    gap: 16px;
    padding: 16px;
    border: 1px solid #cfdae5;
    background: linear-gradient(180deg, #fbfdff 0%, #f1f7fb 100%);
}

.deliverables-board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d6e0ea;
}

.deliverables-board-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.deliverable-category-group {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #d6e0ea;
    background: #fff;
    box-shadow: 0 8px 24px rgba(18, 50, 81, 0.06);
}

.deliverable-category-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 0;
    border-bottom: 0;
    cursor: pointer;
    list-style: none;
}

.deliverable-category-head::-webkit-details-marker {
    display: none;
}

.deliverable-category-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 10px;
    align-items: start;
}

.deliverable-category-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.deliverable-category-stack {
    gap: 8px;
}

.deliverable-card {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #dbe5ee;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.deliverable-card-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.deliverable-card-main {
    display: grid;
    gap: 6px;
}

.deliverable-card .mini-card-header strong {
    font-size: 15px;
    color: #123251;
}

.deliverable-card .mini-card-header {
    margin-bottom: 0;
}

.deliverable-card-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #58728d;
}

.deliverable-card-description {
    font-size: 13px;
    line-height: 1.45;
}

.deliverable-file-links {
    gap: 6px;
}

.deliverable-file-link-item {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    padding: 8px 10px;
    border: 1px solid #dbe5ee;
    background: #ffffff;
}

.deliverable-drag-handle {
    min-width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #c9d7e3;
    background: #eef5fb;
    color: #35526d;
    cursor: grab;
    font-weight: 700;
    letter-spacing: 1px;
}

.deliverable-group-drag-handle {
    min-width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #c9d7e3;
    background: #eef5fb;
    color: #35526d;
    cursor: grab;
    font-weight: 700;
    letter-spacing: 1px;
}

.deliverable-category-group.is-dragging {
    opacity: 0.7;
    border-color: #8fb2cf;
    background: #edf6fd;
}

.deliverable-card.is-dragging {
    opacity: 0.55;
    border-color: #8fb2cf;
    background: #edf6fd;
}

.deliverable-category-inline-form {
    display: grid;
    grid-template-columns: minmax(150px, 220px) auto minmax(0, 1fr);
    gap: 8px;
    align-items: end;
    margin-top: 2px;
    padding: 8px 10px;
    border: 1px solid #dbe5ee;
    background: #f7fbff;
}

.deliverable-category-inline-form label {
    grid-column: 1 / 2;
    margin-bottom: -2px;
}

.deliverable-category-inline-form button {
    white-space: nowrap;
}

.deliverable-edit-box {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed #c8d8e4;
}

.deliverable-edit-box summary {
    cursor: pointer;
    color: #123251;
    font-weight: 600;
}

.deliverable-edit-form {
    margin-top: 10px;
}

.deliverable-edit-actions {
    display: flex;
    justify-content: flex-end;
}

.deliverable-group-status {
    min-height: 16px;
    font-size: 12px;
}

.text-danger {
    color: #9f2f2f;
}

.project-legacy-shell .task-item-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.project-legacy-shell .task-item-links a {
    color: #5b7490;
}

.project-legacy-shell .workspace-subsection,
.project-legacy-shell .entity-card {
    border-radius: 0;
    border: 1px solid #d6e0ea;
    background: #f9fbfd;
}

.project-legacy-shell .workspace-subsection > summary,
.project-legacy-shell .entity-card > summary {
    padding: 10px 12px;
}

.project-legacy-shell .workspace-subsection form,
.project-legacy-shell .entity-card-body {
    padding: 10px 12px 12px;
}

.project-legacy-shell .empty-state,
.project-legacy-shell .empty-inline {
    background: #f7fafc;
    color: #4c667f;
    border: 1px dashed #c3d0dc;
    border-radius: 0;
}

.project-legacy-shell input,
.project-legacy-shell select,
.project-legacy-shell textarea {
    background: #fff;
    color: #082343;
    border: 1px solid #b8c9d8;
    border-radius: 2px;
}

body.theme-dark {
    background: #10263b;
    color: #e3edf5;
}

body.theme-dark a {
    color: #9fc3e3;
}

body.theme-dark .topbar {
    background: linear-gradient(180deg, #18344b, #11283b);
    border-bottom-color: #35516a;
}

body.theme-dark .topbar-mobile-toggle span {
    background: #e3edf5;
}

body.theme-dark .topnav {
    border-top-color: #35516a;
}

body.theme-dark .brand,
body.theme-dark .topnav a,
body.theme-dark .topnav-menu summary,
body.theme-dark .section-nav a,
body.theme-dark .section-nav button,
body.theme-dark .gantt-item-kind,
body.theme-dark .pill,
body.theme-dark .pill-status,
body.theme-dark .pill-priority,
body.theme-dark .theme-toggle {
    color: #e3edf5;
}

body.theme-dark .brand-subtitle,
body.theme-dark .topbar-utility-label,
body.theme-dark .user-chip-role,
body.theme-dark .muted,
body.theme-dark .project-callout-label {
    color: #9fb4c7;
}

body.theme-dark .topbar-utility {
    border-color: #38526a;
    background: rgba(23, 50, 74, 0.6);
}

body.theme-dark .app-workspace,
body.theme-dark .card,
body.theme-dark .panel,
body.theme-dark .login-panel,
body.theme-dark .workspace-section,
body.theme-dark .workspace-subsection,
body.theme-dark .entity-card,
body.theme-dark .comment,
body.theme-dark .support-block,
body.theme-dark .timeline-item,
body.theme-dark .gantt-label,
body.theme-dark .mini-card,
body.theme-dark .member-card,
body.theme-dark .member-picker-item,
body.theme-dark .choice-picker-item,
body.theme-dark .project-info-card,
body.theme-dark .project-callout,
body.theme-dark .project-feed-item,
body.theme-dark .kanban-column,
body.theme-dark .attachment,
body.theme-dark .attachment-entry,
body.theme-dark .modal-card {
    background: #12283d;
    border-color: #38526a;
    color: #e3edf5;
}

body.theme-dark .image-lightbox-card {
    background: #102638;
}

body.theme-dark .image-lightbox-caption {
    color: #d3dde6;
}

body.theme-dark .topnav a,
body.theme-dark .topnav-menu summary,
body.theme-dark .section-nav a,
body.theme-dark .section-nav button,
body.theme-dark .workspace-subsection > summary,
body.theme-dark .topnav-menu-panel,
body.theme-dark .theme-toggle,
body.theme-dark .planning-unassigned-card,
body.theme-dark .gantt-day {
    background: #17324a;
    border-color: #38526a;
}

body.theme-dark .member-picker-item:hover,
body.theme-dark .choice-picker-item:hover {
    background: #1b3952;
    border-color: #55738d;
}

body.theme-dark .member-picker-item:has(input[type="checkbox"]:checked),
body.theme-dark .choice-picker-item:has(input[type="checkbox"]:checked) {
    background: #24445f;
    border-color: #6f90ab;
    box-shadow: inset 0 0 0 1px rgba(159, 195, 227, 0.16);
}

body.theme-dark .topnav a.active,
body.theme-dark .topnav a:hover,
body.theme-dark .topnav-menu summary.active,
body.theme-dark .topnav-menu summary:hover,
body.theme-dark .section-nav a:hover,
body.theme-dark .section-nav button:hover {
    background: #22415c;
    border-color: #4a6984;
}

body.theme-dark .section-nav a.active,
body.theme-dark .section-nav button.active {
    background: #12283d;
    border-bottom-color: #12283d;
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select,
body.theme-dark .project-legacy-shell input,
body.theme-dark .project-legacy-shell select,
body.theme-dark .project-legacy-shell textarea {
    background: #10263b;
    color: #e3edf5;
    border-color: #38526a;
}

body.theme-dark .btn,
body.theme-dark button,
body.theme-dark input[type="submit"] {
    background: #17324a;
    color: #e3edf5;
    border-color: #38526a;
}

body.theme-dark .btn-secondary,
body.theme-dark .theme-toggle {
    background: #17324a;
    color: #e3edf5;
    border-color: #38526a;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
    color: #89a0b4;
}

body.theme-dark .btn:hover,
body.theme-dark button:hover,
body.theme-dark input[type="submit"]:hover,
body.theme-dark .theme-toggle:hover {
    background: #22415c;
    border-color: #4a6984;
}

body.theme-dark .kanban-column-header,
body.theme-dark .project-progress-bar span {
    background: #274865;
}

body.theme-dark .kanban-column-actions,
body.theme-dark .project-cluster-head,
body.theme-dark .planning-cluster-head .milestone-card,
body.theme-dark .planning-cluster-toolbar,
body.theme-dark .gantt-track {
    background: #17324a;
}

body.theme-dark .planning-cluster,
body.theme-dark .planning-cluster-body,
body.theme-dark .task-list-body,
body.theme-dark .kanban-task-stack,
body.theme-dark .planning-side-card {
    background: #12283d;
}

body.theme-dark .planning-cluster,
body.theme-dark .planning-cluster-body,
body.theme-dark .kanban-task-stack,
body.theme-dark .planning-side-card,
body.theme-dark .project-legacy-shell .task-stack,
body.theme-dark .project-summary-panel,
body.theme-dark .section-nav,
body.theme-dark .workspace-subsection[open] > summary,
body.theme-dark .entity-card[open] > summary,
body.theme-dark .workspace-section[open] > summary {
    border-color: #38526a;
}

body.theme-dark .planning-cluster-head .milestone-card,
body.theme-dark .planning-unassigned-card {
    background: #1b3851;
}

body.theme-dark .planning-list-stack,
body.theme-dark .task-stack {
    background: transparent;
}

body.theme-dark .kanban-column-header {
    background: #234760;
}

body.theme-dark .kanban-column-meta,
body.theme-dark .milestone-inline-meta {
    color: #c4d5e2;
}

body.theme-dark .empty-inline {
    color: #a9bccd;
    border-top-color: #38526a;
}

body.theme-dark .task-item-links a:hover,
body.theme-dark .kanban-column-actions a:hover,
body.theme-dark .milestone-card-actions a:hover {
    color: #dce8f3;
}

body.theme-dark .app-workspace,
body.theme-dark .panel-soft,
body.theme-dark .empty-state,
body.theme-dark .attachment,
body.theme-dark .comment,
body.theme-dark .flash,
body.theme-dark .errors,
body.theme-dark .topnav-menu-panel,
body.theme-dark .support-form,
body.theme-dark .delete-dependencies,
body.theme-dark .delete-dependency-row {
    border-color: #38526a;
}

body.theme-dark .empty-state,
body.theme-dark .attachment,
body.theme-dark .attachment-entry,
body.theme-dark .panel-soft,
body.theme-dark .topnav-menu-panel,
body.theme-dark .delete-dependencies,
body.theme-dark .delete-dependency-row {
    background: #17324a;
}

body.theme-dark .attachment-entry-preview img {
    border-color: #38526a;
}

body.theme-dark .flash-success {
    background: #173b2b;
    border-color: #3f6c55;
    color: #dcefe5;
}

body.theme-dark .flash-error,
body.theme-dark .errors {
    background: #3a2427;
    border-color: #7b4d52;
    color: #f0d9dc;
}

body.theme-dark .flash-warning {
    background: #3d3321;
    border-color: #7f6840;
    color: #f2e7c8;
}

body.theme-dark table th,
body.theme-dark table td {
    border-bottom-color: #38526a;
}

body.theme-dark table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

body.theme-dark .site-footer {
    color: #b9cad8;
    border-top-color: rgba(159, 180, 199, 0.25);
}

body.theme-dark .site-footer a {
    color: #d9e7f3;
}

body.theme-dark .brand-mark {
    background: #274865;
    border-color: #4a6984;
}

body.theme-dark .project-progress-bar {
    background: #17324a;
    border-color: #38526a;
}

body.theme-dark .progress-meter {
    background: #17324a;
    border-color: #38526a;
}

body.theme-dark .progress-meter span {
    background: #4a88b8;
}

body.theme-dark .pill {
    background: #17324a;
    color: #e3edf5;
    border-color: #38526a;
}

body.theme-dark .hero-panel .pill {
    background: #31506a;
    color: #eaf3fb;
    border-color: #567792;
}

body.theme-dark.login-page {
    background:
        radial-gradient(circle at top right, rgba(83, 141, 188, 0.22), transparent 30%),
        linear-gradient(180deg, #0f2234 0%, #16334b 100%);
}

body.theme-dark .login-panel label,
body.theme-dark .login-title {
    color: #e3edf5;
}

body.theme-dark .pill-status {
    background: #1d3c57;
    border-color: #4b6882;
}

body.theme-dark .pill-status-active {
    background: #1d4b2a;
    color: #d8f2dc;
    border-color: #5d8d69;
}

body.theme-dark .pill-status-paused {
    background: #5a3d12;
    color: #ffe3b4;
    border-color: #a47a39;
}

body.theme-dark .pill-status-completed {
    background: #1a4467;
    color: #d8ebff;
    border-color: #5f88ad;
}

body.theme-dark .pill-status-default {
    background: #1d3c57;
    color: #e3edf5;
    border-color: #4b6882;
}

body.theme-dark .pill-priority {
    background: #26384a;
    border-color: #495d70;
}

body.theme-dark .gantt-row.is-task .gantt-label {
    border-left-color: #4a6984;
}

body.theme-dark .gantt-row.is-milestone .gantt-label,
body.theme-dark .gantt-row.is-task-list .gantt-label,
body.theme-dark .gantt-row.is-task .gantt-label {
    background: #12283d;
    border-color: #38526a;
    color: #e3edf5;
}

body.theme-dark .gantt-row.is-milestone .gantt-label {
    background: #17324a;
}

body.theme-dark .gantt-row.is-task-list .gantt-label {
    background: #163046;
}

body.theme-dark .gantt-item-kind {
    background: #17324a;
    border-color: #38526a;
    color: #cfe0ee;
}

body.theme-dark .gantt-label strong,
body.theme-dark .gantt-label .muted,
body.theme-dark .gantt-label .gantt-hierarchy {
    color: #e3edf5;
}

body.theme-dark .project-legacy-shell .gantt-panel,
body.theme-dark .project-legacy-shell .gantt-grid-body,
body.theme-dark .project-legacy-shell .gantt-grid-header {
    background: #12283d;
}

body.theme-dark .planning-collapse-toggle {
    background: #17324a;
    border-color: #38526a;
    color: #e3edf5;
}

body.theme-dark .planning-collapse-toggle:hover {
    background: #22415c;
    border-color: #4a6984;
}

body.theme-dark .planning-collapse-toggle.is-collapsed {
    background: #22415c;
    border-color: #4a6984;
}

body.theme-dark .section-separator {
    border-top-color: #38526a;
}

body.theme-dark .project-legacy-shell {
    background: #12283d;
    color: #e3edf5;
    border-color: #38526a;
}

body.theme-dark .project-shell.project-legacy-shell,
body.theme-dark .project-shell.project-legacy-shell .project-main.project-legacy-main,
body.theme-dark .project-shell.project-legacy-shell #project.project-dashboard-panel,
body.theme-dark .project-shell.project-legacy-shell .project-summary-panel.project-overview-panel,
body.theme-dark .project-shell.project-legacy-shell .project-dashboard-grid.project-dashboard-overview {
    background: #12283d !important;
    color: #e3edf5 !important;
}

body.theme-dark .project-legacy-shell .project-main,
body.theme-dark .project-legacy-shell .project-dashboard-panel,
body.theme-dark .project-legacy-shell .project-dashboard-overview,
body.theme-dark .project-legacy-shell .project-summary-main,
body.theme-dark .project-legacy-shell .project-facts {
    background: #12283d;
}

body.theme-dark .project-legacy-shell a {
    color: #9fc3e3;
}

body.theme-dark .project-legacy-shell .muted,
body.theme-dark .project-legacy-shell .project-summary-description,
body.theme-dark .project-legacy-shell .kanban-column-actions a,
body.theme-dark .project-legacy-shell .task-item-links a,
body.theme-dark .project-legacy-shell .milestone-card-actions a {
    color: #9fb4c7;
}

body.theme-dark .project-legacy-shell .page-header h1,
body.theme-dark .project-legacy-shell h2,
body.theme-dark .project-legacy-shell h3,
body.theme-dark .project-legacy-shell strong,
body.theme-dark .project-legacy-shell label,
body.theme-dark .project-legacy-shell dt,
body.theme-dark .project-legacy-shell dd {
    color: #e3edf5;
}

body.theme-dark .project-legacy-shell .page-header,
body.theme-dark .project-legacy-shell .workspace-section-head,
body.theme-dark .project-legacy-shell .kanban-column-actions,
body.theme-dark .project-legacy-shell .project-summary-panel,
body.theme-dark .project-legacy-shell .project-tabs,
body.theme-dark .project-legacy-shell .planning-tools,
body.theme-dark .project-legacy-shell .workspace-subsection,
body.theme-dark .project-legacy-shell .entity-card {
    border-color: #38526a;
}

body.theme-dark .project-legacy-shell .page-header .btn-secondary,
body.theme-dark .project-legacy-shell .btn,
body.theme-dark .project-legacy-shell button,
body.theme-dark .project-legacy-shell input[type="submit"] {
    background: #17324a;
    color: #e3edf5;
    border-color: #38526a;
}

body.theme-dark .project-legacy-shell .btn-danger {
    background: #8d3f3a;
    border-color: #aa5a55;
    color: #fff;
}

body.theme-dark .project-legacy-shell .pill {
    background: #17324a;
    color: #e3edf5;
    border-color: #38526a;
}

body.theme-dark .project-legacy-shell .project-tabs a,
body.theme-dark .project-legacy-shell .project-tabs button {
    background: #17324a;
    color: #dfe9f2;
    border-color: #38526a;
    border-bottom-color: #38526a;
}

body.theme-dark .project-legacy-shell .project-tabs a.active,
body.theme-dark .project-legacy-shell .project-tabs button.active {
    background: #12283d;
    border-bottom-color: #12283d;
    color: #ffffff;
}

body.theme-dark .project-legacy-shell .kanban-column,
body.theme-dark .project-legacy-shell .mini-card,
body.theme-dark .project-legacy-shell .task-item,
body.theme-dark .project-legacy-shell .workspace-subsection,
body.theme-dark .project-legacy-shell .entity-card,
body.theme-dark .project-legacy-shell .support-block,
body.theme-dark .project-legacy-shell .project-info-card,
body.theme-dark .project-legacy-shell .project-callout,
body.theme-dark .project-legacy-shell .project-feed-item {
    background: #12283d;
    border-color: #38526a;
}

body.theme-dark .project-legacy-shell .project-info-card {
    background: #17324a;
}

body.theme-dark .project-shell.project-legacy-shell .project-info-card,
body.theme-dark .project-shell.project-legacy-shell .project-callout,
body.theme-dark .project-shell.project-legacy-shell .project-feed-item {
    border-color: #38526a !important;
}

body.theme-dark .project-shell.project-legacy-shell .project-info-card {
    background: #17324a !important;
}

body.theme-dark .project-legacy-shell .project-callout,
body.theme-dark .project-legacy-shell .project-feed-item {
    background: #163046;
}

body.theme-dark .expense-summary-main {
    background: linear-gradient(180deg, #15314a 0%, #10263a 100%);
    border-color: #38526a;
}

body.theme-dark .expense-budget-form-grid {
    background: linear-gradient(180deg, #17324a 0%, #12283d 100%);
    border-color: #38526a;
}

body.theme-dark .expense-summary-total,
body.theme-dark .expense-kpi-value {
    color: #edf4fb;
}

body.theme-dark .expense-summary-caption,
body.theme-dark .expense-summary-inline-label,
body.theme-dark .expense-kpi-label,
body.theme-dark .expense-kpi-note {
    color: #9fb5c8;
}

body.theme-dark .expense-summary-inline > div {
    border-top-color: rgba(159, 181, 200, 0.18);
}

body.theme-dark .expense-kpi-card {
    background: #17324a;
    border-color: #38526a;
}

body.theme-dark .expense-budget-banner {
    background: #163046;
    border-color: #38526a;
}

body.theme-dark .expense-budget-banner span {
    color: #9fb5c8;
}

body.theme-dark .expense-budget-banner-ok {
    background: #153827;
    border-color: #326b49;
}

body.theme-dark .expense-budget-banner-warning {
    background: #3d3118;
    border-color: #85682b;
}

body.theme-dark .expense-budget-banner-danger {
    background: #442323;
    border-color: #8a4a4a;
}

body.theme-dark .project-shell.project-legacy-shell .project-callout,
body.theme-dark .project-shell.project-legacy-shell .project-feed-item {
    background: #163046 !important;
}

body.theme-dark .project-shell.project-legacy-shell .project-tabs,
body.theme-dark .project-shell.project-legacy-shell .project-tabs button,
body.theme-dark .project-shell.project-legacy-shell .project-tabs a {
    background: #17324a !important;
    color: #dfe9f2 !important;
    border-color: #38526a !important;
}

body.theme-dark .project-shell.project-legacy-shell .project-tabs button.active,
body.theme-dark .project-shell.project-legacy-shell .project-tabs a.active {
    background: #12283d !important;
    color: #ffffff !important;
    border-bottom-color: #12283d !important;
}

body.theme-dark .project-legacy-shell .planning-cluster,
body.theme-dark .project-legacy-shell .planning-cluster-body,
body.theme-dark .project-legacy-shell .task-list-body,
body.theme-dark .project-legacy-shell .kanban-task-stack {
    background: #12283d;
}

body.theme-dark .project-legacy-shell .task-item {
    border-top-color: #38526a;
    border-left-color: #4a6984;
}

body.theme-dark .deliverables-board {
    border-color: #3a5066;
    background: linear-gradient(180deg, #153149 0%, #12283c 100%);
}

body.theme-dark .deliverables-board-header {
    border-bottom-color: #38526a;
}

body.theme-dark .deliverable-category-group,
body.theme-dark .deliverable-card {
    border-color: #3b5368;
    background: #163148;
}

body.theme-dark .deliverable-category-inline-form {
    border-color: #3b5368;
    background: #10283c;
}

body.theme-dark .deliverable-file-link-item {
    border-color: #3b5368;
    background: #10283c;
}

body.theme-dark .deliverable-card-meta {
    color: #9fb5c8;
}

body.theme-dark .deliverable-edit-box {
    border-top-color: #3b5368;
}

body.theme-dark .deliverable-edit-box summary,
body.theme-dark .deliverable-card .mini-card-header strong {
    color: #dceaf6;
}

body.theme-dark .deliverable-drag-handle {
    border-color: #466179;
    background: #18324a;
    color: #d8e7f4;
}

body.theme-dark .deliverable-card.is-dragging {
    background: #1a3952;
}

@media (max-width: 960px) {
    .project-summary-panel,
    .project-dashboard-grid,
    .project-info-list,
    .planning-layout,
    .workspace-body,
    .split,
    .stats-hero {
        grid-template-columns: 1fr;
    }

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

    .deliverable-category-inline-form {
        grid-template-columns: 1fr;
    }

    .deliverable-category-inline-form label {
        grid-column: auto;
    }

    .deliverables-board-header {
        display: grid;
    }

    .deliverable-card-top {
        grid-template-columns: 1fr;
    }



    .topbar-mobile-toggle {
        display: inline-flex;
    }

    .topbar-mobile-panel {
        display: none;
        padding-bottom: 10px;
        border-top: 1px solid #cdd8df;
    }

    .topbar.is-mobile-nav-open .topbar-mobile-panel {
        display: block;
    }

    .topbar-actions {
        display: grid;
        gap: 10px;
        justify-content: stretch;
        padding-top: 2px;
    }

    .topbar-utility {
        justify-content: space-between;
        flex-wrap: wrap;
        padding: 8px 10px;
        border: 1px solid #c8d6df;
        background: rgba(255, 255, 255, 0.5);
    }

    .topbar-actions .inline-form,
    .topbar-actions .inline-form button,
    .topbar-logout {
        width: 100%;
    }

    .topnav {
        display: grid;
        gap: 10px;
        align-items: stretch;
        width: 100%;
        padding-top: 10px;
    }

    .topnav-primary {
        display: grid;
        gap: 8px;
        width: 100%;
    }

    .topnav-primary a,
    .topnav-menu summary,
    .topnav-menu-panel a {
        width: 100%;
        margin-right: 0;
        text-align: left;
    }

    .topnav-menu {
        width: 100%;
    }

    .topnav-menu-panel {
        position: static;
        margin-top: 8px;
    }

    .gantt-grid-header,
    .gantt-row {
        grid-template-columns: 1fr;
    }

    .kanban-board {
        grid-auto-columns: minmax(280px, 1fr);
    }

    .expense-summary-board,
    .expense-summary-inline,
    .expense-kpi-grid,
    .expense-budget-form-grid {
        grid-template-columns: 1fr;
    }

    .expense-budget-actions {
        justify-content: flex-start;
    }
}

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

    .topnav {
        gap: 8px;
    }

    .topnav a,
    .topnav-menu summary {
        width: 100%;
        text-align: left;
    }
}
