/* TestLink Pro — Dark mode (marketing navy sections + teal) */

/* ── Theme toggle (sidebar + auth pages) ── */
.sidebar-nav .theme-toggle-wrap {
    padding: 0;
    margin-top: 0.35rem;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 0.85rem;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.theme-toggle-btn .theme-toggle-icon {
    font-size: 1rem;
    color: var(--teal-300);
}

.auth-theme-toggle {
    position: fixed;
    top: 1.15rem;
    right: 1.15rem;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.55);
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.auth-theme-toggle:hover {
    background: rgba(20, 160, 170, 0.15);
    border-color: rgba(44, 193, 201, 0.45);
    color: #fff;
    box-shadow: none;
}

.auth-theme-toggle .theme-toggle-icon {
    font-size: 1.15rem;
}

[data-theme="dark"] .auth-theme-toggle {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(11, 26, 49, 0.82);
    box-shadow: none;
}

[data-theme="dark"] {
    color-scheme: dark;

    /* Marketing navy sections. Teal stays the action color. */
    --brand-navy: #142948;
    --brand-navy-dark: #081426;
    --brand-slate: #081426;
    --brand-green: #14a0aa;
    --brand-green-dark: #2cc1c9;
    --brand-green-darker: #5fd4db;
    --accent: #5fd4db;
    --accent-rgb: 95, 212, 219;

    --primary: #14a0aa;
    --primary-dark: #2cc1c9;
    --primary-mid: #1d3a63;
    --primary-rgb: 20, 160, 170;
    --brand-green-rgb: 20, 160, 170;

    --primary-gradient: linear-gradient(180deg, #0b1a31 0%, #142948 100%);
    --accent-gradient: linear-gradient(90deg, #14a0aa 0%, #5fd4db 100%);
    --hero-gradient: linear-gradient(180deg, #081426 0%, #0d1e38 100%);
    --secondary-gradient: linear-gradient(135deg, #0d1e38 0%, #1d3a63 100%);
    --success-gradient: linear-gradient(135deg, #146c34 0%, #1f9d55 100%);

    --dark-bg: #081426;
    --sidebar-bg: #0b1a31;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active-bg: rgba(44, 193, 201, 0.14);
    --sidebar-active-border: #2cc1c9;

    --card-bg: #0d1e38;
    --page-bg: #081426;
    --text-primary: #ffffff;
    --text-secondary: #b6c4d8;
    --text-muted: #8aa0b8;
    --text-on-dark: #b6c4d8;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.06);
    --input-focus-ring: rgba(20, 160, 170, 0.28);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.55);

    --bs-primary: #14a0aa;
    --bs-primary-rgb: 20, 160, 170;
    --bs-link-color: #5fd4db;
    --bs-link-hover-color: #2cc1c9;
    --bs-body-bg: #081426;
    --bs-body-color: #ffffff;
    --bs-border-color: rgba(255, 255, 255, 0.08);
    --bs-secondary-color: #b6c4d8;
    --bs-tertiary-color: #8aa0b8;
    --bs-emphasis-color: #fff;

    --dm-text: #ffffff;
    --dm-text-secondary: #b6c4d8;
    --dm-text-muted: #8aa0b8;
    --dm-surface: #0d1e38;
    --dm-surface-raised: #142948;
    --dm-surface-muted: #0b1a31;
    --dm-border: rgba(255, 255, 255, 0.08);
    --dm-link: #5fd4db;
    --dm-link-hover: #2cc1c9;
}

/* Navy field with a faint marketing grid */
[data-theme="dark"] body {
    background-color: var(--page-bg);
    background-image: radial-gradient(ellipse at 85% -10%, rgba(44, 193, 201, 0.16) 0%, transparent 55%);
    transition: background-color 0.3s ease;
}

[data-theme="light"] body {
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .main-content {
    background: transparent;
    color: var(--text-primary);
}

[data-theme="dark"] .page-title {
    color: #f1f5f9;
}

[data-theme="dark"] .card,
[data-theme="dark"] .stat-card-enhanced,
[data-theme="dark"] .filter-bar,
[data-theme="dark"] .toolbar-panel {
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 40px 40px;
}

[data-theme="dark"] .main-content,
[data-theme="dark"] footer {
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .sidebar {
    border-right-color: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

[data-theme="dark"] .sidebar-brand .brand-wordmark {
    color: #fff;
    text-shadow: none;
}

[data-theme="dark"] .sidebar-brand .brand-pro {
    color: var(--teal-300);
}

[data-theme="dark"] .sidebar-nav a.active {
    background: rgba(44, 193, 201, 0.14);
    color: #fff;
    box-shadow: inset 0 -2px 0 #2cc1c9;
}

[data-theme="dark"] .theme-toggle-btn {
    border-color: rgba(20, 160, 170, 0.2);
    background: rgba(20, 160, 170, 0.06);
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background: rgba(20, 160, 170, 0.12);
    border-color: rgba(20, 160, 170, 0.35);
    box-shadow: 0 0 16px rgba(20, 160, 170, 0.15);
}

[data-theme="dark"] .theme-toggle-btn .theme-toggle-icon {
    color: var(--brand-green);
}

/* Cards */
[data-theme="dark"] .card {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .card:hover {
    border-color: rgba(20, 160, 170, 0.28);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .top-header {
    border-bottom-color: var(--border-color);
}

/* Tables */
[data-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--border-light);
    --bs-table-hover-bg: rgba(20, 160, 170, 0.06);
    --bs-table-striped-bg: rgba(20, 160, 170, 0.03);
}

[data-theme="dark"] .table thead th {
    background: rgba(20, 160, 170, 0.06);
    color: var(--text-secondary);
}

[data-theme="dark"] .table tbody tr:hover {
    background: rgba(20, 160, 170, 0.06);
}

/* Forms */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: #0b1a31;
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background: #0b1a31;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px var(--input-focus-ring);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--text-muted);
}

/* Buttons */
[data-theme="dark"] .btn-primary {
    background: #14a0aa;
    border: none;
    color: #0b1a31;
    box-shadow: none;
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-primary:focus,
[data-theme="dark"] .btn-primary:active {
    background: #2cc1c9;
    color: #0b1a31;
    box-shadow: none;
}

[data-theme="dark"] .btn-outline-primary {
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

[data-theme="dark"] .btn-outline-primary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: #fff;
    color: #fff;
}

[data-theme="dark"] .btn-light {
    background: #142948;
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .btn-light:hover {
    background: #1d3a63;
    border-color: rgba(20, 160, 170, 0.3);
}

/* Alerts */
[data-theme="dark"] .alert-success {
    background: rgba(20, 160, 170, 0.12);
    color: #5fd4db;
    border-left-color: var(--brand-green);
}

[data-theme="dark"] .alert-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-left-color: #ef4444;
}

[data-theme="dark"] .alert-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    border-left-color: #f59e0b;
}

[data-theme="dark"] .alert-info {
    background: rgba(56, 189, 248, 0.1);
    color: #7dd3fc;
    border-left-color: #38bdf8;
}

/* Modals */
[data-theme="dark"] .modal-content {
    background: #0d1e38;
    border: 1px solid var(--border-color);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 40px rgba(20, 160, 170, 0.08);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .modal-footer {
    border-top-color: var(--border-light);
}

[data-theme="dark"] .bg-light {
    background: #0b1a31 !important;
}

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

[data-theme="dark"] .dropdown-menu {
    background: #0d1e38;
    border-color: var(--border-color);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background: rgba(20, 160, 170, 0.1);
    color: var(--text-primary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(20, 160, 170, 0.25);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(20, 160, 170, 0.4);
}

[data-theme="dark"] ::selection {
    background: rgba(20, 160, 170, 0.35);
}

[data-theme="dark"] footer {
    background: #081426;
    border-top: 1px solid rgba(20, 160, 170, 0.1);
}

/* Dashboard-specific dark overrides */
[data-theme="dark"] .dashboard-page-bg {
    background:
        radial-gradient(ellipse at 88% 8%, rgba(20, 160, 170, 0.08) 0%, transparent 42%),
        radial-gradient(ellipse at 6% 92%, rgba(20, 160, 170, 0.06) 0%, transparent 48%);
}

[data-theme="dark"] .dashboard-page-bg::before {
    opacity: 0.25;
}

[data-theme="dark"] .dashboard-page-orb--1 {
    background: radial-gradient(circle, rgba(20, 160, 170, 0.2) 0%, transparent 70%);
}

[data-theme="dark"] .dashboard-page-orb--2 {
    background: radial-gradient(circle, rgba(95, 212, 219, 0.15) 0%, transparent 70%);
}

[data-theme="dark"] .dashboard-hero {
    background: linear-gradient(125deg, rgba(10, 15, 13, 0.98) 0%, rgba(11, 26, 49, 0.95) 45%, rgba(26, 46, 38, 0.92) 100%);
    border-color: rgba(20, 160, 170, 0.2);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(20, 160, 170, 0.1),
        0 0 60px rgba(20, 160, 170, 0.08);
}

[data-theme="dark"] .stat-card-enhanced {
    background: #0d1e38;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(20, 160, 170, 0.12);
}

[data-theme="dark"] .stat-card-enhanced:hover {
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.45),
        0 0 32px rgba(20, 160, 170, 0.1),
        0 0 0 1px rgba(20, 160, 170, 0.2);
}

[data-theme="dark"] .stat-card-enhanced .stat-value {
    color: #f1f5f9;
}

[data-theme="dark"] .stat-card-enhanced .stat-label {
    color: var(--text-secondary);
}

[data-theme="dark"] .dashboard-page .card {
    background: #0d1e38;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(20, 160, 170, 0.1);
}

[data-theme="dark"] .dashboard-page .card:hover {
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.4),
        0 0 24px rgba(20, 160, 170, 0.08),
        0 0 0 1px rgba(20, 160, 170, 0.18);
}

[data-theme="dark"] .label-pill {
    background: #0b1a31;
    border-color: rgba(20, 160, 170, 0.15);
}

[data-theme="dark"] .label-pill:hover {
    border-color: rgba(20, 160, 170, 0.3);
    box-shadow: 0 4px 16px rgba(20, 160, 170, 0.1);
}

[data-theme="dark"] .label-pill .label-count {
    color: #f1f5f9;
}

[data-theme="dark"] .activity-item:hover {
    background: rgba(20, 160, 170, 0.06);
}

[data-theme="dark"] .quick-action-card {
    background: #0d1e38;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(20, 160, 170, 0.12);
}

[data-theme="dark"] .quick-action-card:hover {
    background: #141f1b;
    border-color: rgba(20, 160, 170, 0.3);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(20, 160, 170, 0.12);
}

[data-theme="dark"] .quick-action-card .action-title {
    color: #f1f5f9;
}

[data-theme="dark"] .dash-section-title {
    color: #f1f5f9;
}

[data-theme="dark"] .progress-ring-value {
    color: #f1f5f9;
}

[data-theme="dark"] .progress-ring circle:first-child {
    stroke: rgba(20, 160, 170, 0.15);
}

[data-theme="dark"] .progress-ring-circle {
    stroke: var(--brand-green) !important;
}

[data-theme="dark"] .greeting-card,
[data-theme="dark"] .hero-datetime {
    background: rgba(20, 160, 170, 0.04);
    border-color: rgba(20, 160, 170, 0.18);
    box-shadow: inset 0 1px 0 rgba(20, 160, 170, 0.08), 0 0 24px rgba(20, 160, 170, 0.05);
}

[data-theme="dark"] .greeting-card:hover,
[data-theme="dark"] .hero-datetime:hover {
    border-color: rgba(20, 160, 170, 0.32);
    box-shadow: inset 0 1px 0 rgba(20, 160, 170, 0.12), 0 0 32px rgba(20, 160, 170, 0.1);
}

[data-theme="dark"] .greeting-eyebrow {
    background: rgba(20, 160, 170, 0.14);
    border-color: rgba(20, 160, 170, 0.3);
    color: #5fd4db;
}

[data-theme="dark"] .greeting-message {
    color: rgba(255, 255, 255, 0.62);
}

[data-theme="dark"] .hero-stat {
    background: rgba(20, 160, 170, 0.05);
    border-color: rgba(20, 160, 170, 0.12);
}

[data-theme="dark"] .hero-stat:hover {
    background: rgba(20, 160, 170, 0.1);
    border-color: rgba(20, 160, 170, 0.28);
}

[data-theme="dark"] .hero-stat-icon {
    background: rgba(20, 160, 170, 0.18);
}

[data-theme="dark"] .card-header-enhanced h5 i {
    background: rgba(20, 160, 170, 0.12);
}

[data-theme="dark"] .card-header-enhanced h5 {
    color: #f1f5f9;
}

[data-theme="dark"] .recent-project-logo {
    background: #0b1a31;
    border-color: var(--border-color);
}

/* History tab */
[data-theme="dark"] .history-hero {
    background: linear-gradient(180deg, #0b1a31 0%, #142948 100%);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .history-search-bar {
    background: rgba(11, 26, 49, 0.95);
    border: 1px solid rgba(20, 160, 170, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .history-search-input {
    background: transparent;
    color: #f1f5f9;
}

[data-theme="dark"] .history-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .history-search-dropdown {
    background: #0b1a31;
    border-color: rgba(20, 160, 170, 0.2);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .history-search-option {
    border-bottom-color: rgba(20, 160, 170, 0.08);
    color: #e2e8f0;
}

[data-theme="dark"] .history-search-option:hover,
[data-theme="dark"] .history-search-option.active {
    background: rgba(20, 160, 170, 0.1);
}

[data-theme="dark"] .history-search-option-id {
    color: #5fd4db;
}

[data-theme="dark"] .history-metric-card {
    background: linear-gradient(180deg, rgba(15, 23, 20, 0.9) 0%, rgba(10, 15, 13, 0.95) 100%);
    border-color: rgba(20, 160, 170, 0.15);
}

[data-theme="dark"] .history-metric-card--success {
    border-color: rgba(20, 160, 170, 0.35);
    background: linear-gradient(180deg, rgba(20, 160, 170, 0.08) 0%, rgba(10, 15, 13, 0.95) 100%);
}

[data-theme="dark"] .history-metric-card--danger {
    border-color: rgba(248, 113, 113, 0.35);
    background: linear-gradient(180deg, rgba(248, 113, 113, 0.08) 0%, rgba(10, 15, 13, 0.95) 100%);
}

[data-theme="dark"] .history-metric-label {
    color: rgba(255, 255, 255, 0.55);
}

[data-theme="dark"] .history-metric-value {
    color: #f1f5f9;
}

[data-theme="dark"] .history-chart-card,
[data-theme="dark"] .history-timeline-card {
    background: rgba(15, 23, 20, 0.85);
    border-color: rgba(20, 160, 170, 0.12);
}

[data-theme="dark"] .history-timeline-card:hover {
    border-color: rgba(20, 160, 170, 0.28);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .history-tc-title {
    color: #f1f5f9;
}

[data-theme="dark"] .history-detail-panel,
[data-theme="dark"] .history-ieee-summary {
    background: rgba(10, 15, 13, 0.6);
    border-color: rgba(20, 160, 170, 0.12);
}

[data-theme="dark"] .history-empty-icon {
    background: rgba(20, 160, 170, 0.12);
    color: #5fd4db;
}

[data-theme="dark"] .history-timeline-line {
    background: rgba(20, 160, 170, 0.2);
}

/* Team tab */
[data-theme="dark"] .teams-hero {
    background: linear-gradient(180deg, #0b1a31 0%, #142948 100%);
}

[data-theme="dark"] .teams-search-wrap {
    background: rgba(11, 26, 49, 0.95);
    border: 1px solid rgba(20, 160, 170, 0.2);
}

[data-theme="dark"] .teams-search-input {
    background: transparent;
    color: #f1f5f9;
}

[data-theme="dark"] .teams-role-legend {
    background: rgba(15, 23, 20, 0.6);
    border-color: rgba(20, 160, 170, 0.12);
    color: rgba(255, 255, 255, 0.55);
}

[data-theme="dark"] .team-card {
    background: rgba(15, 23, 20, 0.85);
    border-color: rgba(20, 160, 170, 0.12);
}

[data-theme="dark"] .team-card:hover {
    border-color: rgba(20, 160, 170, 0.28);
}

[data-theme="dark"] .team-card-header {
    background: linear-gradient(180deg, rgba(20, 160, 170, 0.06) 0%, rgba(15, 23, 20, 0.9) 100%);
    border-bottom-color: rgba(20, 160, 170, 0.1);
}

[data-theme="dark"] .team-card-name,
[data-theme="dark"] .team-member-name {
    color: #f1f5f9;
}

[data-theme="dark"] .team-member-chip {
    background: rgba(10, 15, 13, 0.5);
    border-color: rgba(20, 160, 170, 0.12);
}

[data-theme="dark"] .team-member-chip--manager { background: rgba(37, 99, 235, 0.1); border-color: rgba(59, 130, 246, 0.25); }
[data-theme="dark"] .team-member-chip--lead { background: rgba(14, 165, 233, 0.1); border-color: rgba(14, 165, 233, 0.25); }
[data-theme="dark"] .team-member-chip--auto { background: rgba(20, 160, 170, 0.1); border-color: rgba(20, 160, 170, 0.25); }

[data-theme="dark"] .team-org-stats { background: transparent; }
[data-theme="dark"] .team-org-stat { background: rgba(20, 160, 170, 0.1); color: #cbd5e1; }
[data-theme="dark"] .team-org-chart { background: linear-gradient(180deg, rgba(15, 23, 20, 0.85) 0%, rgba(10, 15, 13, 0.9) 100%); }
[data-theme="dark"] .org-root { box-shadow: 0 4px 12px rgba(20, 160, 170, 0.2); }
[data-theme="dark"] .org-spine::before,
[data-theme="dark"] .org-branch > .org-node::before,
[data-theme="dark"] .org-branch > .org-node::after {
    background: rgba(148, 163, 184, 0.45);
}
[data-theme="dark"] .org-spine-label {
    background: #0b1a31;
    color: rgba(255, 255, 255, 0.45);
}
[data-theme="dark"] .org-card {
    background: rgba(11, 26, 49, 0.95);
    border-color: rgba(20, 160, 170, 0.16);
}
[data-theme="dark"] .org-card:hover {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .org-card--manager { border-color: #818cf8; }
[data-theme="dark"] .org-card--lead { border-color: #38bdf8; }
[data-theme="dark"] .org-card--auto { border-color: #34d399; }
[data-theme="dark"] .org-card--manual { border-color: #94a3b8; }
[data-theme="dark"] .org-card--both { border-color: #a78bfa; }
[data-theme="dark"] .org-name { color: #f1f5f9; }
[data-theme="dark"] .org-user { color: #94a3b8; }
[data-theme="dark"] .org-skill-pill.auto { background: rgba(20, 160, 170, 0.18); color: #5fd4db; }
[data-theme="dark"] .org-skill-pill.manual { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }
[data-theme="dark"] .org-skill-pill.both { background: rgba(124, 58, 237, 0.22); color: #c4b5fd; }
[data-theme="dark"] .org-avatar--photo { background: #1e293b !important; }

[data-theme="dark"] .member-profile-modal .modal-body { background: #0b1a31; color: #e2e8f0; }
[data-theme="dark"] .member-scope-banner { background: rgba(20, 160, 170, 0.08); border-color: rgba(20, 160, 170, 0.2); color: rgba(255,255,255,0.65); }
[data-theme="dark"] .member-scope-banner i { color: #5fd4db; }
[data-theme="dark"] .member-section { background: rgba(10, 15, 13, 0.5); border-color: rgba(20, 160, 170, 0.12); }
[data-theme="dark"] .member-section-title { color: #e2e8f0; }
[data-theme="dark"] .member-section-desc { color: rgba(255,255,255,0.5); }
[data-theme="dark"] .member-stat-card { background: rgba(15, 23, 20, 0.85); border-color: rgba(20, 160, 170, 0.12); }
[data-theme="dark"] .member-stat-card--success { background: linear-gradient(180deg, rgba(20, 160, 170, 0.12) 0%, rgba(15, 23, 20, 0.9) 100%); }
[data-theme="dark"] .member-stat-card--danger { background: linear-gradient(180deg, rgba(248, 113, 113, 0.1) 0%, rgba(15, 23, 20, 0.9) 100%); }
[data-theme="dark"] .member-stat-card--info { background: linear-gradient(180deg, rgba(59, 130, 246, 0.1) 0%, rgba(15, 23, 20, 0.9) 100%); }
[data-theme="dark"] .member-stat-card--warning { background: linear-gradient(180deg, rgba(251, 191, 36, 0.1) 0%, rgba(15, 23, 20, 0.9) 100%); }
[data-theme="dark"] .member-stat-value { color: #f1f5f9; }
[data-theme="dark"] .member-stat-label { color: #cbd5e1; }
[data-theme="dark"] .member-stat-hint { color: rgba(255,255,255,0.45); }
[data-theme="dark"] .member-stat-icon { background: rgba(20, 160, 170, 0.1); color: #5fd4db; }
[data-theme="dark"] .member-legend-item { background: rgba(15, 23, 20, 0.6); border-color: rgba(20, 160, 170, 0.1); color: #cbd5e1; }
[data-theme="dark"] .member-legend-count { color: #f1f5f9; }
[data-theme="dark"] .member-breakdown-bar { background: rgba(20, 160, 170, 0.1); }
[data-theme="dark"] .member-exec-list { border-color: rgba(20, 160, 170, 0.12); }
[data-theme="dark"] .member-exec-item { background: rgba(15, 23, 20, 0.6); border-bottom-color: rgba(20, 160, 170, 0.08); }
[data-theme="dark"] .member-exec-item:hover { background: rgba(20, 160, 170, 0.06); }
[data-theme="dark"] .member-exec-title { color: #f1f5f9; }
[data-theme="dark"] .member-skill-chip { background: rgba(10, 15, 13, 0.6); border-color: rgba(20, 160, 170, 0.12); color: #e2e8f0; }
[data-theme="dark"] .member-empty-hint { background: rgba(10, 15, 13, 0.5); color: rgba(255,255,255,0.45); }
[data-theme="dark"] .member-bug-item { background: rgba(248, 113, 113, 0.08); }
[data-theme="dark"] .member-pass-track { background: rgba(248, 113, 113, 0.2); }

[data-theme="dark"] .team-role-section + .team-role-section {
    border-top-color: rgba(20, 160, 170, 0.12);
}

[data-theme="dark"] .teams-empty-icon {
    background: rgba(20, 160, 170, 0.12);
    color: #5fd4db;
}

[data-theme="dark"] .label-toolbar {
    background: rgba(15, 23, 20, 0.96);
    border-bottom-color: rgba(20, 160, 170, 0.16);
}
[data-theme="dark"] .label-toolbar-hint { color: rgba(255, 255, 255, 0.5); }
[data-theme="dark"] .label-count-pill {
    background: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}
[data-theme="dark"] .label-selected-pill {
    background: rgba(248, 113, 113, 0.18);
    color: #fca5a5;
}
[data-theme="dark"] .label-row-selected {
    background: rgba(248, 113, 113, 0.08) !important;
}
[data-theme="dark"] .quick-select-bar {
    background: rgba(15, 23, 20, 0.92);
    border-bottom-color: rgba(20, 160, 170, 0.16);
    color: #cbd5e1;
}
[data-theme="dark"] .quick-select-status { color: rgba(255, 255, 255, 0.5); }
[data-theme="dark"] .bulk-assign-bar {
    background: rgba(59, 130, 246, 0.12);
    border-bottom-color: rgba(59, 130, 246, 0.22);
    color: #e2e8f0;
}
[data-theme="dark"] .label-impact-card {
    background: rgba(15, 23, 20, 0.9);
    border-color: rgba(20, 160, 170, 0.16);
}
[data-theme="dark"] .impact-reviewed-box {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.28);
}

@media (prefers-reduced-motion: reduce) {
    [data-theme="dark"] body::before {
        opacity: 0.3;
    }
}
