/* Kanban Cards */
.kanban-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.kanban-card:hover {
    border-color: var(--nri-blue);
    transform: translateY(-2px);
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.kanban-card.card-saving {
    opacity: 0.6;
    cursor: progress;
    background-image: repeating-linear-gradient(
        -45deg,
        var(--card-bg),
        var(--card-bg) 10px,
        var(--swimlane-bg) 10px,
        var(--swimlane-bg) 20px
    );
    animation: saving-progress 1s linear infinite;
}

@keyframes saving-progress {
    from { background-position: 0 0; }
    to { background-position: 28px 0; }
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.card-org-name {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-color-light);
}

.customer-impact-icon {
    margin-left: auto;
    font-size: 1.2rem;
}

.card-body {
    flex-grow: 1;
}

.card-title {
    /* Issue 125 follow-up: the card title is rendered as an <h4>,
       so it inherits Karelia + letter-spacing -0.025em from the
       global h*-rule in colors_and_type.css. The previous
       font-weight:600 forced the browser to synthesise a faux-bold
       — Karelia's real bold cut (Karelia_Bold.woff/.ttf) was
       removed in issue 122 follow-up because Chrome's OTS parser
       rejected the supplied files, so font-weight >=700 currently
       synth-bolds the regular face. Synth-bold + tight tracking
       inside a narrow card column reads as compressed/squished.
       Drop to the brand's heading weight (400) and relax the
       tracking slightly so the title sits comfortably in the
       card width. */
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: -0.005em;
    color: var(--nri-navy);
    margin: 0 0 0.5rem 0;
}

.card-description {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-color-light);
    white-space: pre-wrap;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Canonical brand status pill (issue #112). One selector replaces the
   four legacy palettes (.status-tag / .health-* / .result-tag /
   .outcome-tag / .exec-rag-rectangle). data-status carries the
   semantic state; the palette branches below paint the colour. */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-caption);
    letter-spacing: 0.04em;
    text-transform: none;
}

.status-pill[data-status="approved"],
.status-pill[data-status="done"],
.status-pill[data-status="on-track"],
.status-pill[data-status="green"] {
    background-color: var(--nri-green);
    color: var(--nri-navy);
}

.status-pill[data-status="warning"],
.status-pill[data-status="yellow"],
.status-pill[data-status="saving"] {
    background-color: var(--nri-yellow);
    color: var(--nri-blue);
}

.status-pill[data-status="rejected"],
.status-pill[data-status="rejected-concept"],
.status-pill[data-status="rejected-quality"],
.status-pill[data-status="red"],
.status-pill[data-status="error"],
.status-pill[data-status="danger"] {
    background-color: var(--nri-red);
    color: var(--nri-white);
}

.status-pill[data-status="proposed"],
.status-pill[data-status="in-progress"],
.status-pill[data-status="info"] {
    background-color: var(--nri-blue-3-25);
    color: var(--nri-navy);
}

/* Absolute-positioned variant for the kanban-card "outcome" badge that
   used to live as .outcome-tag in the card's top-right corner. */
.status-pill--card-corner {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
}

.kanban-card {
    position: relative;
}

.card-footer-details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-size: 0.7rem;
    color: var(--text-color-light);
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    margin-top: auto;
    gap: 0.45rem;
}

.card-footer-details > div {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    width: 100%;
    gap: 0.4rem;
}

.card-footer-details .meta-label {
    flex: 0 0 auto;
    color: var(--text-color-muted);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.card-footer-details .meta-value {
    flex: 1 1 auto;
    color: var(--text-color-light);
    font-size: 0.72rem;
    font-weight: 500;
    min-width: 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-footer-details--compact {
    gap: 0.35rem;
}

/* Badges */
.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-blue {
    background-color: var(--badge-blue-bg);
    color: var(--badge-blue-text);
}

.kanban-title {
    /* Issue 125: column header label — small-caps Karelia, navy,
       tracked. Replaces the previous unstyled span (which inherited
       body type and read as a plain title). Together with the 1px
       hairline beneath the header, this gives each column a
       defined identity without needing a tinted body. */
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--nri-navy);
}

.kanban-count {
    /* Pinned by issue #112 to share the brand pill palette
       (test_kanban_count_uses_nri_pill_palette). Issue 125 left
       this shape intact — the visual-hierarchy fix targets the
       swimlane / column tints rather than the count chip. */
    background-color: var(--nri-blue-3-25);
    color: var(--nri-navy);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.allocated-budget-tag {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    background-color: var(--swimlane-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.strategic-solution-card {
    border-left: 4px solid var(--nri-blue);
}

.type-tag {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--nri-blue);
    background: var(--nri-blue-3-25);
    padding: 2px 6px;
    border-radius: 999px;
}

.budget-rollup {
    margin-top: 1rem;
}

.budget-bar {
    height: 8px;
    background-color: var(--swimlane-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.budget-fill {
    height: 100%;
    background-color: var(--nri-green);
    transition: width 0.3s ease;
}

.budget-text {
    font-size: 0.75rem;
    color: var(--text-color-light);
    font-weight: 500;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5vh;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: 0;
    width: 90%;
    max-width: 900px; /* Increased from 600px */
    animation: slide-down 0.3s ease-out;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-body.two-columns,
.edit-top-layout.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.modal-body.two-columns .form-left-col,
.edit-top-layout.two-columns .form-left-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-body.two-columns .form-right-col,
.edit-top-layout.two-columns .form-right-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Delete Overlay */
.delete-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    animation: fadeIn 0.2s ease-out;
}

.delete-content {
    text-align: center;
    padding: 2rem;
}

.delete-content p {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--text-color) !important;
}

.delete-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#approve-reject-controls.highlight-gate {
    border: 2px solid var(--primary-color) !important;
    background-color: rgba(0, 122, 255, 0.05) !important;
    animation: pulse-highlight 2s infinite;
}

@keyframes pulse-highlight {
    0% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 122, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0); }
}

/* Detail Toggle */
.detail-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-toggle {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
}

.detail-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--nav-text);
    transition: all 0.2s ease;
}

.detail-btn.active {
    background-color: var(--primary-color);
    color: #fff;
}

.detail-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

@keyframes slide-down {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Full-screen modals */
.modal-overlay.full-screen .modal-content {
    max-width: 95vw;
    width: 95vw;
    height: 90vh; /* Consistent size, not max-height */
    margin-bottom: 5vh; /* Ensure some space at the bottom */
    display: flex;
    flex-direction: column;
}

.modal-overlay.full-screen .modal-body {
    flex: 1;
    overflow-y: auto; /* Single scrollbar for the entire content */
    padding: 2rem;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-color-light);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-color);
    background-color: var(--btn-ghost-hover-bg);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.tab-pane.active {
    display: block;
}

#strategic-solution-financials {
    display: none;
    margin-top: 1rem;
}

.edit-top-layout {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column */
    gap: 2rem;
    align-items: start;
}

/* When in full-screen (StrategicSolution entity edit), we force the layout to occupy only the left half */
.modal-overlay.full-screen .edit-top-layout,
.modal-overlay.full-screen .strat-financial-content {
    grid-template-columns: 1fr 1fr; /* 50% left, 50% right */
}

/* If Approve/Reject is shown, it goes to the right column of edit-top-layout */
.edit-top-layout.two-columns {
    grid-template-columns: 1fr 1fr;
}

.modal-overlay.full-screen .edit-top-layout .form-left-col,
.modal-overlay.full-screen .strat-financial-content .sub-initiatives-table-column {
    grid-column: 1;
    max-width: 800px; /* Keep form elements and tables from stretching too wide */
}

.modal-overlay.full-screen .edit-top-layout .form-right-col,
.modal-overlay.full-screen .strat-financial-content .strat-other-content {
    grid-column: 2;
}

/* Financial Summary Frame (StrategicSolution entity full-screen edit) */
.financial-summary-frame {
    display: grid;
    grid-template-columns: 320px 1fr; /* Slightly narrower for compactness */
    gap: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 0;
    margin-bottom: 2rem;
    align-items: start;
    max-width: 1200px; /* Don't stretch infinitely on huge screens */
}

.financial-summary-data {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.financial-summary-chart {
    flex: 2;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    max-height: 400px;
    position: relative;
}

.financial-summary-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.financial-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.financial-info-label {
    color: var(--text-color);
    opacity: 0.8;
}

.financial-info-value {
    font-weight: 600;
    color: var(--text-color);
}

@media (max-width: 1024px) {
    .financial-summary-frame {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .financial-summary-chart {
        flex-direction: column;
        max-height: none;
        padding-left: 0;
    }
}

/* Sub-initiatives Table Styling */
.sub-initiatives-table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 0;
    max-width: 1200px; /* Compact table view */
}

.sub-initiatives-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem; /* Smaller font for better layout in modal */
}

.sub-initiatives-table th {
    background-color: var(--swimlane-bg);
    color: var(--text-color);
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    white-space: nowrap;
}

.sub-initiatives-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color) !important;
}

.sub-initiatives-table td strong {
    color: var(--text-color) !important;
}

.sub-initiatives-table tr:hover {
    background-color: var(--nav-active-bg);
}

.sub-initiatives-footer {
    background-color: var(--nav-active-bg) !important;
}

.sub-initiatives-footer td {
    border-top: 2px solid var(--border-color);
    font-weight: bold !important;
    color: var(--text-color) !important;
    opacity: 1 !important; /* Ensure full visibility */
}

.sub-initiatives-footer td strong {
    color: var(--text-color) !important; /* Force text color for totals */
    opacity: 1 !important;
}

.amount-cell {
    text-align: right;
}

.investment-category-name {
    color: var(--primary-color);
}

.strat-financial-content {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Changed to 50% 50% */
    gap: 1.5rem;
    margin-top: 2rem;
}

.sub-initiatives-table-column {
    min-width: 0; /* Allow shrinking in grid */
}

@media (max-width: 1024px) {
    .strat-financial-content {
        grid-template-columns: 1fr;
    }
}

.type-tag {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.type-capex {
    background-color: var(--badge-blue-bg, #e3f2fd);
    color: var(--badge-blue-text, #1976d2);
}

.type-opex {
    background-color: var(--nav-active-bg, #f3e5f5);
    color: var(--text-color, #7b1fa2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--swimlane-bg);
}

.modal-footer .actions {
    display: flex;
    gap: 0.5rem;
}

.modal-footer--end { justify-content: flex-end; }

/* Issue #118 — section header inside a modal body (h3 + action row).
   Distinct from .page-header (top-of-page) and .modal-footer. */
.modal-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-section-header h3,
.modal-section-header h4 {
    margin: 0;
}

/* Issue #118 — promoted from edit_modal.html / propose_modal.html /
   benefit_modal.html / admin_salesforce.html inline layout one-offs. */

.search-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-results-list--scroll {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.chart-summary-info {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--nav-active-bg);
    border-radius: 4px;
}

.chart-summary-info-text { font-weight: bold; }

.findings-section { margin-top: 2rem; }
.findings-section h3 { margin-bottom: 1rem; }
.findings-empty {
    color: var(--text-color-muted);
    font-style: italic;
}

.financial-info-row--divider {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
}

.financial-info-value--upper {
    font-weight: bold;
    text-transform: uppercase;
}

.benefits-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.financial-roll-up-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.benefits-chart-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.5rem;
    height: 400px;
    position: relative;
}

.benefits-list-container { margin-top: 2rem; }

.spend-trend-chart-container {
    flex: 1;
    min-height: 360px;
    min-width: 0;
    position: relative;
}

.search-initiatives-container {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.strat-financial-year-label {
    margin-top: -1rem;
    margin-bottom: 1rem;
    color: var(--text-color-muted);
    font-size: 0.9rem;
}

.col-icon-cell { width: 50px; }

.propose-category-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.init-owning-org-select { max-width: 250px; }

.init-strategic-solution-container {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.auto-save-indicator {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-left: auto;
    margin-right: 1rem;
}

.admin-data-card { background-color: var(--card-bg); }

.admin-table-empty {
    padding: 2rem;
    opacity: 0.5;
}

.icon-leading { margin-right: 0.5rem; }

/* Multi-select on benefit_modal — shows ~5 options without scrolling. */
.benefit-strategic-solutions-select { height: 80px; }

/* Form Elements */
label,
.field-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

/* `.field-label` is a `<div>` carrying the visual + accessibility role of
   a label for composite widgets (custom-select). It is paired with the
   widget via `aria-labelledby` on the widget root. See issue #121 Fix D:
   `<label for=X>` was flagged by Chrome when X resolved to a `<div>`
   (the visible part of a custom-select) or to an `<input type="hidden">`
   (an unfocusable form control); both are not valid label-for targets.
   The `.field-label` shape sidesteps the warning while keeping the
   required-field decorator working via the `data-label-for` fallback
   in `required_fields.ts::findLabelForElement`. */

.required-fields-hint {
    font-size: 0.8rem;
    color: var(--text-color-muted);
    margin-top: -0.25rem;
    margin-bottom: 0.25rem;
}

.required-fields-hint .required-marker {
    color: var(--danger-color, #d32f2f);
    font-weight: 700;
}

/* Required / optional field cues
   (applied by frontend/js/required_fields.js by decorating associated <label>) */
.label-required::after {
    content: " *";
    color: var(--danger-color, #d32f2f);
    font-weight: 700;
}

/* Inline validation (custom, non-native) */
.field-error {
    border-color: var(--danger-color, #d32f2f) !important;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.15);
}

/* Ensure the error style also applies to custom selects */
.select-selected.field-error {
    border-color: var(--danger-color, #d32f2f) !important;
}

.field-error-message {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--danger-color, #d32f2f);
    line-height: 1.2;
}

.label-optional::after {
    content: " (optional)";
    color: var(--text-color-muted);
    font-weight: 400;
    font-size: 0.85em;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 0.95rem;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
}

.modal-field-grid {
    display: grid;
    gap: 1rem;
}

.modal-field-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.modal-field-grid--amounts {
    margin-top: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.modal-field-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.modal-field-section-divider {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.modal-field-subgroup {
    margin-top: 0.75rem;
}

.modal-field-control--compact {
    max-width: 250px;
}

.modal-field-control--narrow {
    max-width: 150px;
}

.modal-field-control--tiny {
    max-width: 100px;
}

/* Custom Select Dropdown */
.custom-select {
    position: relative;
}

.select-selected {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.select-selected:after {
    position: absolute;
    content: "";
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-color: var(--text-color) transparent transparent transparent;
}

.select-selected.select-arrow-active:after {
    border-color: transparent transparent var(--text-color) transparent;
    top: 40%;
}

.select-items {
    position: absolute;
    background-color: var(--card-bg);
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.select-hide {
    display: none;
}

.select-items div {
    color: var(--text-color);
    padding: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.select-items div:hover, .same-as-selected {
    background-color: var(--nav-active-bg);
}

.select-items .select-group-label {
    font-weight: bold;
    color: var(--text-color-light);
    cursor: default;
    pointer-events: none;
}

.dropdown-logo {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Boolean Switch */
.form-group-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-group-inline > label {
    margin-bottom: 0;
}

.modal-toggle-row {
    margin-top: 0.75rem;
    padding: 0.85rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background-color: var(--swimlane-bg);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: var(--card-bg);
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 999px;
}

.slider.round:before {
    border-radius: 50%;
}

.form-group-customer-name {
    display: none;
}

.edit-approval-panel {
    padding: 1rem;
    border: 1px dashed var(--border-color);
    border-radius: 0;
    background-color: var(--swimlane-bg);
}

.edit-approval-panel-title {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.edit-gate-fields {
    margin-bottom: 1rem;
}

.edit-gate-description {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background-color: var(--nav-active-bg);
}

.edit-gate-description-title {
    margin: 0 0 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.edit-gate-description-body {
    margin: 0;
    color: var(--text-color-muted);
    font-size: 0.85rem;
}

.edit-gate-field {
    margin-bottom: 0.75rem;
}

.edit-approval-actions {
    display: flex;
    gap: 0.5rem;
}

/* Buttons — issue #115 (NRI brand re-skin).
 * The brand CTA pattern: pill shape, Karelia Bold, NRI Blue fill with
 * hover-to-Navy on the primary; the secondary / ghost variant is
 * transparent with a navy hairline that fills on hover. .btn-on-dark
 * flips the colour scheme for navy surfaces (executive page, login
 * page from slice #117). */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 22px;
    border: none;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: var(--fs-body-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, filter 0.2s;
    line-height: 1.5;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background-color: var(--nri-blue);
    color: var(--nri-white);
}

.btn-primary:hover {
    background-color: var(--nri-navy);
    color: var(--nri-white);
}

.btn-primary:active {
    filter: brightness(0.95);
}

/* Ghost variant — secondary action with no commitment. The hairline is
 * an inset box-shadow so the layout geometry stays identical between
 * the resting and hover states (no 1.5px shift). */
.btn-secondary,
.btn-ghost {
    background-color: transparent;
    color: var(--nri-blue);
    box-shadow: inset 0 0 0 1.5px var(--nri-blue);
}

.btn-secondary:hover,
.btn-ghost:hover {
    background-color: var(--nri-blue);
    color: var(--nri-white);
}

.btn-secondary:active,
.btn-ghost:active {
    filter: brightness(0.95);
}

/* Danger variant — destructive action (Reject, Delete). Lifted from the
 * .confirm-dialog__confirm.btn-danger scope it used to live in so that
 * the standalone Reject / Delete buttons render in NRI Red too. */
.btn-danger {
    background-color: var(--danger-color);
    color: var(--nri-white);
}

.btn-danger:hover {
    background-color: var(--danger-color);
    filter: brightness(0.9);
}

/* Icon-only button — keeps the circular hit-area; the icon inside is a
 * brand pictogram (slice #114). */
.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--nav-text);
    border-radius: 50%;
}

.btn-icon:hover {
    background-color: var(--nav-active-bg);
}

.btn-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* On-dark modifier — flips the colour scheme for use on a navy surface
 * (executive page action bar, login page). White background + blue
 * text on the primary; transparent + white hairline on the ghost. */
.btn-primary.btn-on-dark {
    background-color: var(--nri-white);
    color: var(--nri-blue);
}

.btn-primary.btn-on-dark:hover {
    background-color: var(--nri-blue-3-25);
    color: var(--nri-blue);
}

.btn-secondary.btn-on-dark,
.btn-ghost.btn-on-dark {
    background-color: transparent;
    color: var(--nri-white);
    box-shadow: inset 0 0 0 1.5px var(--nri-white);
}

.btn-secondary.btn-on-dark:hover,
.btn-ghost.btn-on-dark:hover {
    background-color: var(--nri-white);
    color: var(--nri-blue);
}

/* User Menu */
.user-menu-container {
    position: relative;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0;
    transition: background-color 0.2s;
}

.user-menu:hover {
    background-color: var(--nav-active-bg);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-name {
    font-weight: 500;
    color: var(--text-color);
}

.menu-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-color-light);
    transition: transform 0.2s;
}

.user-menu.active .menu-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
    min-width: 160px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1100;
    overflow: hidden;
    animation: slide-down 0.2s ease-out;
}

.user-dropdown.active {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: var(--nav-active-bg);
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
    color: var(--text-color-light);
}

.logout-btn {
    color: var(--nri-red);
}

.logout-btn svg {
    color: var(--nri-red);
}

/* Save Indicator */
.save-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color-light);
}

.status-light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--status-light-idle);
    transition: background-color 0.3s;
}
.status-light.saving { background-color: var(--status-light-saving); }
.status-light.success { background-color: var(--status-light-success); }
.status-light.error { background-color: var(--status-light-error); }

/* Other components */
.info-icon {
    cursor: help;
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
}

/* Pictogram utility classes (issue #114). All icons are NRI pictograms or
   brand-matching authored SVGs sourced from /brand/pictograms/. The base
   class gives a consistent 18×18 inline-block sizing; `pict--white` flips
   the Navy-fill artwork to white for on-dark contexts (executive page
   navbar, navy modals, etc.). The .info-icon i / .info-icon svg rules
   that used to style the Font Awesome <i> tags retired with the Kit. */
.pict {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.pict--white {
    filter: brightness(0) invert(1);
}

/* Tooltip implementation */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

/* Tooltip text */
[data-tooltip]::before {
    content: attr(data-tooltip);
    bottom: calc(100% + 10px);
    background-color: #333;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: normal;
    width: max-content;
    max-width: 200px;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Tooltip arrow */
[data-tooltip]::after {
    content: "";
    bottom: calc(100% + 2px);
    border: 4px solid transparent;
    border-top-color: #333;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Linked Initiatives UI */
.linked-initiatives-section {
    padding: 1.5rem;
}

.financial-card {
    background: var(--nav-bg);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 0;
}

.financial-card-label {
    font-size: 0.8rem;
    color: var(--text-color-muted);
    margin-bottom: 0.5rem;
}

.financial-card-value {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.progress-bar-container {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.search-results-list {
    margin-top: 0.5rem;
    background: var(--nav-bg);
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--nav-active-bg);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Toast notifications (issue #006 tracer bullet) */
.toast-region {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 3000;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    pointer-events: none;
    max-width: min(28rem, calc(100vw - 2rem));
}

.toast {
    pointer-events: auto;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--border-color);
    border-radius: 0;
    padding: 0.75rem 0.75rem 0.75rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    animation: toast-in 180ms ease-out;
}

.toast--success { border-left-color: var(--status-light-success); }
.toast--error   { border-left-color: var(--status-light-error); }
.toast--warning { border-left-color: var(--status-light-saving); }
.toast--info    { border-left-color: var(--primary-color); }

.toast__body {
    flex: 1;
    line-height: 1.4;
    word-break: break-word;
    font-size: 0.9rem;
}

.toast__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color-light);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.1rem 0.3rem;
}
.toast__close:hover { color: var(--text-color); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}

/* Confirmation dialog (issue #009) — sits on top of any other modal so a
   destructive action triggered from within the edit modal still shows
   above it. */
#confirm-dialog {
    z-index: 2500;
}

.confirm-dialog__content {
    max-width: 480px;
}

.confirm-dialog__title {
    margin: 0;
    font-size: 1.1rem;
}

.confirm-dialog__message {
    margin: 0;
    color: var(--text-color);
    line-height: 1.4;
}

.confirm-dialog__actions {
    margin-left: auto;
}

/* .confirm-dialog__confirm.btn-danger no longer needs an override —
 * the global .btn-danger rule (issue #115) gives the confirm button
 * the NRI Red treatment automatically. */
