/* Project and test-case names wrap instead of overflowing. */
.project-name,
.test-case-title,
.card-title,
.list-group-item {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Keep long button groups usable on small screens. */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Preserve new lines in test-case text while allowing normal wrapping. */
.test-case-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

textarea.form-control {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ===== Theme ===== */
:root {
    --app-bg: #f8f9fa;
    --app-text: #212529;
    --app-card-bg: #ffffff;
    --app-border: #dee2e6;
    --app-muted: #6c757d;
    --app-input-bg: #ffffff;
    --app-input-text: #212529;
    --app-sidebar-bg: #ffffff;
    --app-sidebar-hover: #f1f3f5;
}

html[data-theme="dark"] {
    --app-bg: #121212;
    --app-text: #e9ecef;
    --app-card-bg: #1e1e1e;
    --app-border: #3a3a3a;
    --app-muted: #adb5bd;
    --app-input-bg: #252525;
    --app-input-text: #f1f3f5;
    --app-sidebar-bg: #1b1b1b;
    --app-sidebar-hover: #2b2b2b;
}

html,
body {
    min-height: 100%;
}

body {
    background-color: var(--app-bg);
    color: var(--app-text);
    transition: background-color 0.2s ease, color 0.2s ease;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu {
    background-color: var(--app-card-bg);
    color: var(--app-text);
    border-color: var(--app-border);
}

html[data-theme="dark"] .table {
    --bs-table-bg: var(--app-card-bg);
    --bs-table-color: var(--app-text);
    --bs-table-border-color: var(--app-border);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background-color: var(--app-input-bg);
    color: var(--app-input-text);
    border-color: var(--app-border);
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
    background-color: #2b2b2b;
    color: var(--app-input-text);
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .form-text {
    color: var(--app-muted) !important;
}

html[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ===== Top bar ===== */
.app-navbar {
    min-height: 56px;
}

.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 38px;
    padding: 0.25rem 0.5rem;
}

/* ===== Sidebar ===== */
.app-sidebar {
    width: 290px;
    background-color: var(--app-sidebar-bg);
    color: var(--app-text);
}

.app-sidebar .offcanvas-header {
    border-bottom: 1px solid var(--app-border);
}

.app-sidebar .offcanvas-title {
    font-weight: 700;
}

.sidebar-user {
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: var(--app-sidebar-hover);
}

.sidebar-email {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sidebar-nav .nav-link,
.app-sidebar .theme-toggle {
    color: var(--app-text);
    border-radius: 0.5rem;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.25rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-nav .nav-link:hover,
.app-sidebar .theme-toggle:hover {
    background-color: var(--app-sidebar-hover);
}

.sidebar-nav .nav-link.active {
    background-color: var(--app-accent);
    color: #fff;
}

.sidebar-divider {
    height: 1px;
    background-color: var(--app-border);
    margin: 0.75rem 0;
}

.app-content {
    padding-bottom: 2rem;
}

/* Bootstrap utility backgrounds that otherwise stay white in dark mode. */
html[data-theme="dark"] .bg-white {
    background-color: var(--app-card-bg) !important;
}

html[data-theme="dark"] .bg-light {
    background-color: #252525 !important;
}

html[data-theme="dark"] .text-dark {
    color: var(--app-text) !important;
}

/* ===== Dashboard ===== */
.dashboard-stat-card,
.project-dashboard-card,
.dashboard-chart-card {
    border-color: var(--app-border);
    box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-stat-card:hover,
.project-dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.2rem rgba(0, 0, 0, 0.08);
}

.dashboard-stat-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--app-sidebar-hover);
    color: var(--app-text);
    font-size: 1.25rem;
    font-weight: 700;
}

.dashboard-chart-wrap {
    position: relative;
    height: 280px;
}

.dashboard-doughnut-wrap {
    max-width: 360px;
    margin: 0 auto;
}

.project-dashboard-card .badge {
    min-width: 2rem;
}

@media (max-width: 575.98px) {
    .dashboard-chart-wrap {
        height: 230px;
    }
}


/* ===== Documentation ===== */
.documentation-layout {
    align-items: flex-start;
}

.documentation-nav {
    position: sticky;
    top: 1rem;
}

.documentation-nav .list-group-item {
    background-color: var(--app-card-bg);
    color: var(--app-text);
    border-color: var(--app-border);
}

.documentation-nav .list-group-item.active {
    background-color: var(--app-accent);
    color: #fff;
    border-color: var(--app-accent);
}

.documentation-content {
    background-color: var(--app-card-bg);
    border: 1px solid var(--app-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.04);
}

.documentation-content h1 {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.documentation-content h2 {
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--app-border);
}

.documentation-content h3 {
    margin-top: 1.5rem;
}

.documentation-content p,
.documentation-content li {
    line-height: 1.7;
}

.documentation-content pre {
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    background: var(--app-input-bg);
    border: 1px solid var(--app-border);
}

.documentation-content code {
    overflow-wrap: anywhere;
}

.documentation-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.documentation-content a {
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    .documentation-nav {
        position: static;
    }

    .documentation-content {
        padding: 1rem;
    }
}


/* ===== Compact history and top navigation improvements ===== */
.app-navbar .container-fluid {
    display: flex;
    align-items: center;
}

.app-navbar-start {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.navbar-quick-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.navbar-quick-links a {
    color: #f8f9fa;
    text-decoration: none;
    font-size: 0.92rem;
    white-space: nowrap;
    border-radius: 0.4rem;
    padding: 0.45rem 0.6rem;
    transition: background-color 0.15s ease;
}

.navbar-quick-links a:hover,
.navbar-quick-links a.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.14);
}

.app-logo {
    display: inline-flex;
    align-items: center;
    margin-right: 0;
}

.app-logo svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.run-history-item {
    border: 1px solid var(--app-border);
    border-radius: 0.65rem !important;
    background: var(--app-card-bg);
    color: var(--app-text);
    padding: 1rem 1.1rem;
    box-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.035);
}

.run-history-item[hidden] {
    display: none !important;
}

.run-history-details {
    flex-shrink: 0;
}

.run-history-details summary {
    list-style: none;
    cursor: pointer;
}

.run-history-details summary::-webkit-details-marker {
    display: none;
}

.run-history-details[open] {
    flex-basis: 100%;
}

.run-history-details[open] summary {
    display: inline-block;
}

.run-history-details .table {
    color: inherit;
}

@media (max-width: 767.98px) {
    .app-navbar-start {
        gap: 0.45rem;
        flex-wrap: wrap;
    }

    .navbar-quick-links {
        gap: 0;
    }

    .navbar-quick-links a {
        font-size: 0.82rem;
        padding: 0.4rem 0.45rem;
    }

    .app-logo svg {
        width: 145px;
        height: auto;
    }

    .run-history-details {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .navbar-quick-links {
        order: 3;
        width: 100%;
        margin-left: 2.8rem;
    }
}

/* Keep the requested dark-green wordmark readable on the dark top bar. */
.app-logo {
    background-color: #f1f3f5;
    border-radius: 0.45rem;
    padding: 0.1rem 0.45rem;
}


/* ===== Step-run screenshot attachments ===== */
.step-screenshot-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.step-screenshot-gallery a {
    display: block;
    border: 1px solid var(--app-border);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--app-card-bg);
}
.step-screenshot-gallery img {
    display: block;
    width: 112px;
    height: 84px;
    object-fit: cover;
}
.step-screenshot-gallery a:focus-visible {
    outline: 3px solid var(--app-accent);
    outline-offset: 2px;
}


/* Keep quick links to the left and align the logo to the far right. */
@media (min-width: 768px) {
    .app-navbar .container-fluid {
        width: 100%;
        justify-content: space-between;
    }

    .app-navbar-start {
        width: 100%;
    }

    .app-logo {
        margin-left: auto;
        flex-shrink: 0;
    }
}


/* ===== Dashboard: lighter statistics and compact project cards ===== */
.dashboard-stats .dashboard-stat-card {
    border-radius: 0.7rem;
    box-shadow: 0 1px 4px rgba(20, 30, 45, 0.035);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dashboard-stats .dashboard-stat-card:hover,
.dashboard-projects .project-dashboard-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.35rem 0.9rem rgba(20, 30, 45, 0.075);
}

.dashboard-stats .dashboard-stat-card--active {
    border-color: #5272ea;
    box-shadow: 0 0 0 1px rgba(82, 114, 234, 0.16);
}

.dashboard-stat-value {
    font-size: clamp(1.45rem, 2vw, 1.8rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--app-text);
    font-variant-numeric: tabular-nums;
}

.dashboard-stat-card--pass .dashboard-stat-value,
.dashboard-stat-card--pass .dashboard-stat-icon {
    color: #43875a;
}

.dashboard-stat-card--fail .dashboard-stat-value,
.dashboard-stat-card--fail .dashboard-stat-icon {
    color: #c64b50;
}

.dashboard-stat-card--skip .dashboard-stat-value,
.dashboard-stat-card--skip .dashboard-stat-icon {
    color: #858b93;
}

.dashboard-stat-card--total .dashboard-stat-value,
.dashboard-stat-card--total .dashboard-stat-icon {
    color: #5272ea;
}

.dashboard-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 0;
    background: transparent;
    font-size: 1.15rem;
    font-weight: 700;
}

.project-dashboard-card {
    border-radius: 0.7rem;
    box-shadow: 0 1px 4px rgba(20, 30, 45, 0.035);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.project-dashboard-title {
    min-width: 0;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 600;
    overflow-wrap: anywhere;
    min-height: 2.7em;
}

.project-test-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgba(82, 114, 234, 0.09);
    color: #496cf0;
    font-size: 0.75rem;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
}

.project-test-count span {
    font-weight: 500;
}

.project-dashboard-card .action-buttons {
    gap: 0.4rem;
}

.project-dashboard-card .action-buttons .btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
}

html[data-theme="dark"] .project-test-count {
    background: rgba(125, 150, 255, 0.16);
    color: #aebeff;
}

@media (max-width: 575.98px) {
    .dashboard-stats .card-body {
        padding: 0.7rem !important;
    }

    .dashboard-stats .small {
        font-size: 0.72rem;
    }

    .project-dashboard-card .action-buttons .btn {
        font-size: 0.78rem;
    }
}


/* ===== Compact, paginated project list ===== */
.project-list-table {
    border: 1px solid var(--app-border);
    border-radius: 0.65rem;
    background: var(--app-card-bg);
}
.project-list-table .table {
    color: var(--app-text);
    --bs-table-bg: transparent;
    --bs-table-color: var(--app-text);
    --bs-table-border-color: var(--app-border);
}
.project-list-table th,
.project-list-table td {
    padding: 0.7rem 0.9rem;
}
.project-row-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.project-row-actions form {
    margin: 0;
}
@media (max-width: 575.98px) {
    .project-list-table th,
    .project-list-table td {
        padding: 0.55rem;
        font-size: 0.88rem;
    }
    .project-row-actions {
        min-width: 150px;
    }
    .project-row-actions .btn {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }
}


/* ===== Dashboard statistics: compact horizontal tiles ===== */
.dashboard-stats {
    --bs-gutter-x: 0.65rem;
    --bs-gutter-y: 0.65rem;
}

.dashboard-stats > [class*="col-"] {
    min-width: 0;
}

.dashboard-stats .dashboard-stat-card {
    min-height: 76px;
    border-radius: 0.55rem;
}

.dashboard-stats .dashboard-stat-card .card-body {
    padding: 0.65rem 0.8rem !important;
}

.dashboard-stats .dashboard-stat-value {
    margin-top: 0.15rem !important;
    font-size: clamp(1.2rem, 1.7vw, 1.5rem);
    line-height: 1;
}

.dashboard-stats .dashboard-stat-icon {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 1rem;
}

.dashboard-stats .dashboard-stat-card .small {
    font-size: 0.78rem;
    line-height: 1.15;
}

.dashboard-chart-card .card-body {
    padding: 1rem;
}

@media (max-width: 575.98px) {
    .dashboard-stats {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }

    .dashboard-stats .dashboard-stat-card {
        min-height: 68px;
    }

    .dashboard-stats .dashboard-stat-card .card-body {
        padding: 0.55rem 0.65rem !important;
    }

    .dashboard-stats .dashboard-stat-value {
        font-size: 1.2rem;
    }

    .dashboard-stats .dashboard-stat-card .small {
        font-size: 0.72rem;
    }
}


/* ===== Run statistics: compact result cards ===== */
.run-stats-summary {
    --bs-gutter-x: 0.65rem;
    --bs-gutter-y: 0.65rem;
}

.run-stats-card {
    min-height: 96px;
    border: 0;
    border-radius: 0.65rem;
}

.run-stats-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.75rem 0.6rem;
}

.run-stats-value {
    margin: 0 0 0.2rem;
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    line-height: 1;
    font-weight: 700;
}

.run-stats-label {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.2;
}

@media (max-width: 575.98px) {
    .run-stats-card {
        min-height: 82px;
    }

    .run-stats-card .card-body {
        padding: 0.6rem 0.45rem;
    }

    .run-stats-value {
        font-size: 1.5rem;
    }

    .run-stats-label {
        font-size: 0.78rem;
    }
}


/* ===== Profile page: calm, structured sections ===== */
.profile-page {
    max-width: 1040px;
}

.profile-section {
    border: 1px solid var(--app-border);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 0.15rem 0.65rem rgba(25, 35, 50, 0.035) !important;
}

.profile-section .card-title {
    color: var(--app-text);
    font-size: 1rem;
    font-weight: 650;
}

.profile-section--company {
    background: #f4f7f5;
    border-left: 4px solid #9bb8a5;
}
.profile-section--account {
    background: #f3f6f9;
    border-left: 4px solid #9db2c8;
}
.profile-section--stats {
    background: #f7f6f1;
    border-left: 4px solid #c5b995;
}
.profile-section--projects {
    background: #f2f6f7;
    border-left: 4px solid #98b8bd;
}
.profile-section--security {
    background: #f7f3f2;
    border-left: 4px solid #c5a7a0;
}
.profile-section--support {
    background: #f5f3f8;
    border-left: 4px solid #b5a7c8;
}

.profile-info-label,
.profile-stat-label {
    color: var(--app-muted);
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
}
.profile-info-value {
    color: var(--app-text);
    font-weight: 600;
    overflow-wrap: anywhere;
}
.profile-stat-value {
    color: var(--app-text);
    font-size: 1.45rem;
    line-height: 1.2;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.profile-section-toggle {
    width: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 0;
    background: transparent;
    color: var(--app-text);
    text-align: left;
}
.profile-section-toggle:hover,
.profile-section-toggle:focus-visible {
    background: rgba(70, 90, 100, 0.045);
}
.profile-section-toggle:focus-visible {
    outline: 2px solid #7898a3;
    outline-offset: -3px;
}
.profile-section-heading {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    min-width: 0;
}
.profile-section-title {
    font-weight: 650;
}
.profile-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    height: 1.7rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: rgba(70, 105, 115, 0.12);
    color: var(--app-text);
    font-size: 0.8rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}
.profile-section-chevron {
    flex: 0 0 auto;
    color: var(--app-muted);
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.18s ease;
}
.profile-section-toggle[aria-expanded="true"] .profile-section-chevron {
    transform: rotate(180deg);
}
.profile-project-list .list-group-item,
.profile-ticket-list .list-group-item {
    background: transparent;
    color: var(--app-text);
    border-color: rgba(100, 115, 125, 0.18);
}
.profile-project-list .list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    overflow-wrap: anywhere;
}
.profile-project-list .list-group-item:hover {
    background: rgba(70, 90, 100, 0.055);
}
.profile-ticket-list .list-group-item {
    padding-left: 0;
    padding-right: 0;
}

html[data-theme="dark"] .profile-section--company {
    background: #202a25;
    border-left-color: #668d75;
}
html[data-theme="dark"] .profile-section--account {
    background: #202832;
    border-left-color: #6885a2;
}
html[data-theme="dark"] .profile-section--stats {
    background: #2b2921;
    border-left-color: #96875d;
}
html[data-theme="dark"] .profile-section--projects {
    background: #202b2d;
    border-left-color: #628d93;
}
html[data-theme="dark"] .profile-section--security {
    background: #2d2524;
    border-left-color: #9a7068;
}
html[data-theme="dark"] .profile-section--support {
    background: #292431;
    border-left-color: #88759f;
}
html[data-theme="dark"] .profile-section-count {
    background: rgba(190, 205, 210, 0.13);
}
html[data-theme="dark"] .profile-project-list .list-group-item,
html[data-theme="dark"] .profile-ticket-list .list-group-item {
    border-color: rgba(190, 200, 210, 0.14);
}
html[data-theme="dark"] .profile-section-toggle:hover,
html[data-theme="dark"] .profile-section-toggle:focus-visible,
html[data-theme="dark"] .profile-project-list .list-group-item:hover {
    background: rgba(220, 230, 235, 0.055);
}

@media (max-width: 575.98px) {
    .profile-section-toggle {
        min-height: 58px;
        padding: 0.85rem 1rem;
    }
    .profile-section .card-body {
        padding: 1rem !important;
    }
}


/* ===== Calm green identity and restrained AI shortcuts ===== */
:root {
    --app-accent: #6f9b7b;
    --app-accent-dark: #527d60;
    --app-accent-pale: #e7f1e9;
    --app-accent-soft: #c9ddce;
}
html[data-theme="dark"] {
    --app-accent: #527d60;
    --app-accent-dark: #6f9b7b;
    --app-accent-pale: #26372c;
    --app-accent-soft: #3b5543;
}
.btn-primary,
.btn-primary:focus {
    --bs-btn-bg: var(--app-accent);
    --bs-btn-border-color: var(--app-accent);
    --bs-btn-hover-bg: var(--app-accent-dark);
    --bs-btn-hover-border-color: var(--app-accent-dark);
    --bs-btn-active-bg: var(--app-accent-dark);
    --bs-btn-active-border-color: var(--app-accent-dark);
    --bs-btn-disabled-bg: var(--app-accent);
    --bs-btn-disabled-border-color: var(--app-accent);
    --bs-btn-focus-shadow-rgb: 111, 155, 123;
}
.btn-outline-primary {
    --bs-btn-focus-shadow-rgb: 111, 155, 123;
    --bs-btn-color: var(--app-accent-dark);
    --bs-btn-border-color: var(--app-accent);
    --bs-btn-hover-bg: var(--app-accent);
    --bs-btn-hover-border-color: var(--app-accent);
    --bs-btn-active-bg: var(--app-accent-dark);
    --bs-btn-active-border-color: var(--app-accent-dark);
}
html[data-theme="dark"] .btn-outline-primary {
    --bs-btn-color: #b6d5bd;
    --bs-btn-border-color: #86ad91;
    --bs-btn-hover-bg: #527d60;
    --bs-btn-hover-border-color: #527d60;
    --bs-btn-hover-color: #fff;
}
a:not(.btn):not(.nav-link) {
    --bs-link-color-rgb: 82, 125, 96;
}
.sidebar-nav .nav-link.active {
    background-color: var(--app-accent);
}
.documentation-nav .list-group-item.active {
    background-color: var(--app-accent);
    border-color: var(--app-accent);
}
.dashboard-stats .dashboard-stat-card--active {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 1px rgba(111, 155, 123, 0.18);
}
.dashboard-stat-card--total .dashboard-stat-value,
.dashboard-stat-card--total .dashboard-stat-icon {
    color: var(--app-accent-dark);
}
.project-test-count {
    background: var(--app-accent-pale);
    color: var(--app-accent-dark);
}
html[data-theme="dark"] .project-test-count {
    background: rgba(134, 173, 145, 0.18);
    color: #b6d5bd;
}
.app-navbar-start--dashboard {
    gap: 0.8rem;
}
.navbar-ai-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.3rem 0.45rem;
    border: 1px solid rgba(201, 221, 206, 0.32);
    border-radius: 0.65rem;
    background: rgba(231, 241, 233, 0.09);
}
.navbar-ai-label {
    color: #d8e9dc;
    font-size: 0.78rem;
    font-weight: 650;
    white-space: nowrap;
    padding: 0 0.25rem;
}
.navbar-ai-label span {
    color: #a9cfb2;
}
.navbar-ai-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #f2f7f3;
    text-decoration: none;
    font-size: 0.8rem;
    line-height: 1.25;
    white-space: nowrap;
    padding: 0.38rem 0.55rem;
    border: 1px solid rgba(201, 221, 206, 0.35);
    border-radius: 0.45rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.navbar-ai-links a:hover,
.navbar-ai-links a:focus-visible {
    color: #fff;
    background: rgba(111, 155, 123, 0.42);
    border-color: #a9cfb2;
}
@media (max-width: 767.98px) {
    .app-navbar-start--dashboard {
        align-items: flex-start;
        gap: 0.4rem;
    }
    .app-navbar-start--dashboard .navbar-ai-links {
        order: 3;
        flex-basis: 100%;
        margin-left: 2.8rem;
        padding: 0.25rem 0.35rem;
    }
    .navbar-ai-label {
        font-size: 0.72rem;
    }
    .navbar-ai-links a {
        font-size: 0.75rem;
        padding: 0.32rem 0.45rem;
    }
}
@media (max-width: 420px) {
    .app-navbar-start--dashboard .navbar-ai-links {
        margin-left: 0;
    }
}
/* Slightly shorter charts: retain both visualizations and their interactions. */
.dashboard-chart-wrap {
    height: 220px;
}
.dashboard-doughnut-wrap {
    max-width: 300px;
}
@media (max-width: 575.98px) {
    .dashboard-chart-wrap {
        height: 185px;
    }
}

/* Informational guidance follows the green accent instead of the old blue. */
.alert-info,
.badge.bg-info {
    --bs-alert-color: #42684d;
    --bs-alert-bg: #e7f1e9;
    --bs-alert-border-color: #c9ddce;
    color: #42684d;
    background-color: #e7f1e9;
    border-color: #c9ddce;
}
html[data-theme="dark"] .alert-info {
    --bs-alert-color: #c4ddca;
    --bs-alert-bg: #26372c;
    --bs-alert-border-color: #3b5543;
    color: #c4ddca;
    background-color: #26372c;
    border-color: #3b5543;
}
.ai-selection-hint {
    border-radius: 0.65rem;
}


/* Bootstrap's remaining primary utilities (badges, pagination, etc.) share the green token. */
:root {
    --bs-primary: #6f9b7b;
    --bs-primary-rgb: 111, 155, 123;
    --bs-primary-text-emphasis: #42684d;
    --bs-primary-bg-subtle: #e7f1e9;
    --bs-primary-border-subtle: #c9ddce;
    --bs-link-color-rgb: 82, 125, 96;
}
html[data-theme="dark"] {
    --bs-primary: #527d60;
    --bs-primary-rgb: 82, 125, 96;
    --bs-primary-text-emphasis: #c4ddca;
    --bs-primary-bg-subtle: #26372c;
    --bs-primary-border-subtle: #3b5543;
    --bs-link-color-rgb: 165, 200, 173;
}

.navbar-ai-optional {
    color: #b9cdbf;
    font-size: 0.68rem;
    font-weight: 450;
    white-space: nowrap;
}
@media (max-width: 767.98px) {
    .navbar-ai-optional {
        font-size: 0.64rem;
    }
}
