:root {
    --app-bg: #f4f6fa;
    --app-surface: #ffffff;
    --app-surface-raised: #fbfcff;
    --app-surface-muted: #f1f5f9;
    --app-border: #dce3ed;
    --app-border-strong: #cbd5e1;
    --app-text: #0f172a;
    --app-muted: #64748b;
    --app-accent: #2563eb;
    --app-accent-strong: #1d4ed8;
    --app-accent-cyan: #0891b2;
    --app-accent-green: #0f766e;
    --app-accent-amber: #b45309;
    --app-danger: #dc2626;
    --app-warning: #d97706;
    --app-success: #16a34a;
    --app-radius: 8px;
    --app-shadow-soft: 0 10px 30px rgba(15, 23, 42, .08);
    --app-shadow-tight: 0 6px 18px rgba(15, 23, 42, .06);
    --app-table-density: .64rem .78rem;
}

body {
    background: radial-gradient(circle at 50% -20%, rgba(37, 99, 235, .08), transparent 34rem), var(--app-bg);
    color: var(--app-text);
    font-size: 15px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--app-accent);
}

a:hover {
    color: var(--app-accent-strong);
}

:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .35);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    top: .75rem;
    left: .75rem;
    z-index: 1080;
    transform: translateY(-150%);
    border-radius: 8px;
    background: #fff;
    color: #111827;
    padding: .55rem .8rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .18);
    transition: transform .15s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.app-navbar {
    background: #111827;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
    transition: box-shadow .15s ease;
}

.app-scrolled .app-navbar {
    box-shadow: 0 12px 30px rgba(15, 23, 42, .2);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    min-width: max-content;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    color: #111827;
    font-size: .78rem;
    font-weight: 800;
}

.app-nav {
    gap: .15rem;
}

.app-navbar .nav-link {
    border-radius: 8px;
    padding-left: .75rem;
    padding-right: .75rem;
}

.app-navbar .nav-link.active,
.app-navbar .nav-link.show {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.app-nav-menu {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .45rem;
    min-width: 15rem;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .16);
}

.app-nav-menu .dropdown-item {
    border-radius: 7px;
    padding: .55rem .65rem;
}

.app-nav-menu .dropdown-item.active {
    background: #2563eb;
}

.app-userbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #f9fafb;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e0f2fe;
    color: #075985;
    font-weight: 700;
}

.user-meta {
    min-width: 0;
    display: grid;
    line-height: 1.15;
}

.user-name {
    max-width: 13rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .88rem;
}

.user-role {
    color: rgba(255, 255, 255, .65);
    font-size: .72rem;
}

.app-main {
    max-width: 1680px;
}

.card-soft {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow-tight);
    background: var(--app-surface);
}

.metric {
    height: 100%;
    padding: .9rem 1rem;
    border-radius: var(--app-radius);
    background: linear-gradient(180deg, var(--app-surface), var(--app-surface-raised));
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow-tight);
}

.metric .display-6 {
    font-size: clamp(1.5rem, 2vw, 2.15rem);
    line-height: 1.1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border-radius: 8px;
    white-space: nowrap;
}

.btn-sm {
    border-radius: 7px;
}

.form-control,
.form-select,
.form-check-input,
.input-group-text {
    border-color: var(--app-border-strong);
}

.form-control,
.form-select {
    border-radius: var(--app-radius);
}

.form-label {
    color: #374151;
    font-weight: 600;
    font-size: .84rem;
    margin-bottom: .35rem;
}

.table {
    --bs-table-color: #1f2937;
}

.table thead th {
    white-space: nowrap;
    color: #4b5563;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.table > :not(caption) > * > * {
    padding: var(--app-table-density);
}

.compact-tabs {
    gap: .35rem;
}

.compact-tabs .nav-link {
    border-radius: var(--app-radius);
    color: var(--app-muted);
    font-weight: 600;
    padding: .48rem .75rem;
}

.compact-tabs .nav-link.active {
    background: var(--app-text);
    color: #fff;
}

.stakeholder-360,
.stakeholder-event-panel {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: linear-gradient(180deg, var(--app-surface-raised), #fff);
    padding: 1rem;
}

.stakeholder-event-strip {
    display: grid;
    gap: .5rem;
}

.stakeholder-event-chip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: #fff;
    padding: .55rem .7rem;
}

.stakeholder-impact-form {
    border-top: 1px solid var(--app-border);
    padding-top: .9rem;
}

.management-hint {
    border-left: 3px solid var(--app-warning);
    background: #fff7ed;
    border-radius: var(--app-radius);
    padding: .65rem .8rem;
}

.table-hover tbody tr:hover {
    --bs-table-hover-bg: #f8fafc;
}

.table-responsive {
    border-radius: 8px;
}

.report-cell-link {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
}

.report-cell-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

.app-table {
    min-width: 720px;
}

.badge {
    border-radius: 999px;
    font-weight: 600;
}

.alert {
    border-radius: 8px;
    border-width: 1px;
}

.modal-content {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 20px 56px rgba(15, 23, 42, .24);
}

.nav-pills .nav-link {
    border-radius: 8px;
}

@media (max-width: 991.98px) {
    .app-navbar .navbar-collapse {
        padding-top: .75rem;
    }

    .app-userbar {
        align-items: stretch;
        justify-content: space-between;
        padding: .75rem 0 .25rem;
    }

    .app-nav-menu {
        box-shadow: none;
        border-color: rgba(255, 255, 255, .12);
        background: rgba(255, 255, 255, .04);
    }

    .app-nav-menu .dropdown-item {
        color: rgba(255, 255, 255, .86);
    }

    .app-nav-menu .dropdown-item:hover,
    .app-nav-menu .dropdown-item:focus {
        background: rgba(255, 255, 255, .08);
        color: #fff;
    }

    .user-name {
        max-width: 52vw;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 14px;
    }

    .app-main {
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .card-body.p-4 {
        padding: 1rem !important;
    }

    .card-body.p-5 {
        padding: 1.5rem !important;
    }

    .btn {
        min-height: 2.35rem;
    }

    .d-flex.gap-2.flex-wrap > .btn,
    .d-flex.gap-2.flex-wrap > form {
        flex: 1 1 auto;
    }
}

.project-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 360px;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 1500px) {
    .project-grid {
        grid-template-columns: 270px minmax(0, 1fr);
    }

    .project-grid > .vstack {
        grid-column: 1 / -1;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

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

    .project-grid > .vstack {
        display: flex !important;
    }
}

.mindmap-shell {
    min-width: 0;
    position: relative;
    isolation: isolate;
}

.mindmap-toolbar {
    display: flex;
    gap: .5rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
    align-items: center;
}

.mindmap-toolbar .btn-group {
    flex-wrap: wrap;
    gap: .25rem;
}

.mindmap-toolbar .btn-group > .btn,
.mindmap-toolbar .btn-group > .form-select {
    border-radius: 6px !important;
    margin-left: 0 !important;
}

.mindmap-save-status {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    padding: 0 .75rem;
    font-size: .82rem;
    white-space: nowrap;
}

.mindmap-save-status.is-pending {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.mindmap-save-status.is-saving {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.mindmap-save-status.is-saved {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.mindmap-save-status.is-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.mindmap-selection-count {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    padding: 0 .75rem;
    font-size: .82rem;
    white-space: nowrap;
}

.mindmap-selection-count.is-active {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

#mindmap {
    width: 100%;
    min-height: 560px;
    height: clamp(560px, 72vh, 840px);
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5eaf3;
    overflow: hidden;
}

.mindmap-minimap {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 1rem;
    z-index: 8;
    width: 220px;
    height: 140px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
    cursor: crosshair;
    opacity: .88;
    transform: translateX(-50%);
    transition: opacity .15s ease, transform .15s ease;
}

.mindmap-minimap:hover {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

@media (max-width: 768px) {
    .mindmap-minimap {
        display: none;
    }
}

.mindmap-outline-card,
.sidepanel {
    max-height: calc(clamp(560px, 72vh, 840px) + 3rem);
    overflow: auto;
}

@media (min-width: 1201px) {
    .mindmap-outline-card,
    .sidepanel {
        position: sticky;
        top: 1rem;
    }
}

.mindmap-outline-tree {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.outline-row {
    display: grid;
    grid-template-columns: 1.4rem minmax(0, 1fr) auto auto;
    align-items: center;
    gap: .25rem;
    min-height: 2rem;
    border-radius: 6px;
    padding: .15rem .35rem;
    color: #334155;
    cursor: pointer;
}

.outline-row:hover,
.outline-row.is-selected {
    background: #eef4ff;
    color: #0f172a;
}

.outline-row[draggable="true"] {
    cursor: grab;
}

.outline-row.is-dragging {
    opacity: .55;
}

.outline-row.is-drop-before {
    box-shadow: inset 0 2px 0 #2563eb;
}

.outline-row.is-drop-after {
    box-shadow: inset 0 -2px 0 #2563eb;
}

.outline-row.is-drop-inside {
    background: #dbeafe;
    box-shadow: inset 0 0 0 2px #2563eb;
}

.outline-toggle {
    width: 1.35rem;
    min-height: 1.35rem;
    border: 0;
    background: transparent;
    color: #64748b;
    line-height: 1;
    border-radius: 6px;
}

.outline-toggle:hover {
    background: #dbeafe;
}

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

.outline-status {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: #94a3b8;
}

.outline-status.status-open {
    background: #2563eb;
}

.outline-status.status-in_progress {
    background: #f97316;
}

.outline-status.status-closed {
    background: #16a34a;
}

.outline-actions {
    display: flex;
    gap: .1rem;
    opacity: 0;
    transition: opacity .12s ease;
}

.outline-row:hover .outline-actions,
.outline-row.is-selected .outline-actions {
    opacity: 1;
}

.outline-actions button {
    width: 1.35rem;
    min-height: 1.35rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    line-height: 1;
}

.outline-actions button:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.mindmap-table-view {
    overflow: auto;
    max-height: 52vh;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.mindmap-table-view table {
    table-layout: fixed;
    min-width: 640px;
}

.mindmap-table-view th,
.mindmap-table-view td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mindmap-table-view tbody tr {
    cursor: pointer;
}

.mindmap-table-view tbody tr:hover,
.mindmap-table-view tbody tr.is-selected {
    background: #eff6ff;
}

.mindmap-table-title {
    font-weight: 600;
    color: #0f172a;
}

.mindmap-layout-select {
    width: auto;
    min-width: 118px;
    border-radius: 6px;
}

.node-property-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem .75rem;
    color: #64748b;
    font-size: .85rem;
}

.mindmap-context-menu {
    position: fixed;
    z-index: 1080;
    width: 220px;
    padding: .35rem;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .18);
}

.mindmap-context-menu button {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    border-radius: 6px;
    padding: .45rem .55rem;
    color: #1e293b;
}

.mindmap-context-menu button:hover {
    background: #f1f5f9;
}

.mindmap-presence-row {
    display: grid;
    grid-template-columns: .7rem minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
    min-height: 2.25rem;
}

.mindmap-presence-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .16);
}

.mindmap-inline-editor {
    position: absolute;
    z-index: 20;
    width: min(280px, 80vw);
    border: 1px solid #2563eb;
    border-radius: 6px;
    padding: .35rem .5rem;
    box-shadow: 0 8px 24px rgba(37, 99, 235, .18);
    font: 600 15px Inter, Arial, sans-serif;
}

.mindmap-presentation {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: #0f172a;
    color: #f8fafc;
    display: grid;
    grid-template-rows: 1fr auto;
}

.mindmap-presentation-stage {
    display: grid;
    place-items: center;
    padding: 8vh 10vw;
    text-align: center;
}

.mindmap-presentation-title {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.05;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.mindmap-presentation-meta {
    color: #cbd5e1;
    font-size: 1.05rem;
}

.mindmap-presentation-notes {
    max-width: 760px;
    margin: 1rem auto 0;
    color: #e2e8f0;
    font-size: 1rem;
    line-height: 1.6;
}

.mindmap-presentation-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, .92);
    border-top: 1px solid rgba(226, 232, 240, .18);
}

.mindmap-scenario-editor {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 23, 42, .34);
}

.mindmap-scenario-dialog {
    width: min(880px, calc(100vw - 2rem));
    max-height: min(86vh, 760px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
    overflow: hidden;
}

.mindmap-scenario-header,
.mindmap-scenario-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.mindmap-scenario-footer {
    justify-content: flex-end;
    border-top: 1px solid #e2e8f0;
    border-bottom: 0;
}

.mindmap-scenario-list {
    overflow: auto;
    padding: .75rem;
    background: #f8fafc;
}

.mindmap-scenario-row {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: start;
    padding: .75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.mindmap-scenario-row + .mindmap-scenario-row {
    margin-top: .65rem;
}

.mindmap-scenario-number {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}

.mindmap-scenario-fields {
    display: grid;
    gap: .45rem;
    min-width: 0;
}

.mindmap-scenario-actions {
    display: grid;
    gap: .35rem;
}

.mindmap-scenario-empty {
    padding: 1.25rem;
    color: #64748b;
    text-align: center;
}

@media (max-width: 720px) {
    .mindmap-scenario-row {
        grid-template-columns: 2rem minmax(0, 1fr);
    }

    .mindmap-scenario-actions {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.mindmap-command-palette {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: start center;
    padding-top: 12vh;
    background: rgba(15, 23, 42, .32);
}

.mindmap-command-dialog {
    width: min(560px, calc(100vw - 2rem));
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
    overflow: hidden;
}

.mindmap-command-search {
    width: 100%;
    min-height: 3.1rem;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 1rem;
    font-size: 1rem;
    outline: none;
}

.mindmap-command-list {
    max-height: min(56vh, 440px);
    overflow: auto;
    padding: .35rem;
}

.mindmap-command-item {
    width: 100%;
    min-height: 2.55rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #1e293b;
    padding: .45rem .65rem;
    text-align: left;
}

.mindmap-command-item.is-active,
.mindmap-command-item:hover {
    background: #eef4ff;
}

.mindmap-command-item:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.mindmap-command-item kbd {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    box-shadow: none;
    font-size: .75rem;
}

.mindmap-command-empty {
    padding: .85rem;
    color: #64748b;
}

.global-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1rem;
}

@media (max-width: 992px) {
    .global-map-layout {
        grid-template-columns: 1fr;
    }
}

#globalMindmap {
    width: 100%;
    min-height: 74vh;
    height: 74vh;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5eaf3;
}

.global-sidepanel {
    max-height: calc(74vh + 2.5rem);
    overflow: auto;
}

.global-legend-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .55rem;
    font-size: .9rem;
}

.global-legend-grid span {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #334155;
}

.global-legend-grid i {
    display: inline-block;
    width: .85rem;
    height: .85rem;
    border: 2px solid;
    border-radius: 4px;
    flex: 0 0 auto;
}

.global-edge-sample {
    display: inline-block;
    width: 1.5rem;
    height: 0;
    border-top: 2px solid #64748b;
    flex: 0 0 auto;
}

.global-edge-sample-dashed {
    border-top-style: dashed;
    border-top-color: #dc2626;
}

.global-detail-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: .35rem;
    color: #475569;
    font-size: .88rem;
}

.global-neighbor-list {
    display: grid;
    gap: .45rem;
}

.global-neighbor-item {
    width: 100%;
    display: grid;
    gap: .15rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    padding: .55rem .65rem;
    text-align: left;
}

.global-neighbor-item:hover {
    background: #f8fafc;
    border-color: #bfdbfe;
}

.global-neighbor-title {
    font-weight: 700;
    line-height: 1.25;
}

.global-neighbor-meta {
    color: #64748b;
    font-size: .78rem;
}

.calendar-shell {
    overflow-x: auto;
}

.calendar-grid {
    min-width: 980px;
    display: grid;
    grid-template-columns: repeat(7, minmax(140px, 1fr));
}

.calendar-weekdays > div {
    padding: .6rem .75rem;
    background: #f8fafc;
    border: 1px solid #e5eaf3;
    border-bottom: 0;
    font-weight: 600;
    color: #475569;
}

.calendar-day {
    min-height: 142px;
    border: 1px solid #e5eaf3;
    background: #fff;
    padding: .65rem;
}

.calendar-day-muted {
    background: #f8fafc;
    color: #94a3b8;
}

.calendar-day-today {
    box-shadow: inset 0 0 0 2px #2563eb;
}

.calendar-day-number {
    font-size: .8rem;
    color: #64748b;
    margin-bottom: .45rem;
}

.calendar-event {
    display: block;
    border-radius: 8px;
    padding: .35rem .45rem;
    font-size: .78rem;
    line-height: 1.2;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-list-item {
    display: grid;
    grid-template-columns: 110px minmax(180px, 1fr) 2fr;
    gap: .75rem;
    align-items: center;
    border: 1px solid #e5eaf3;
    border-radius: 8px;
    padding: .75rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

@media (max-width: 768px) {
    .calendar-list-item {
        grid-template-columns: 1fr;
        align-items: start;
    }
}

.resource-load-bar {
    min-width: 160px;
    height: .65rem;
}

.resource-assignment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid #e5eaf3;
    border-radius: 8px;
    background: #fff;
    padding: .8rem 1rem;
}

.workflow-steps {
    display: grid;
    gap: .6rem;
}

.workflow-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid #e5eaf3;
    border-radius: 8px;
    background: #fff;
    padding: .75rem .9rem;
}

.workflow-step-active {
    border-color: #93c5fd;
    background: #f8fbff;
}

.workflow-step-done {
    opacity: .72;
}

.workflow-step-rejected {
    border-color: #fecaca;
    background: #fff7f7;
}

.notification-unread {
    border: 1px solid #fde68a;
    box-shadow: 0 10px 30px rgba(202, 138, 4, 0.12);
}

.scrum-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 1rem;
}

@media (max-width: 1200px) {
    .scrum-board {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .scrum-board {
        grid-template-columns: 1fr;
    }
}

.sprint-progress {
    height: 1.2rem;
}

.scrum-backlog-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid #e5eaf3;
    border-radius: 8px;
    background: #fff;
    padding: .8rem 1rem;
}

.risk-card {
    border: 1px solid #e5eaf3;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
}

.risk-card-success { border-color: #bbf7d0; background: #f7fff9; }
.risk-card-primary { border-color: #bfdbfe; background: #f8fbff; }
.risk-card-warning { border-color: #fde68a; background: #fffdf4; }
.risk-card-danger { border-color: #fecaca; background: #fff7f7; }

.sidepanel {
    max-height: 72vh;
    overflow: auto;
}

.node-meta {
    font-size: .875rem;
    color: #6b7280;
}

.login-shell {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mfa-qr-panel {
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
    min-height: 18rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.mfa-qr-svg {
    display: block;
    width: min(100%, 18rem);
    height: auto;
}

.mfa-secret-box,
.mfa-uri-box {
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
}

.mfa-secret-value {
    display: block;
    color: #111827;
    font-size: 1rem;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    user-select: all;
}

.mfa-uri-box summary {
    cursor: pointer;
    color: #374151;
    font-weight: 600;
}

.mfa-code-input {
    font-size: 1.5rem;
    letter-spacing: .25rem;
}

.mfa-recovery-codes {
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: .95rem;
    line-height: 1.65;
    padding: .85rem 1rem;
    white-space: pre-wrap;
}

.attachment-item + .attachment-item {
    border-top: 1px solid #edf0f5;
}

.project-tabs .nav-link {
    color: #334155;
    border-radius: 8px;
}

.project-tabs .nav-link.active {
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 1rem;
}

@media (max-width: 1200px) {
    .kanban-board {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

.kanban-column {
    background: #eef3ff;
    border: 1px solid #dde7fb;
    border-radius: 8px;
    padding: 1rem;
}

.kanban-card {
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e7ecf6;
    padding: 1rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.timeline-list {
    position: relative;
    margin-left: 0.5rem;
    padding-left: 1.5rem;
}

.timeline-list::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0.35rem;
    width: 2px;
    background: #d8e3f8;
}

.timeline-item {
    position: relative;
    padding-bottom: 1rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0.35rem;
    left: -1.23rem;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #2563eb;
}

.document-version {
    border-left: 3px solid #dbeafe;
    padding-left: 0.75rem;
}

.table thead th {
    white-space: nowrap;
}

.sticker-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.sticker {
    border-radius: 8px;
    padding: .65rem .8rem;
    border: 1px solid transparent;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
    min-width: 140px;
}

.sticker-title {
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .2rem;
}

.sticker-meta {
    font-size: .78rem;
    color: #475569;
}

.sticker-green { background: #ecfdf5; border-color: #86efac; }
.sticker-yellow { background: #fffbeb; border-color: #fcd34d; }
.sticker-orange { background: #fff7ed; border-color: #fb923c; }
.sticker-red { background: #fef2f2; border-color: #f87171; }
.sticker-blue { background: #eff6ff; border-color: #93c5fd; }

.dot {
    width: .8rem;
    height: .8rem;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
}

.dot-green { background: #22c55e; }
.dot-yellow { background: #eab308; }
.dot-orange { background: #f97316; }
.dot-red { background: #ef4444; }
.dot-blue { background: #2563eb; }

.problem-card {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 1rem;
}

.problem-card + .problem-card {
    margin-top: .75rem;
}

.task-tabs .nav-link {
    border-radius: 8px;
}

.gantt-shell {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.gantt-grid {
    min-width: 980px;
}

.gantt-insight-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5eaf3;
    border-radius: 8px;
    background: #f8fafc;
}

.gantt-header,
.gantt-row {
    display: grid;
    grid-template-columns: 320px repeat(var(--days), minmax(32px, 1fr));
}

.gantt-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
}

.gantt-header > div,
.gantt-row > div {
    border-right: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
    min-height: 44px;
    padding: .5rem;
}

.gantt-task-cell {
    background: #fff;
    position: sticky;
    left: 0;
    z-index: 1;
}

.gantt-row:nth-child(odd) .gantt-task-cell { background: #fcfdff; }
.gantt-row:nth-child(odd) .gantt-bar-cell { background: #fcfdff; }

.gantt-bar-cell {
    position: relative;
    grid-column: 2 / span var(--days);
    padding: 0;
    background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(100% / var(--days) - 1px), #f1f5f9 calc(100% / var(--days) - 1px), #f1f5f9 calc(100% / var(--days)));
}

.gantt-bar {
    position: absolute;
    top: 8px;
    height: 28px;
    border-radius: 999px;
    color: #fff;
    font-size: .8rem;
    display: flex;
    align-items: center;
    padding: 0 .65rem;
    overflow: hidden;
    white-space: nowrap;
}

.bar-low { background: #22c55e; }
.bar-medium { background: #3b82f6; }
.bar-high { background: #f97316; }
.bar-critical { background: #ef4444; }
.gantt-bar.is-critical-path {
    outline: 3px solid rgba(185, 28, 28, .28);
    box-shadow: 0 0 0 1px rgba(127, 29, 29, .24), 0 8px 16px rgba(127, 29, 29, .16);
}

.gantt-bar-summary {
    height: 18px;
    top: 6px;
    border-radius: 8px;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, .96), rgba(37, 99, 235, .92));
    letter-spacing: 0;
}

.gantt-bar.is-derived-schedule {
    border: 2px dashed rgba(15, 23, 42, .45);
    background-clip: padding-box;
}

.subtask-label {
    padding-left: 1.25rem;
}

.task-tree-toggle {
    width: 1.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    line-height: 1;
    text-decoration: none;
}

.task-tree-spacer {
    width: 1.25rem;
    min-width: 1.25rem;
    display: inline-block;
}

tr.is-task-collapsed {
    display: none;
}

@media (max-width: 991.98px) {
    .gantt-insight-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .gantt-insight-strip {
        grid-template-columns: 1fr;
    }
}

.messenger-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1rem;
}

@media (max-width: 992px) {
    .messenger-layout {
        grid-template-columns: 1fr;
    }
}

.conversation-list {
    max-height: calc(100vh - 180px);
    overflow: auto;
}

.conversation-item {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .9rem 1rem;
    background: #fff;
    text-decoration: none;
    color: inherit;
}

.conversation-item.active {
    border-color: #3b82f6;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.12);
}

.message-thread {
    max-height: calc(100vh - 290px);
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.message-bubble {
    max-width: 75%;
    border-radius: 8px;
    padding: .75rem 1rem;
    background: #eef2ff;
    border: 1px solid #dbe4ff;
}

.message-bubble.mine {
    align-self: flex-end;
    background: #dbeafe;
    border-color: #93c5fd;
}

.message-bubble.other {
    align-self: flex-start;
    background: #fff;
    border-color: #e5e7eb;
}

.message-meta {
    font-size: .75rem;
    color: #64748b;
    margin-bottom: .25rem;
}

.edge-chip {
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: .4rem .7rem;
    background: #fff;
    font-size: .85rem;
}

.edge-chip-expanded {
    border-radius: 12px;
    width: 100%;
}

.edge-comment-list {
    display: grid;
    gap: .25rem;
    color: #334155;
    line-height: 1.35;
}

.edge-comment-item,
.map-comment-item {
    border-left: 2px solid #cbd5e1;
    padding-left: .5rem;
}

.node-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}

@media (max-width: 576px) {
    .node-action-grid {
        grid-template-columns: 1fr;
    }
}

.hierarchy-label {
    display: inline-flex;
    align-items: center;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    margin-bottom: .25rem;
}

.hierarchy-card {
    border: 1px solid #e8eef9;
}

.hierarchy-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

.quick-access-card {
    background: linear-gradient(135deg, #ffffff, #f7faff);
    border: 1px solid #e7eef9;
}

.quick-access-tile {
    height: 100%;
    border: 1px solid #e6ebf4;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.quick-access-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    color: #64748b;
    background: #fff;
}

.quick-access-project-summary {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

.meetings-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1rem;
}

@media (max-width: 992px) {
    .meetings-layout {
        grid-template-columns: 1fr;
    }
}

.meeting-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-height: calc(100vh - 260px);
    overflow: auto;
}

.meeting-item {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .9rem 1rem;
    background: #fff;
}

.meeting-item.active {
    border-color: #3b82f6;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.12);
}

.memo-box {
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: .9rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    max-height: 70vh;
    overflow: auto;
}

.suggestion-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
}

.suggestion-card.approved {
    border-color: #93c5fd;
    background: #f8fbff;
}

.suggestion-card.applied {
    border-color: #86efac;
    background: #f7fff9;
}

.suggestion-card.rejected {
    opacity: .76;
    background: #f8fafc;
}

.evidence-box {
    border-left: 3px solid #c7d2fe;
    background: #f8fafc;
    padding: .65rem .8rem;
    border-radius: 8px;
}

.min-w-0 {
    min-width: 0;
}

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.knowledge-card {
    min-height: 260px;
}

.knowledge-preview {
    white-space: pre-wrap;
    max-height: 12rem;
    overflow: hidden;
}

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

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

.priority-quadrant {
    min-height: 360px;
}

.priority-do {
    border-top: 4px solid #ef4444;
}

.priority-plan {
    border-top: 4px solid #2563eb;
}

.priority-delegate {
    border-top: 4px solid #f59e0b;
}

.priority-later {
    border-top: 4px solid #64748b;
}

.matrix-task {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    padding: .85rem;
}

/* v1.6.1 visible premium UI layer: enterprise command center */
:root {
    --app-bg: #eef2f6;
    --app-surface: #ffffff;
    --app-surface-raised: #f8fafc;
    --app-surface-muted: #edf2f7;
    --app-shell: #07111f;
    --app-shell-2: #101b2c;
    --app-border: #d6dee9;
    --app-border-strong: #b8c4d4;
    --app-text: #111827;
    --app-muted: #5f6f85;
    --app-accent: #0e7490;
    --app-accent-strong: #155e75;
    --app-accent-cyan: #0891b2;
    --app-accent-green: #047857;
    --app-accent-amber: #b45309;
    --app-danger: #b91c1c;
    --app-warning: #b45309;
    --app-success: #047857;
    --app-radius: 8px;
    --app-shadow-soft: 0 18px 45px rgba(15, 23, 42, .12);
    --app-shadow-tight: 0 10px 24px rgba(15, 23, 42, .08);
    --app-table-density: .58rem .72rem;
}

html {
    background: var(--app-bg);
}

body {
    background:
        linear-gradient(180deg, #dfe7f1 0, #eef2f6 18rem, #f7f9fc 100%),
        var(--app-bg);
    color: var(--app-text);
    font-family: "Segoe UI Variable", "Segoe UI", "Noto Sans", sans-serif;
}

.app-navbar {
    background:
        linear-gradient(90deg, #06101d 0%, #0b1d30 46%, #102c3a 100%) !important;
    border-bottom: 1px solid rgba(148, 163, 184, .22);
    box-shadow: 0 18px 48px rgba(7, 17, 31, .28);
}

.app-navbar .container-fluid {
    max-width: 1840px;
}

.app-brand {
    letter-spacing: 0;
}

.brand-mark {
    background: linear-gradient(135deg, #e6fffb, #67e8f9);
    color: #06202c;
    border: 1px solid rgba(255, 255, 255, .5);
    box-shadow: inset 0 0 0 1px rgba(8, 145, 178, .22), 0 10px 22px rgba(8, 145, 178, .18);
}

.app-navbar .nav-link {
    color: rgba(226, 232, 240, .8);
    font-weight: 650;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.app-navbar .nav-link.active,
.app-navbar .nav-link.show {
    background: rgba(103, 232, 249, .16);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, .24);
}

.app-nav-menu {
    border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}

.app-nav-menu .dropdown-item {
    font-weight: 600;
    color: #1f2937;
}

.app-nav-menu .dropdown-item:hover {
    background: #e6f7fb;
    color: #0e7490;
}

.app-nav-menu .dropdown-item.active {
    background: #0e7490;
    color: #fff;
}

.app-userbar .btn-outline-light {
    border-color: rgba(226, 232, 240, .36);
    color: #e2e8f0;
    background: rgba(255, 255, 255, .04);
}

.user-avatar {
    background: #ccfbf1;
    color: #064e3b;
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, .35);
}

.app-main {
    max-width: 1840px;
    padding-top: 1.35rem !important;
}

#mainContent > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4 {
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem !important;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: var(--app-radius);
    background:
        linear-gradient(135deg, rgba(7, 17, 31, .98), rgba(15, 35, 52, .96) 55%, rgba(14, 116, 144, .9));
    color: #e5eef7;
    padding: 1.05rem 1.2rem;
    box-shadow: var(--app-shadow-soft);
}

#mainContent > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4::after {
    content: '';
    position: absolute;
    inset: auto 1.1rem 0 1.1rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(103, 232, 249, .72), transparent);
}

#mainContent > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4 h1 {
    color: #fff;
    font-weight: 760;
}

#mainContent > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4 .text-secondary {
    color: rgba(226, 232, 240, .72) !important;
}

#mainContent > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4 a:not(.btn) {
    color: #a5f3fc;
}

#mainContent > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4 .btn-outline-secondary,
#mainContent > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4 .btn-outline-primary {
    border-color: rgba(226, 232, 240, .42);
    color: #e2e8f0;
    background: rgba(255, 255, 255, .05);
}

#mainContent > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4 .btn-outline-secondary:hover,
#mainContent > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4 .btn-outline-primary:hover {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.card-soft {
    border: 1px solid var(--app-border);
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    box-shadow: var(--app-shadow-tight);
}

.card-soft > .card-body {
    position: relative;
}

.metric {
    position: relative;
    overflow: hidden;
    border-color: rgba(15, 23, 42, .08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .98));
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.metric::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #0891b2, #047857);
}

.metric .small {
    color: #526277 !important;
    font-weight: 700;
    text-transform: uppercase;
}

.metric .display-6 {
    color: #0f172a;
    font-weight: 780 !important;
}

.btn {
    font-weight: 680;
    border-radius: var(--app-radius);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}

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

.btn-primary {
    border-color: #0e7490;
    background: linear-gradient(180deg, #0891b2, #0e7490);
    box-shadow: 0 10px 22px rgba(14, 116, 144, .2);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: #155e75;
    background: linear-gradient(180deg, #0e7490, #155e75);
    box-shadow: 0 12px 26px rgba(14, 116, 144, .28);
}

.btn-outline-primary {
    border-color: rgba(14, 116, 144, .38);
    color: #0e7490;
    background: #f8fdff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    border-color: #0e7490;
    background: #e6f7fb;
    color: #155e75;
}

.btn-outline-secondary {
    border-color: #c5cfdc;
    color: #334155;
    background: #fff;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    border-color: #8391a5;
    background: #f1f5f9;
    color: #111827;
}

.form-control,
.form-select,
.input-group-text {
    border-color: #c7d2df;
    background-color: #fbfdff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}

.form-control:focus,
.form-select:focus {
    border-color: #0891b2;
    box-shadow: 0 0 0 .2rem rgba(8, 145, 178, .14);
}

.table-responsive {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #f8fafc;
    --bs-table-hover-bg: #eef8fb;
    margin-bottom: 0;
}

.table thead,
.table thead.table-light {
    background: #0f172a;
}

.table thead th,
.table-light th {
    background: #0f172a !important;
    color: #dbeafe !important;
    border-color: rgba(148, 163, 184, .26) !important;
    font-size: .74rem;
    letter-spacing: 0;
}

.table tbody td {
    border-color: #e6edf5;
}

.table tbody tr:hover td {
    background: #eef8fb;
}

.badge.text-bg-light {
    background-color: #f5f8fc !important;
    color: #334155 !important;
    border-color: #d7e0eb !important;
}

.nav-pills .nav-link,
.task-tabs .nav-link,
.project-tabs .nav-link,
.compact-tabs .nav-link {
    border: 1px solid #ccd6e3;
    background: #fff;
    color: #334155;
    font-weight: 720;
}

.nav-pills .nav-link.active,
.task-tabs .nav-link.active,
.project-tabs .nav-link.active,
.compact-tabs .nav-link.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .18);
}

.project-tabs {
    padding: .45rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.alert {
    box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.modal-content {
    border: 1px solid rgba(148, 163, 184, .24);
    box-shadow: 0 26px 72px rgba(15, 23, 42, .34);
}

.modal-header {
    background: #0f172a;
    color: #fff;
    border-bottom: 0;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(1);
}

.modal-footer {
    background: #f8fafc;
}

.mindmap-shell {
    padding: .85rem;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: var(--app-radius);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(15, 35, 52, .96));
    box-shadow: var(--app-shadow-soft);
}

.mindmap-toolbar {
    position: sticky;
    top: 4.2rem;
    z-index: 9;
    margin: 0 0 .85rem;
    padding: .7rem;
    border: 1px solid rgba(203, 213, 225, .18);
    border-radius: var(--app-radius);
    background: rgba(7, 17, 31, .78);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .16);
}

.mindmap-toolbar .btn,
.mindmap-toolbar .form-select {
    min-height: 2.15rem;
}

.mindmap-toolbar .btn-outline-secondary,
.mindmap-toolbar .btn-outline-primary {
    border-color: rgba(203, 213, 225, .28);
    background: rgba(255, 255, 255, .06);
    color: #e2e8f0;
}

.mindmap-toolbar .btn-outline-secondary:hover,
.mindmap-toolbar .btn-outline-primary:hover {
    border-color: rgba(103, 232, 249, .48);
    background: rgba(8, 145, 178, .22);
    color: #fff;
}

.mindmap-toolbar .form-select {
    border-color: rgba(203, 213, 225, .28);
    background-color: #0f172a;
    color: #e2e8f0;
}

#mindmap {
    border: 1px solid rgba(103, 232, 249, .26);
    background:
        linear-gradient(rgba(15, 23, 42, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, .05) 1px, transparent 1px),
        #f7fbff;
    background-size: 28px 28px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), 0 16px 36px rgba(0, 0, 0, .2);
}

.mindmap-minimap {
    border-color: rgba(103, 232, 249, .45);
    background: rgba(15, 23, 42, .9);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .28);
}

.mindmap-save-status,
.mindmap-selection-count {
    border-color: rgba(203, 213, 225, .26);
    background: rgba(255, 255, 255, .08);
    color: #dbeafe;
}

.mindmap-outline-card,
.sidepanel {
    border-color: rgba(14, 116, 144, .18);
}

.mindmap-outline-card .card-body,
.sidepanel .card-body {
    background: linear-gradient(180deg, #fff, #f8fbff);
    border-radius: var(--app-radius);
}

.outline-row {
    border: 1px solid transparent;
}

.outline-row:hover,
.outline-row.is-selected {
    border-color: #a5f3fc;
    background: #ecfeff;
}

.problem-card,
.risk-card,
.kanban-card,
.workflow-step,
.scrum-backlog-row,
.stakeholder-event-panel,
.stakeholder-360 {
    border-color: #d8e3ef;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
}

.problem-card,
.risk-card {
    position: relative;
    overflow: hidden;
}

.problem-card::before,
.risk-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #0e7490;
}

.risk-card-success::before { background: #047857; }
.risk-card-primary::before { background: #0e7490; }
.risk-card-warning::before { background: #b45309; }
.risk-card-danger::before { background: #b91c1c; }

.risk-card-success {
    background: linear-gradient(180deg, #ffffff, #f3fff9);
}

.risk-card-primary {
    background: linear-gradient(180deg, #ffffff, #f2fbff);
}

.risk-card-warning {
    background: linear-gradient(180deg, #ffffff, #fff8ed);
}

.risk-card-danger {
    background: linear-gradient(180deg, #ffffff, #fff2f2);
}

.stakeholder-360 {
    background:
        linear-gradient(180deg, #ffffff, #f6fbfd);
    border-left: 4px solid #0e7490;
}

.stakeholder-event-chip {
    border-color: #cbd8e6;
    background: #fbfdff;
}

.stakeholder-impact-form {
    border-top-color: #d8e3ef;
}

.kanban-column {
    border-color: #ccd8e8;
    background: linear-gradient(180deg, #e9f3fa, #f6f9fc);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.kanban-card {
    border-left: 4px solid #0e7490;
}

.task-tree-toggle {
    color: #0e7490;
    font-weight: 800;
}

tr[data-task-depth="1"] td:first-child {
    background-image: linear-gradient(90deg, rgba(14, 116, 144, .08), transparent 9rem);
}

tr[data-task-depth="2"] td:first-child,
tr[data-task-depth="3"] td:first-child,
tr[data-task-depth="4"] td:first-child {
    background-image: linear-gradient(90deg, rgba(4, 120, 87, .08), transparent 11rem);
}

.gantt-insight-strip {
    border-color: #cbd8e6;
    background:
        linear-gradient(180deg, #f8fbff, #eef6fb);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.gantt-shell {
    border-color: #cbd8e6;
    box-shadow: var(--app-shadow-tight);
}

.gantt-header {
    background: #0f172a;
}

.gantt-header > div {
    background: #0f172a !important;
    color: #dbeafe;
    border-color: rgba(148, 163, 184, .26);
}

.gantt-task-cell {
    background: #ffffff;
    box-shadow: 6px 0 16px rgba(15, 23, 42, .06);
}

.gantt-row:nth-child(odd) .gantt-task-cell,
.gantt-row:nth-child(odd) .gantt-bar-cell {
    background: #f8fbff;
}

.gantt-bar {
    box-shadow: 0 8px 18px rgba(15, 23, 42, .18);
}

.bar-low { background: linear-gradient(90deg, #047857, #10b981); }
.bar-medium { background: linear-gradient(90deg, #0e7490, #38bdf8); }
.bar-high { background: linear-gradient(90deg, #b45309, #f59e0b); }
.bar-critical { background: linear-gradient(90deg, #991b1b, #ef4444); }

.gantt-bar-summary {
    background-image: linear-gradient(90deg, #0f172a, #0e7490);
}

.quick-access-project-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .7rem;
    border: 1px solid #d6dee9;
    border-radius: var(--app-radius);
    background: rgba(255, 255, 255, .76);
    padding: .65rem .85rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.management-hint {
    border-left-color: #b45309;
    background: #fff7ed;
    box-shadow: 0 8px 18px rgba(180, 83, 9, .08);
}

.evidence-box,
.suggestion-card,
.matrix-task {
    box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

@media (max-width: 991.98px) {
    .mindmap-toolbar {
        position: static;
    }

    #mainContent > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4 {
        padding: .95rem;
    }
}
