/*
 * ThePipeTool — Dark Mode Override
 * All selectors scoped under [data-bs-theme="dark"] so they are completely inert in light mode.
 * Design tokens extracted from test pages (dashboard-test, test-cellar, test-pipes, profile-test, index-test)
 * and brand guidelines documentation.
 * v1 — 2026-03-04
 */

/* ========== FOUNDATION ========== */
[data-bs-theme="dark"] body {
    background: #0d0b09;
    color: #e8e0d4;
    font-family: 'Lora', Georgia, serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
    font-family: 'Montserrat', sans-serif;
    color: #fff;
}
[data-bs-theme="dark"] a { color: #daa520; text-decoration: none; transition: color 0.2s; }
[data-bs-theme="dark"] a:hover { color: #f0c040; text-decoration: none; }
[data-bs-theme="dark"] .container { color: #e8e0d4; }

/* ========== NAVBAR (BS5 — adapted from test page .navbar-default) ========== */
[data-bs-theme="dark"] .navbar.bg-light {
    background: rgba(13,11,9,0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(218,165,32,0.15) !important;
}
[data-bs-theme="dark"] .navbar.navbar-light .navbar-brand,
[data-bs-theme="dark"] .navbar.navbar-light .navbar-brand:hover { color: #fff !important; }
[data-bs-theme="dark"] .navbar.navbar-light .nav-link { color: rgba(255,255,255,0.7) !important; }
[data-bs-theme="dark"] .navbar.navbar-light .nav-link:hover,
[data-bs-theme="dark"] .navbar.navbar-light .nav-link:focus { color: #daa520 !important; }
[data-bs-theme="dark"] .navbar.navbar-light .nav-link.active { color: #daa520 !important; background: rgba(218,165,32,0.08) !important; border-radius: 6px; }
[data-bs-theme="dark"] .navbar.navbar-light .navbar-toggler { border-color: rgba(218,165,32,0.3); }
[data-bs-theme="dark"] .navbar.navbar-light .navbar-toggler-icon { filter: invert(1) brightness(0.8) sepia(1) hue-rotate(5deg) saturate(3); }
[data-bs-theme="dark"] .navbar .navbar-collapse { border-color: rgba(218,165,32,0.1); }
/* Navbar brand icon — swap to white variant */
[data-bs-theme="dark"] .navbar-brand img { content: url('../img/pipetool_icon_white.png'); }

/* ========== HERO BANNERS ========== */
[data-bs-theme="dark"] .dash-hero,
[data-bs-theme="dark"] .cellar-hero,
[data-bs-theme="dark"] .pipes-hero,
[data-bs-theme="dark"] .profile-hero,
[data-bs-theme="dark"] .review-hero,
[data-bs-theme="dark"] .tobacco-hero,
[data-bs-theme="dark"] .smoking-hero,
[data-bs-theme="dark"] .page-hero,
[data-bs-theme="dark"] .wish-hero {
    background: linear-gradient(135deg, #1a1610 0%, #1e1c1a 40%, #2b2519 70%, rgba(184,134,11,0.3) 100%);
    border: 1px solid rgba(184,134,11,0.15);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
[data-bs-theme="dark"] .dash-hero::after,
[data-bs-theme="dark"] .cellar-hero::after,
[data-bs-theme="dark"] .pipes-hero::after,
[data-bs-theme="dark"] .profile-hero::after,
[data-bs-theme="dark"] .review-hero::after,
[data-bs-theme="dark"] .tobacco-hero::after,
[data-bs-theme="dark"] .smoking-hero::after,
[data-bs-theme="dark"] .page-hero::after,
[data-bs-theme="dark"] .wish-hero::after {
    background: radial-gradient(circle, rgba(218,165,32,0.12) 0%, transparent 70%);
}
[data-bs-theme="dark"] .dash-hero p,
[data-bs-theme="dark"] .cellar-hero p,
[data-bs-theme="dark"] .pipes-hero p,
[data-bs-theme="dark"] .profile-hero p,
[data-bs-theme="dark"] .review-hero p,
[data-bs-theme="dark"] .page-hero p,
[data-bs-theme="dark"] .wish-hero p {
    font-family: 'Lora', Georgia, serif;
}

/* ========== STAT CARDS ========== */
[data-bs-theme="dark"] .stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-top: 3px solid rgba(218,165,32,0.3);
    border-radius: 16px;
    transition: all 0.3s ease;
}
[data-bs-theme="dark"] .stat-card:hover {
    background: rgba(218,165,32,0.04);
    border-color: rgba(218,165,32,0.15);
    border-top-color: currentColor;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
[data-bs-theme="dark"] .stat-value {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}
[data-bs-theme="dark"] .stat-label {
    font-family: 'Montserrat', sans-serif;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* Stat card color variants (brightened for dark bg) */
[data-bs-theme="dark"] .sc-tobacco,
[data-bs-theme="dark"] .sc-cellared,
[data-bs-theme="dark"] .sc-open-weight,
[data-bs-theme="dark"] .sc-total-pipes { border-top-color: #daa520; }
[data-bs-theme="dark"] .sc-tobacco .stat-value,
[data-bs-theme="dark"] .sc-tobacco .stat-icon,
[data-bs-theme="dark"] .sc-cellared .stat-value,
[data-bs-theme="dark"] .sc-cellared .stat-icon,
[data-bs-theme="dark"] .sc-open-weight .stat-value,
[data-bs-theme="dark"] .sc-open-weight .stat-icon,
[data-bs-theme="dark"] .sc-total-pipes .stat-value,
[data-bs-theme="dark"] .sc-total-pipes .stat-icon { color: #daa520; }

[data-bs-theme="dark"] .sc-pipes,
[data-bs-theme="dark"] .sc-open-cost,
[data-bs-theme="dark"] .sc-avg-cost { border-top-color: #5ba3d9; }
[data-bs-theme="dark"] .sc-pipes .stat-value,
[data-bs-theme="dark"] .sc-pipes .stat-icon,
[data-bs-theme="dark"] .sc-open-cost .stat-value,
[data-bs-theme="dark"] .sc-open-cost .stat-icon,
[data-bs-theme="dark"] .sc-avg-cost .stat-value,
[data-bs-theme="dark"] .sc-avg-cost .stat-icon { color: #5ba3d9; }

[data-bs-theme="dark"] .sc-reviews,
[data-bs-theme="dark"] .sc-open,
[data-bs-theme="dark"] .sc-cellared-weight,
[data-bs-theme="dark"] .sc-common-shape { border-top-color: #6fcf6f; }
[data-bs-theme="dark"] .sc-reviews .stat-value,
[data-bs-theme="dark"] .sc-reviews .stat-icon,
[data-bs-theme="dark"] .sc-open .stat-value,
[data-bs-theme="dark"] .sc-open .stat-icon,
[data-bs-theme="dark"] .sc-cellared-weight .stat-value,
[data-bs-theme="dark"] .sc-cellared-weight .stat-icon,
[data-bs-theme="dark"] .sc-common-shape .stat-value,
[data-bs-theme="dark"] .sc-common-shape .stat-icon { color: #6fcf6f; }

[data-bs-theme="dark"] .sc-brands,
[data-bs-theme="dark"] .sc-total-tins,
[data-bs-theme="dark"] .sc-countries { border-top-color: #b366d9; }
[data-bs-theme="dark"] .sc-brands .stat-value,
[data-bs-theme="dark"] .sc-brands .stat-icon,
[data-bs-theme="dark"] .sc-total-tins .stat-value,
[data-bs-theme="dark"] .sc-total-tins .stat-icon,
[data-bs-theme="dark"] .sc-countries .stat-value,
[data-bs-theme="dark"] .sc-countries .stat-icon { color: #b366d9; }

[data-bs-theme="dark"] .sc-cellared-cost,
[data-bs-theme="dark"] .sc-blends { border-top-color: #d4a574; }
[data-bs-theme="dark"] .sc-cellared-cost .stat-value,
[data-bs-theme="dark"] .sc-cellared-cost .stat-icon,
[data-bs-theme="dark"] .sc-blends .stat-value,
[data-bs-theme="dark"] .sc-blends .stat-icon { color: #d4a574; }

/* ========== PANEL CARDS ========== */
[data-bs-theme="dark"] .dash-panel,
[data-bs-theme="dark"] .cellar-panel,
[data-bs-theme="dark"] .review-panel,
[data-bs-theme="dark"] .profile-panel,
[data-bs-theme="dark"] .filter-card,
[data-bs-theme="dark"] .log-panel,
[data-bs-theme="dark"] .tobacco-panel,
[data-bs-theme="dark"] .table-panel,
[data-bs-theme="dark"] .wish-panel,
[data-bs-theme="dark"] .pipe-panel,
[data-bs-theme="dark"] .pipes-panel,
[data-bs-theme="dark"] .sidebar-card {
    background: linear-gradient(135deg, #1e1c1a 0%, #252218 100%);
    border: 1px solid rgba(184,134,11,0.15);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
[data-bs-theme="dark"] .panel-head {
    background: rgba(184,134,11,0.1);
    color: #daa520;
    border-bottom: 1px solid rgba(184,134,11,0.15);
    font-family: 'Montserrat', sans-serif;
}
[data-bs-theme="dark"] .panel-head .bi,
[data-bs-theme="dark"] .panel-head .head-accent { color: #f0c040; }
[data-bs-theme="dark"] .panel-head .panel-subtitle {
    color: rgba(255,255,255,0.5);
    font-family: 'Lora', Georgia, serif;
}
[data-bs-theme="dark"] .panel-body-inner {
    color: #e8e0d4;
}

/* ========== NAV PILL BUTTONS ========== */
[data-bs-theme="dark"] .cellar-nav-btn,
[data-bs-theme="dark"] .pipes-nav-btn {
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    font-family: 'Montserrat', sans-serif;
}
[data-bs-theme="dark"] .cellar-nav-btn:hover,
[data-bs-theme="dark"] .cellar-nav-btn:focus,
[data-bs-theme="dark"] .pipes-nav-btn:hover,
[data-bs-theme="dark"] .pipes-nav-btn:focus {
    background: rgba(218,165,32,0.15);
    color: #daa520;
    border-color: rgba(218,165,32,0.3);
    text-decoration: none;
}
[data-bs-theme="dark"] .cellar-nav-btn-primary,
[data-bs-theme="dark"] .pipes-nav-btn-primary {
    background: linear-gradient(135deg, #b8860b, #daa520);
    color: #0d0b09;
    border-color: #b8860b;
}
[data-bs-theme="dark"] .cellar-nav-btn-primary:hover,
[data-bs-theme="dark"] .pipes-nav-btn-primary:hover {
    background: linear-gradient(135deg, #daa520, #f0c040);
    color: #0d0b09;
}
[data-bs-theme="dark"] .cellar-nav-btn-active,
[data-bs-theme="dark"] .pipes-nav-btn-active {
    background: rgba(218,165,32,0.12);
    color: #daa520;
    border-color: rgba(218,165,32,0.3);
}

/* ========== FORM CONTROLS ========== */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] select,
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] input[type="text"],
[data-bs-theme="dark"] input[type="email"],
[data-bs-theme="dark"] input[type="password"],
[data-bs-theme="dark"] input[type="number"],
[data-bs-theme="dark"] input[type="date"],
[data-bs-theme="dark"] input[type="url"] {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: #e8e0d4;
    border-radius: 8px;
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] select:focus,
[data-bs-theme="dark"] textarea:focus {
    border-color: rgba(218,165,32,0.4);
    box-shadow: 0 0 0 2px rgba(218,165,32,0.15);
    background: rgba(255,255,255,0.07);
}
[data-bs-theme="dark"] .form-control option,
[data-bs-theme="dark"] .form-select option,
[data-bs-theme="dark"] select option {
    background: #1e1c1a;
    color: #e8e0d4;
}
[data-bs-theme="dark"] .form-control::placeholder { color: rgba(255,255,255,0.35); }
[data-bs-theme="dark"] label { color: rgba(255,255,255,0.7); }
[data-bs-theme="dark"] .filter-card-body label {
    color: rgba(255,255,255,0.6);
    font-family: 'Montserrat', sans-serif;
}
[data-bs-theme="dark"] .input-group-text,
[data-bs-theme="dark"] .input-group-addon {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
    color: #e8e0d4;
}

/* ========== ACTION SELECTS ========== */
[data-bs-theme="dark"] .action-select {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: #e8e0d4;
    border-radius: 6px;
}
[data-bs-theme="dark"] .action-select option { background: #1e1c1a; color: #e8e0d4; }
[data-bs-theme="dark"] .action-select:focus {
    border-color: rgba(218,165,32,0.4);
    outline: none;
    box-shadow: 0 0 0 2px rgba(218,165,32,0.15);
}

/* ========== TABLES ========== */
[data-bs-theme="dark"] .table { color: #e8e0d4; }
[data-bs-theme="dark"] .table thead th {
    font-family: 'Montserrat', sans-serif;
    color: #daa520;
    background: rgba(184,134,11,0.06);
    border-bottom: 1px solid rgba(184,134,11,0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
[data-bs-theme="dark"] .table tbody td {
    color: rgba(255,255,255,0.85);
    border-top: 1px solid rgba(255,255,255,0.04);
}
[data-bs-theme="dark"] .table tbody tr:hover td {
    background-color: rgba(184,134,11,0.06);
}

/* DataTables specific */
[data-bs-theme="dark"] table.dataTable { background-color: transparent !important; }
[data-bs-theme="dark"] table.dataTable tbody td { background-color: inherit !important; border-left: none; border-right: none; }
[data-bs-theme="dark"] table.dataTable tbody tr { background-color: transparent !important; }
[data-bs-theme="dark"] table.dataTable tbody tr.odd,
[data-bs-theme="dark"] table.dataTable.stripe tbody tr.odd { background-color: rgba(255,255,255,0.02) !important; }
[data-bs-theme="dark"] table.dataTable tbody tr.even,
[data-bs-theme="dark"] table.dataTable.stripe tbody tr.even { background-color: transparent !important; }
[data-bs-theme="dark"] table.dataTable tbody tr:hover,
[data-bs-theme="dark"] table.dataTable.hover tbody tr:hover,
[data-bs-theme="dark"] table.dataTable tbody tr.odd:hover,
[data-bs-theme="dark"] table.dataTable tbody tr.even:hover { background-color: rgba(184,134,11,0.06) !important; }
[data-bs-theme="dark"] table.dataTable thead th,
[data-bs-theme="dark"] table.dataTable thead td { border-bottom: 1px solid rgba(184,134,11,0.2) !important; background-color: rgba(184,134,11,0.06) !important; }
[data-bs-theme="dark"] table.dataTable.no-footer { border-bottom: 1px solid rgba(255,255,255,0.06) !important; }
[data-bs-theme="dark"] table.dataTable tfoot th,
[data-bs-theme="dark"] table.dataTable tfoot td { border-top: 1px solid rgba(255,255,255,0.06) !important; }
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_scrollBody { background: transparent !important; }
[data-bs-theme="dark"] table.dataTable.row-border tbody th,
[data-bs-theme="dark"] table.dataTable.row-border tbody td,
[data-bs-theme="dark"] table.dataTable.display tbody th,
[data-bs-theme="dark"] table.dataTable.display tbody td { border-top: 1px solid rgba(255,255,255,0.04) !important; }
[data-bs-theme="dark"] table.dataTable.order-column tbody tr > .sorting_1,
[data-bs-theme="dark"] table.dataTable.order-column tbody tr > .sorting_2,
[data-bs-theme="dark"] table.dataTable.order-column tbody tr > .sorting_3,
[data-bs-theme="dark"] table.dataTable.display tbody tr > .sorting_1,
[data-bs-theme="dark"] table.dataTable.display tbody tr > .sorting_2,
[data-bs-theme="dark"] table.dataTable.display tbody tr > .sorting_3 { background-color: transparent !important; }
[data-bs-theme="dark"] table.dataTable.display tbody tr.odd > .sorting_1,
[data-bs-theme="dark"] table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 { background-color: rgba(255,255,255,0.02) !important; }
[data-bs-theme="dark"] table.dataTable.display tbody tr.even > .sorting_1,
[data-bs-theme="dark"] table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { background-color: transparent !important; }
[data-bs-theme="dark"] table.dataTable.display tbody tr:hover > .sorting_1,
[data-bs-theme="dark"] table.dataTable.order-column.stripe tbody tr:hover > .sorting_1 { background-color: rgba(184,134,11,0.06) !important; }

/* DataTables sort arrows */
[data-bs-theme="dark"] .dataTable th.sorting,
[data-bs-theme="dark"] .dataTable th.sorting_asc,
[data-bs-theme="dark"] .dataTable th.sorting_desc { background-image: none !important; }
[data-bs-theme="dark"] .dataTable th.sorting:after { content: "\21C5"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 11px; opacity: 0.3; color: #daa520; }
[data-bs-theme="dark"] .dataTable th.sorting_asc:after { content: "\2191"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 11px; opacity: 0.9; color: #daa520; }
[data-bs-theme="dark"] .dataTable th.sorting_desc:after { content: "\2193"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 11px; opacity: 0.9; color: #daa520; }

/* DataTables UI elements */
[data-bs-theme="dark"] .dataTables_wrapper { background: transparent; }
[data-bs-theme="dark"] .dataTables_info { color: rgba(255,255,255,0.5); font-size: 12px; font-family: 'Montserrat', sans-serif; }
[data-bs-theme="dark"] .dataTables_length label { color: rgba(255,255,255,0.5); font-size: 12px; font-family: 'Montserrat', sans-serif; }
[data-bs-theme="dark"] .dataTables_length select {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    color: #e8e0d4; border-radius: 6px; padding: 3px 6px;
}
[data-bs-theme="dark"] .dataTables_length select option { background: #1e1c1a; color: #e8e0d4; }
[data-bs-theme="dark"] .dataTables_filter label { color: rgba(255,255,255,0.5); font-size: 12px; font-family: 'Montserrat', sans-serif; }
[data-bs-theme="dark"] .dataTables_filter input {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    color: #e8e0d4; border-radius: 6px; padding: 4px 8px;
}
[data-bs-theme="dark"] .dataTables_filter input:focus { border-color: rgba(218,165,32,0.4); box-shadow: 0 0 0 2px rgba(218,165,32,0.15); outline: none; }
[data-bs-theme="dark"] .dataTables_paginate { font-family: 'Montserrat', sans-serif; }
[data-bs-theme="dark"] .dataTables_paginate .paginate_button {
    background: transparent !important; color: rgba(255,255,255,0.5) !important;
    border: 1px solid rgba(255,255,255,0.1) !important; border-radius: 6px !important; margin: 0 2px;
}
[data-bs-theme="dark"] .dataTables_paginate .paginate_button:hover {
    background: rgba(218,165,32,0.15) !important; color: #daa520 !important;
    border-color: rgba(218,165,32,0.3) !important;
}
[data-bs-theme="dark"] .dataTables_paginate .paginate_button.current {
    background: rgba(218,165,32,0.15) !important; color: #daa520 !important;
    border-color: rgba(218,165,32,0.3) !important; font-weight: 700;
}
[data-bs-theme="dark"] .dataTables_paginate .paginate_button.disabled {
    color: rgba(255,255,255,0.2) !important;
}

/* ========== MODALS ========== */
[data-bs-theme="dark"] .modal-content {
    border-radius: 16px;
    background: #1e1c1a;
    border: 1px solid rgba(184,134,11,0.2);
    color: #e8e0d4;
}
[data-bs-theme="dark"] .modal-header {
    background: rgba(184,134,11,0.1);
    color: #daa520;
    border-bottom: 1px solid rgba(184,134,11,0.15);
}
[data-bs-theme="dark"] .modal-title { font-family: 'Montserrat', sans-serif; font-weight: 700; color: #daa520; }
[data-bs-theme="dark"] .modal-body { color: #e8e0d4; }
[data-bs-theme="dark"] .modal-body label { color: rgba(255,255,255,0.7); }
[data-bs-theme="dark"] .modal-body .text-muted { color: rgba(255,255,255,0.4) !important; }
[data-bs-theme="dark"] .modal-footer { border-top: 1px solid rgba(255,255,255,0.06); }
[data-bs-theme="dark"] .modal-footer .btn-secondary,
[data-bs-theme="dark"] .modal-footer .btn-default {
    background: transparent; color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.15); border-radius: 8px;
}
[data-bs-theme="dark"] .modal-footer .btn-secondary:hover,
[data-bs-theme="dark"] .modal-footer .btn-default:hover {
    background: rgba(255,255,255,0.05); color: #e8e0d4; border-color: rgba(255,255,255,0.25);
}
[data-bs-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* ========== DETAIL ROWS ========== */
[data-bs-theme="dark"] .detail-row {
    border-bottom-color: rgba(255,255,255,0.05);
}
[data-bs-theme="dark"] .detail-label {
    color: rgba(255,255,255,0.6);
    font-family: 'Montserrat', sans-serif;
}
[data-bs-theme="dark"] .detail-value { color: #e8e0d4; }

/* ========== TAGS ========== */
[data-bs-theme="dark"] .content-tag {
    background: rgba(218,165,32,0.15);
    color: #daa520;
    border: 1px solid rgba(218,165,32,0.2);
}
[data-bs-theme="dark"] .flavor-tag {
    background: rgba(26,82,118,0.4);
    color: #8bb8e8;
}

/* ========== TOOLTIPS ========== */
[data-bs-theme="dark"] #brandTooltip,
[data-bs-theme="dark"] #blendTooltip {
    background: #1a1610;
    border: 1px solid rgba(218,165,32,0.2);
    color: #e8e0d4;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
[data-bs-theme="dark"] #brandTooltip::after { border-color: #1a1610 transparent transparent transparent; }
[data-bs-theme="dark"] #blendTooltip::after { border-color: #1a1610 transparent transparent transparent; }
[data-bs-theme="dark"] #ratingTooltip {
    background: #1a1610;
    border: 1px solid rgba(218,165,32,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
[data-bs-theme="dark"] #ratingTooltip::after { border-color: #1a1610 transparent transparent transparent; }

/* ========== TOTAL SUMMARY BARS ========== */
[data-bs-theme="dark"] .total-summary {
    background: rgba(255,255,255,0.03);
    border-top: 3px solid rgba(218,165,32,0.4);
    color: rgba(255,255,255,0.8);
    font-family: 'Montserrat', sans-serif;
}
[data-bs-theme="dark"] .total-summary strong { color: #daa520; }
[data-bs-theme="dark"] .total-divider { color: rgba(255,255,255,0.15); }

/* ========== ALERTS ========== */
[data-bs-theme="dark"] .alert-info { background: rgba(91,163,217,0.15); border-color: rgba(91,163,217,0.3); color: #e8e0d4; }
[data-bs-theme="dark"] .alert-success { background: rgba(111,207,111,0.15); border-color: rgba(111,207,111,0.3); color: #e8e0d4; }
[data-bs-theme="dark"] .alert-warning { background: rgba(218,165,32,0.15); border-color: rgba(218,165,32,0.3); color: #e8e0d4; }
[data-bs-theme="dark"] .alert-danger { background: rgba(231,76,60,0.15); border-color: rgba(231,76,60,0.3); color: #e8e0d4; }
[data-bs-theme="dark"] .close { color: #e8e0d4; text-shadow: none; }

/* ========== BUTTONS ========== */
/* Gold buttons — ensure dark text on gold bg (overrides global a color) */
[data-bs-theme="dark"] .btn-gold,
[data-bs-theme="dark"] .btn-clear-filters,
[data-bs-theme="dark"] .btn-add-review,
[data-bs-theme="dark"] a.btn-gold,
[data-bs-theme="dark"] a.btn-add-review {
    background: linear-gradient(135deg, #b8860b, #daa520);
    color: #0d0b09;
    border: none;
    font-family: 'Montserrat', sans-serif;
}
[data-bs-theme="dark"] .btn-gold:hover,
[data-bs-theme="dark"] .btn-clear-filters:hover,
[data-bs-theme="dark"] .btn-add-review:hover,
[data-bs-theme="dark"] a.btn-gold:hover,
[data-bs-theme="dark"] a.btn-add-review:hover {
    background: linear-gradient(135deg, #daa520, #f0c040);
    color: #0d0b09;
}
/* Secondary / default / cancel buttons */
[data-bs-theme="dark"] .btn-default,
[data-bs-theme="dark"] .btn-cancel,
[data-bs-theme="dark"] .btn-back {
    background: transparent;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
}
[data-bs-theme="dark"] .btn-default:hover,
[data-bs-theme="dark"] .btn-cancel:hover,
[data-bs-theme="dark"] .btn-back:hover {
    background: rgba(255,255,255,0.05);
    color: #e8e0d4;
    border-color: rgba(255,255,255,0.25);
}
/* Gold outline button */
[data-bs-theme="dark"] .btn-gold-outline {
    color: #daa520;
    border-color: rgba(218,165,32,0.4);
    background: transparent;
}
[data-bs-theme="dark"] .btn-gold-outline:hover {
    background: rgba(218,165,32,0.15);
    color: #f0c040;
    border-color: rgba(218,165,32,0.5);
}

/* ========== PIPE CARDS ========== */
[data-bs-theme="dark"] .pipe-card {
    background: linear-gradient(135deg, #1e1c1a 0%, #252218 100%);
    border: 1px solid rgba(184,134,11,0.12);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
[data-bs-theme="dark"] .pipe-card:hover {
    box-shadow: 0 12px 36px rgba(184,134,11,0.15), 0 4px 16px rgba(0,0,0,0.4);
    border-color: rgba(218,165,32,0.35);
}
[data-bs-theme="dark"] .pipe-card-img-wrap { background: #151310; }
[data-bs-theme="dark"] .pipe-card-title { color: #fff; }
[data-bs-theme="dark"] .pipe-card-detail { color: rgba(255,255,255,0.5); }
[data-bs-theme="dark"] .pipe-card-detail strong { color: rgba(255,255,255,0.7); }
[data-bs-theme="dark"] .pipe-card-shape {
    background: rgba(218,165,32,0.12);
    color: #daa520;
    border: 1px solid rgba(218,165,32,0.2);
}
[data-bs-theme="dark"] .pipe-card-footer {
    background: rgba(0,0,0,0.15);
    border-top: 1px solid rgba(255,255,255,0.04);
}
[data-bs-theme="dark"] .btn-card-view {
    background: linear-gradient(135deg, #b8860b, #daa520);
    color: #0d0b09;
}
[data-bs-theme="dark"] .btn-card-update {
    background: transparent;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.12);
}
[data-bs-theme="dark"] .btn-card-update:hover {
    background: rgba(218,165,32,0.15);
    color: #daa520;
    border-color: rgba(218,165,32,0.3);
}

/* ========== NOTES / QUOTE BLOCKS ========== */
[data-bs-theme="dark"] .notes-block,
[data-bs-theme="dark"] .info-box,
[data-bs-theme="dark"] blockquote {
    background: rgba(255,255,255,0.03);
    border-left-color: #b8860b;
    color: #e8e0d4;
}

/* ========== SHAPE FILTER BOX ========== */
[data-bs-theme="dark"] .shape-filter-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 4px solid #daa520;
}
[data-bs-theme="dark"] .shape-filter-box h5 { color: #daa520; }
[data-bs-theme="dark"] .shape-checkboxes label { color: rgba(255,255,255,0.75); }

/* ========== SORT / SEARCH SECTIONS ========== */
[data-bs-theme="dark"] .sort-search-section label {
    color: rgba(255,255,255,0.6);
    font-family: 'Montserrat', sans-serif;
}
[data-bs-theme="dark"] .search-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: #e8e0d4;
}
[data-bs-theme="dark"] .search-input::placeholder { color: rgba(255,255,255,0.35); }
[data-bs-theme="dark"] .search-input:focus {
    border-color: rgba(218,165,32,0.4);
    box-shadow: 0 0 0 2px rgba(218,165,32,0.15);
    background: rgba(255,255,255,0.07);
}

/* ========== RATING BARS / PROGRESS ========== */
[data-bs-theme="dark"] .progress {
    background-color: rgba(255,255,255,0.08);
}
[data-bs-theme="dark"] .rating-bar-label {
    color: rgba(255,255,255,0.7);
}

/* ========== FOOTERS ========== */
[data-bs-theme="dark"] .pipe-footer,
[data-bs-theme="dark"] .cellar-footer,
[data-bs-theme="dark"] .site-footer,
[data-bs-theme="dark"] .dash-footer {
    background: transparent;
    color: rgba(255,255,255,0.4);
    border-top: 1px solid rgba(255,255,255,0.06);
    font-family: 'Montserrat', sans-serif;
}
[data-bs-theme="dark"] .pipe-footer a,
[data-bs-theme="dark"] .cellar-footer a,
[data-bs-theme="dark"] .site-footer a,
[data-bs-theme="dark"] .dash-footer a { color: #b8860b; }
[data-bs-theme="dark"] .pipe-footer a:hover,
[data-bs-theme="dark"] .cellar-footer a:hover,
[data-bs-theme="dark"] .site-footer a:hover,
[data-bs-theme="dark"] .dash-footer a:hover { color: #daa520; }

/* ========== BACK TO TOP ========== */
[data-bs-theme="dark"] .back-to-top {
    background: linear-gradient(135deg, #b8860b, #daa520);
    box-shadow: 0 3px 12px rgba(184,134,11,0.3);
}
[data-bs-theme="dark"] .back-to-top:hover {
    background: linear-gradient(135deg, #daa520, #f0c040);
    box-shadow: 0 5px 15px rgba(184,134,11,0.4);
}

/* ========== EMPTY STATES ========== */
[data-bs-theme="dark"] .empty-state p { color: rgba(255,255,255,0.5); }
[data-bs-theme="dark"] .empty-state .bi { color: rgba(218,165,32,0.3); }

/* ========== UPDATE BANNER ========== */
[data-bs-theme="dark"] .update-banner {
    background: linear-gradient(135deg, #1e1c1a 0%, #252218 100%);
    border-left-color: #b8860b;
    color: #e8e0d4;
    border: 1px solid rgba(184,134,11,0.15);
}

/* ========== PREMIUM BANNER ========== */
[data-bs-theme="dark"] .premium-banner {
    background: linear-gradient(135deg, rgba(184,134,11,0.06), rgba(184,134,11,0.02));
    border: 1px solid rgba(184,134,11,0.1);
}

/* ========== CHOSEN.JS DROPDOWNS ========== */
[data-bs-theme="dark"] .chosen-container-single .chosen-single {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: #e8e0d4;
    box-shadow: none;
}
[data-bs-theme="dark"] .chosen-container .chosen-drop {
    background: #1e1c1a;
    border: 1px solid rgba(218,165,32,0.2);
}
[data-bs-theme="dark"] .chosen-container .chosen-results li {
    color: #e8e0d4;
}
[data-bs-theme="dark"] .chosen-container .chosen-results li.highlighted {
    background: rgba(218,165,32,0.15);
    color: #daa520;
}
[data-bs-theme="dark"] .chosen-container .chosen-results li.active-result:hover {
    background: rgba(218,165,32,0.15);
    color: #daa520;
}
[data-bs-theme="dark"] .chosen-container-single .chosen-search input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: #e8e0d4;
}

/* ========== HELP PAGE SPECIFICS ========== */
[data-bs-theme="dark"] .help-sidebar {
    background: linear-gradient(135deg, #1e1c1a 0%, #252218 100%);
    border: 1px solid rgba(184,134,11,0.15);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
[data-bs-theme="dark"] .help-sidebar h4 { color: #daa520; border-bottom-color: #b8860b; }
[data-bs-theme="dark"] .help-sidebar .nav > li > a { color: rgba(255,255,255,0.6); }
[data-bs-theme="dark"] .help-sidebar .nav > li > a:hover { background: rgba(218,165,32,0.1); color: #daa520; }
[data-bs-theme="dark"] .help-sidebar .nav > li.active > a { background: rgba(184,134,11,0.12); color: #daa520; }
[data-bs-theme="dark"] .help-content {
    background: linear-gradient(135deg, #1e1c1a 0%, #252218 100%);
    border: 1px solid rgba(184,134,11,0.15);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    color: #e8e0d4;
}
[data-bs-theme="dark"] .section-header { color: #daa520; border-bottom-color: rgba(218,165,32,0.3); }
[data-bs-theme="dark"] .feature-card {
    background: rgba(255,255,255,0.03); border-left-color: #b8860b;
}
[data-bs-theme="dark"] .feature-card h4 { color: #e8e0d4; }
[data-bs-theme="dark"] .feature-card p { color: rgba(255,255,255,0.7); }
[data-bs-theme="dark"] .tip-box { background: rgba(218,165,32,0.1); border-left-color: #daa520; color: #e8e0d4; }
[data-bs-theme="dark"] .info-box { background: rgba(91,192,222,0.1); border-left-color: #5bc0de; color: #e8e0d4; }
[data-bs-theme="dark"] .release-card {
    background: linear-gradient(135deg, #1e1c1a 0%, #252218 100%);
    border: 1px solid rgba(184,134,11,0.15);
}
[data-bs-theme="dark"] .release-card-header { background: rgba(184,134,11,0.15); }
[data-bs-theme="dark"] .release-card-header.minor { background: rgba(255,255,255,0.08); }
[data-bs-theme="dark"] .release-card-header.legacy { background: rgba(255,255,255,0.05); }
[data-bs-theme="dark"] .release-card-body { color: #e8e0d4; }
[data-bs-theme="dark"] .release-item {
    border-bottom-color: rgba(255,255,255,0.05);
    color: #e8e0d4;
}
[data-bs-theme="dark"] .release-badge-new { background: rgba(111,207,111,0.2); color: #8fffb0; }
[data-bs-theme="dark"] .release-badge-fix { background: rgba(231,76,60,0.2); color: #ff8a80; }
[data-bs-theme="dark"] .release-badge-update { background: rgba(91,163,217,0.2); color: #8bbde8; }
[data-bs-theme="dark"] .video-list a {
    background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.06); color: #e8e0d4;
}
[data-bs-theme="dark"] .video-list a:hover {
    background: rgba(218,165,32,0.1); border-color: rgba(218,165,32,0.3); color: #daa520;
}
[data-bs-theme="dark"] .quick-start-item h5 { color: #e8e0d4; }
[data-bs-theme="dark"] .quick-start-item p { color: rgba(255,255,255,0.5); }
[data-bs-theme="dark"] .faq-question { color: #daa520; }
[data-bs-theme="dark"] .faq-answer { color: #e8e0d4; }
[data-bs-theme="dark"] .issue-item { color: #e8e0d4; border-bottom-color: rgba(255,255,255,0.05); }
[data-bs-theme="dark"] code {
    background: rgba(218,165,32,0.1);
    color: #daa520;
}
[data-bs-theme="dark"] pre {
    background: #151310;
    color: #e8e0d4;
    border: 1px solid rgba(255,255,255,0.08);
}

/* ========== SUBSCRIBE/PRICING PAGE ========== */
[data-bs-theme="dark"] .pricing-card {
    background: linear-gradient(135deg, #1e1c1a 0%, #252218 100%);
    border: 1px solid rgba(184,134,11,0.15);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
[data-bs-theme="dark"] .pricing-features li {
    color: rgba(255,255,255,0.7);
    border-bottom-color: rgba(255,255,255,0.05);
}

/* ========== PROFILE PAGE SPECIFICS ========== */
[data-bs-theme="dark"] .info-row { border-bottom-color: rgba(255,255,255,0.05); }
[data-bs-theme="dark"] .info-row .info-label { color: rgba(255,255,255,0.6); }
[data-bs-theme="dark"] .info-row .info-value { color: #e8e0d4; }
[data-bs-theme="dark"] .info-row .info-value .not-set { color: rgba(255,255,255,0.35); }
[data-bs-theme="dark"] .pref-row { border-bottom-color: rgba(255,255,255,0.05); }
[data-bs-theme="dark"] .pref-row .pref-label { color: rgba(255,255,255,0.7); }
[data-bs-theme="dark"] .pref-row .pref-label small { color: rgba(255,255,255,0.4); }
[data-bs-theme="dark"] .pref-row select {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); color: #e8e0d4;
}
[data-bs-theme="dark"] .pref-row select:focus {
    border-color: rgba(218,165,32,0.4); box-shadow: 0 0 0 2px rgba(218,165,32,0.15);
}
[data-bs-theme="dark"] .pref-row select option { background: #1e1c1a; color: #e8e0d4; }
[data-bs-theme="dark"] .security-item { border-bottom-color: rgba(255,255,255,0.05); }
[data-bs-theme="dark"] .security-item .sec-info h5 { color: #e8e0d4; }
[data-bs-theme="dark"] .security-item .sec-info p { color: rgba(255,255,255,0.5); }
[data-bs-theme="dark"] .toggle-track.off { background: rgba(255,255,255,0.15); }
[data-bs-theme="dark"] .data-action-card { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.06); }
[data-bs-theme="dark"] .data-action-card:hover { border-color: rgba(218,165,32,0.3); background: rgba(218,165,32,0.04); }
[data-bs-theme="dark"] .data-action-card h4 { color: #e8e0d4; }
[data-bs-theme="dark"] .data-action-card p { color: rgba(255,255,255,0.5); }
[data-bs-theme="dark"] .avatar-upload-form { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.06); }
[data-bs-theme="dark"] .avatar-upload-form input[type="file"],
[data-bs-theme="dark"] .avatar-upload-form input[type="text"] { border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); color: #e8e0d4; }
[data-bs-theme="dark"] .avatar-upload-form .or-divider { color: rgba(255,255,255,0.35); }
[data-bs-theme="dark"] .sub-status-badge.free-tier { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); }
[data-bs-theme="dark"] .sub-plan-label { color: #e8e0d4; }
[data-bs-theme="dark"] .sub-upgrade-cta { background: linear-gradient(135deg, #1a1610, #252218); border: 1px solid rgba(184,134,11,0.15); }
[data-bs-theme="dark"] .btn-cancel-sub { color: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.15); }
[data-bs-theme="dark"] .btn-cancel-sub:hover { color: #e74c3c; border-color: #e74c3c; }
[data-bs-theme="dark"] .btn-outline { background: transparent; color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.15); }
[data-bs-theme="dark"] .btn-outline:hover { border-color: rgba(218,165,32,0.4); color: #daa520; }
[data-bs-theme="dark"] .btn-danger-soft { color: #e74c3c; border-color: rgba(231,76,60,0.4); background: transparent; }
[data-bs-theme="dark"] .btn-danger-soft:hover { background: rgba(231,76,60,0.15); color: #ff6b5a; border-color: rgba(231,76,60,0.5); }
[data-bs-theme="dark"] .badge-item .badge-label { color: rgba(255,255,255,0.5); }
[data-bs-theme="dark"] .no-badges-msg { color: rgba(255,255,255,0.35); }
[data-bs-theme="dark"] .profile-footer { color: rgba(255,255,255,0.4); border-top-color: rgba(255,255,255,0.06); }
[data-bs-theme="dark"] .form-row label { color: rgba(255,255,255,0.7); }

/* ========== CLICKABLE TABLE ROWS ========== */
[data-bs-theme="dark"] tbody tr[data-tobacco-id]:hover td,
[data-bs-theme="dark"] tbody tr[data-pipe-id]:hover td {
    background-color: rgba(184,134,11,0.08) !important;
}

/* ========== BRAND / BLEND LINKS IN TABLES ========== */
[data-bs-theme="dark"] .brand-tip,
[data-bs-theme="dark"] .blend-tip {
    color: #daa520;
    border-bottom: 1px dotted rgba(218,165,32,0.4);
}

/* ========== STATUS BADGES ========== */
[data-bs-theme="dark"] .badge-ready { background: rgba(92,184,92,0.25); color: #8fffb0; }
[data-bs-theme="dark"] .badge-resting { background: rgba(184,134,11,0.3); color: #f0c040; }

/* ========== MISC ========== */
[data-bs-theme="dark"] .text-muted { color: rgba(255,255,255,0.4) !important; }
[data-bs-theme="dark"] hr { border-color: rgba(255,255,255,0.06); }
[data-bs-theme="dark"] .card { background: #1e1c1a; border-color: rgba(184,134,11,0.15); color: #e8e0d4; }
[data-bs-theme="dark"] .card-header { background: rgba(184,134,11,0.1); color: #daa520; border-bottom-color: rgba(184,134,11,0.15); }
[data-bs-theme="dark"] .card-body { color: #e8e0d4; }
[data-bs-theme="dark"] .list-group-item { background: #1e1c1a; border-color: rgba(255,255,255,0.06); color: #e8e0d4; }
[data-bs-theme="dark"] .breadcrumb { background: rgba(255,255,255,0.03); }
[data-bs-theme="dark"] .breadcrumb-item a { color: #daa520; }
[data-bs-theme="dark"] .breadcrumb-item.active { color: rgba(255,255,255,0.5); }
[data-bs-theme="dark"] .page-link {
    background: transparent;
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
}
[data-bs-theme="dark"] .page-link:hover {
    background: rgba(218,165,32,0.15);
    color: #daa520;
    border-color: rgba(218,165,32,0.3);
}
[data-bs-theme="dark"] .page-item.active .page-link {
    background: rgba(218,165,32,0.15);
    border-color: rgba(218,165,32,0.3);
    color: #daa520;
}

/* ========== REVIEW PAGE SPECIFICS ========== */
[data-bs-theme="dark"] .review-panel {
    background: linear-gradient(135deg, #1e1c1a 0%, #252218 100%);
    border: 1px solid rgba(184,134,11,0.15);
}

/* ========== SCROLLBAR ========== */
[data-bs-theme="dark"] ::-webkit-scrollbar { width: 8px; height: 8px; }
[data-bs-theme="dark"] ::-webkit-scrollbar-track { background: #0d0b09; }
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(218,165,32,0.3); border-radius: 4px; }
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(218,165,32,0.5); }

/* ========== SELECTION ========== */
[data-bs-theme="dark"] ::selection { background: rgba(218,165,32,0.3); color: #fff; }
[data-bs-theme="dark"] ::-moz-selection { background: rgba(218,165,32,0.3); color: #fff; }

/* ========== BANNERS ========== */
[data-bs-theme="dark"] .banner-centered img { opacity: 0.85; }

/* ========== TOTALS TEXT ========== */
[data-bs-theme="dark"] .pipes-totals {
    color: rgba(255,255,255,0.5);
    font-family: 'Montserrat', sans-serif;
}
[data-bs-theme="dark"] .pipes-totals strong { color: #daa520; }

/* ========== PANEL HEADS (blue #2b2d42 → gold tint) ========== */
/* All pages use .panel-head with background: #2b2d42 — override globally */
[data-bs-theme="dark"] .tobacco-panel .panel-head,
[data-bs-theme="dark"] .table-panel .panel-head,
[data-bs-theme="dark"] .wish-panel .panel-head,
[data-bs-theme="dark"] .pipe-panel .panel-head,
[data-bs-theme="dark"] .pipes-panel .panel-head,
[data-bs-theme="dark"] .sidebar-card .panel-head,
[data-bs-theme="dark"] .review-panel .panel-head,
[data-bs-theme="dark"] .profile-panel .panel-head {
    background: rgba(184,134,11,0.1);
    color: #daa520;
    border-bottom: 1px solid rgba(184,134,11,0.15);
}
[data-bs-theme="dark"] .tobacco-panel .panel-head .bi,
[data-bs-theme="dark"] .table-panel .panel-head .bi,
[data-bs-theme="dark"] .wish-panel .panel-head .bi,
[data-bs-theme="dark"] .pipe-panel .panel-head .bi,
[data-bs-theme="dark"] .pipes-panel .panel-head .bi,
[data-bs-theme="dark"] .review-panel .panel-head .bi,
[data-bs-theme="dark"] .profile-panel .panel-head .bi { opacity: 1; color: #f0c040; }
[data-bs-theme="dark"] .tobacco-panel .panel-head .panel-badge {
    background: rgba(218,165,32,0.2); color: #daa520;
}

/* ========== CELLAR NAV PILLS (sub-page navigation) ========== */
[data-bs-theme="dark"] .cellar-nav a {
    background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6);
}
[data-bs-theme="dark"] .cellar-nav a:hover {
    background: rgba(218,165,32,0.15); border-color: rgba(218,165,32,0.3); color: #daa520;
}
[data-bs-theme="dark"] .cellar-nav a.active {
    background: linear-gradient(135deg, #b8860b, #daa520); color: #0d0b09; border-color: #b8860b;
}
[data-bs-theme="dark"] .cellar-nav a.active:hover {
    background: linear-gradient(135deg, #daa520, #f0c040); color: #0d0b09;
}

/* ========== ACTION BUTTONS (table rows) ========== */
[data-bs-theme="dark"] .action-btn {
    background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.12); color: rgba(255,255,255,0.6);
}
[data-bs-theme="dark"] .action-btn:hover {
    background: rgba(218,165,32,0.15); color: #daa520; border-color: rgba(218,165,32,0.3);
}
[data-bs-theme="dark"] .action-btn.action-delete { border-color: rgba(231,76,60,0.4); color: #e74c3c; }
[data-bs-theme="dark"] .action-btn.action-delete:hover { background: rgba(231,76,60,0.15); color: #ff6b5a; }

/* ========== ACTION LINKS (reviews table) ========== */
[data-bs-theme="dark"] .action-link-danger { color: #e74c3c; }
[data-bs-theme="dark"] .action-link-danger:hover { color: #ff6b5a; }
[data-bs-theme="dark"] .action-sep { color: rgba(255,255,255,0.2); }

/* ========== SUMMARY ROW (bottom of tables) ========== */
[data-bs-theme="dark"] .summary-row {
    background: rgba(255,255,255,0.03); border-top-color: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6);
}
[data-bs-theme="dark"] .summary-row strong { color: #e8e0d4; }
[data-bs-theme="dark"] .summary-row .summary-value { color: #daa520; }

/* ========== TABLE ROW BACKGROUNDS (page-specific IDs) ========== */
/* These inline styles use ID selectors with !important — we need higher specificity */
[data-bs-theme="dark"] #DataTable tbody td,
[data-bs-theme="dark"] #DataTable2 tbody td,
[data-bs-theme="dark"] #reviewsTable tbody td { color: #e8e0d4; }
[data-bs-theme="dark"] #DataTable thead th,
[data-bs-theme="dark"] #DataTable2 thead th,
[data-bs-theme="dark"] #reviewsTable thead th {
    background: rgba(184,134,11,0.06) !important; color: #daa520 !important;
    border-bottom: 1px solid rgba(184,134,11,0.2) !important;
}
[data-bs-theme="dark"] #DataTable tbody tr:nth-child(odd) td,
[data-bs-theme="dark"] #DataTable2 tbody tr:nth-child(odd) td,
[data-bs-theme="dark"] #reviewsTable tbody tr:nth-child(odd) td { background-color: rgba(255,255,255,0.02) !important; }
[data-bs-theme="dark"] #DataTable tbody tr:nth-child(even) td,
[data-bs-theme="dark"] #DataTable2 tbody tr:nth-child(even) td,
[data-bs-theme="dark"] #reviewsTable tbody tr:nth-child(even) td { background-color: transparent !important; }
[data-bs-theme="dark"] #DataTable tbody tr:hover td,
[data-bs-theme="dark"] #DataTable2 tbody tr:hover td,
[data-bs-theme="dark"] #reviewsTable tbody tr:hover td { background-color: rgba(184,134,11,0.06) !important; }

/* ========== SMOKING LOG TABLE ========== */
[data-bs-theme="dark"] .log-table tbody td { color: #e8e0d4; }
[data-bs-theme="dark"] .log-table tbody tr:nth-child(odd) td { background-color: rgba(255,255,255,0.02) !important; }
[data-bs-theme="dark"] .log-table tbody tr:nth-child(even) td { background-color: transparent !important; }
[data-bs-theme="dark"] .log-table tbody tr:hover td { background-color: rgba(184,134,11,0.06) !important; }
[data-bs-theme="dark"] .log-table .pipe-cell { color: rgba(255,255,255,0.5); }
[data-bs-theme="dark"] .log-table .date-cell .time { color: rgba(255,255,255,0.4); }

/* ========== PIPES PANEL TABLE ========== */
[data-bs-theme="dark"] .pipes-panel .table tbody tr:nth-child(odd) td { background-color: rgba(255,255,255,0.02) !important; }
[data-bs-theme="dark"] .pipes-panel .table tbody tr:nth-child(even) td { background-color: transparent !important; }
[data-bs-theme="dark"] .pipes-panel .table tbody tr:hover td { background-color: rgba(184,134,11,0.06) !important; }

/* ========== DATATABLES PAGINATE OVERRIDE (beats page-specific !important) ========== */
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: transparent !important; color: rgba(255,255,255,0.5) !important;
    border: 1px solid rgba(255,255,255,0.1) !important; border-radius: 6px !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(218,165,32,0.15) !important; color: #daa520 !important;
    border-color: rgba(218,165,32,0.3) !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: rgba(218,165,32,0.15) !important; color: #daa520 !important;
    border-color: rgba(218,165,32,0.3) !important; font-weight: 700;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: rgba(255,255,255,0.2) !important;
}
/* DataTables filter input (page-specific overrides) */
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input {
    background: rgba(255,255,255,0.05) !important; border: 1px solid rgba(255,255,255,0.12) !important;
    color: #e8e0d4 !important; border-radius: 6px !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input:focus {
    border-color: rgba(218,165,32,0.4) !important; box-shadow: 0 0 0 2px rgba(218,165,32,0.15) !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select {
    background: rgba(255,255,255,0.05) !important; border: 1px solid rgba(255,255,255,0.12) !important;
    color: #e8e0d4 !important; border-radius: 6px !important;
}

/* ========== SITE FOOTER (many pages have bg: #fff) ========== */
[data-bs-theme="dark"] .site-footer {
    background: transparent; color: rgba(255,255,255,0.4); border-top-color: rgba(255,255,255,0.06);
}

/* ========== VIEW PIPE / VIEW TOBACCO DETAIL ROWS ========== */
[data-bs-theme="dark"] .pipe-panel .panel-body-inner,
[data-bs-theme="dark"] .tobacco-panel .panel-body-inner,
[data-bs-theme="dark"] .sidebar-card .panel-body-inner { color: #e8e0d4; }
/* Detail row borders and text */
[data-bs-theme="dark"] .detail-row { border-bottom-color: rgba(255,255,255,0.05); }
[data-bs-theme="dark"] .detail-label { color: rgba(255,255,255,0.6); font-family: 'Montserrat', sans-serif; }
[data-bs-theme="dark"] .detail-value { color: #e8e0d4; }
/* Outline action buttons on view pages */
[data-bs-theme="dark"] .btn-outline-delete,
[data-bs-theme="dark"] .btn-outline-danger { background: transparent; color: #e74c3c; border-color: rgba(231,76,60,0.4); }
[data-bs-theme="dark"] .btn-outline-delete:hover,
[data-bs-theme="dark"] .btn-outline-danger:hover { background: rgba(231,76,60,0.15); color: #ff6b5a; }
[data-bs-theme="dark"] .btn-outline-edit,
[data-bs-theme="dark"] .btn-outline-primary { background: transparent; color: #daa520; border-color: rgba(218,165,32,0.4); }
[data-bs-theme="dark"] .btn-outline-edit:hover,
[data-bs-theme="dark"] .btn-outline-primary:hover { background: rgba(218,165,32,0.15); color: #f0c040; }
[data-bs-theme="dark"] .btn-outline-info { background: transparent; color: #5ba3d9; border-color: rgba(91,163,217,0.4); }
[data-bs-theme="dark"] .btn-outline-info:hover { background: rgba(91,163,217,0.15); color: #8bbde8; }

/* ========== PREMIUM BADGES ========== */
[data-bs-theme="dark"] .premium-badge.premium-no { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.4); }

/* ========== REVIEW FOLLOW-UP FORM ========== */
[data-bs-theme="dark"] .followup-add-form { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.06); }

/* ========== SUBSCRIBE/PRICING ========== */
[data-bs-theme="dark"] .premium-status { background: linear-gradient(135deg, #1e1c1a 0%, #252218 100%); border: 1px solid rgba(184,134,11,0.15); color: #e8e0d4; }
[data-bs-theme="dark"] .subscribe-pitch { background: linear-gradient(135deg, #1e1c1a 0%, #252218 100%); border: 1px solid rgba(184,134,11,0.15); color: #e8e0d4; }

/* ========== MODAL CANCEL BUTTONS (page-specific overrides) ========== */
[data-bs-theme="dark"] .btn-cancel { background: transparent; color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.15); }
[data-bs-theme="dark"] .btn-cancel:hover { background: rgba(255,255,255,0.05); color: #e8e0d4; }
[data-bs-theme="dark"] #deleteModal .btn-cancel { background: transparent; color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.15); }

/* ========== GENERIC CATCH-ALL for inline color text ========== */
/* Targets common inline styles like color:#333, color:#555 etc. that are hard to override individually */
[data-bs-theme="dark"] .panel-body-inner { color: #e8e0d4; }
[data-bs-theme="dark"] .panel-body-inner p { color: #e8e0d4; }
[data-bs-theme="dark"] .panel-body-inner small { color: rgba(255,255,255,0.5); }
[data-bs-theme="dark"] .panel-body-inner .text-muted { color: rgba(255,255,255,0.4) !important; }

/* ========== SIDEBAR CARDS (view_pipe, view_tobacco) ========== */
[data-bs-theme="dark"] .sidebar-card .card-head {
    background: rgba(184,134,11,0.1); color: #daa520;
    border-bottom: 1px solid rgba(184,134,11,0.15);
}
[data-bs-theme="dark"] .sidebar-card .card-head .bi { opacity: 1; color: #f0c040; }
[data-bs-theme="dark"] .sidebar-card .card-body { color: #e8e0d4; }
[data-bs-theme="dark"] .sidebar-pipe-img { background: #151310; }
[data-bs-theme="dark"] .sidebar-no-image { background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.35); }
[data-bs-theme="dark"] .sidebar-diagram .legend-text { color: rgba(255,255,255,0.6); }

/* ========== NOTES BOX ========== */
[data-bs-theme="dark"] .notes-box {
    background: rgba(184,134,11,0.06); border-left-color: #b8860b; color: #e8e0d4;
}

/* ========== VIEW PAGE BUTTONS ========== */
[data-bs-theme="dark"] .btn-back {
    background: transparent; color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.15);
}
[data-bs-theme="dark"] .btn-back:hover { background: rgba(255,255,255,0.05); color: #e8e0d4; }
[data-bs-theme="dark"] .btn-delete {
    background: transparent; color: #e74c3c; border-color: rgba(231,76,60,0.4);
}
[data-bs-theme="dark"] .btn-delete:hover { background: rgba(231,76,60,0.15); color: #ff6b5a; }
[data-bs-theme="dark"] .btn-print {
    background: transparent; color: #daa520; border-color: rgba(218,165,32,0.4);
}
[data-bs-theme="dark"] .btn-print:hover { background: rgba(218,165,32,0.15); color: #f0c040; }
[data-bs-theme="dark"] .btn-message {
    background: transparent; color: #5ba3d9; border-color: rgba(91,163,217,0.4);
}
[data-bs-theme="dark"] .btn-message:hover { background: rgba(91,163,217,0.15); color: #8bbde8; }

/* ========== STATUS BADGES (light-bg versions in panel body) ========== */
[data-bs-theme="dark"] .status-badge-ready { background: rgba(92,184,92,0.2); color: #8fffb0; border-color: rgba(92,184,92,0.35); }
[data-bs-theme="dark"] .status-badge-resting { background: rgba(184,134,11,0.2); color: #f0c040; border-color: rgba(184,134,11,0.4); }
[data-bs-theme="dark"] .status-badge-traded,
[data-bs-theme="dark"] .status-badge-given { background: rgba(91,192,222,0.2); color: #8ad4e8; border-color: rgba(91,192,222,0.35); }
[data-bs-theme="dark"] .status-badge-sold,
[data-bs-theme="dark"] .status-badge-lost { background: rgba(150,150,150,0.2); color: #ccc; border-color: rgba(150,150,150,0.35); }
[data-bs-theme="dark"] .status-badge-unsmoked { background: rgba(92,184,92,0.15); color: #a8e6a8; border-color: rgba(92,184,92,0.3); }

/* ========== REVIEW PAGE TEXT ========== */
[data-bs-theme="dark"] .comment-text { color: #e8e0d4; }
[data-bs-theme="dark"] .rating-bar-label { color: rgba(255,255,255,0.7); }
[data-bs-theme="dark"] .followup-text { color: #e8e0d4; }
[data-bs-theme="dark"] .followup-date { color: rgba(255,255,255,0.4); }
[data-bs-theme="dark"] .followup-empty { color: rgba(255,255,255,0.35); }
[data-bs-theme="dark"] .btn-followup {
    background: transparent; color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.15);
}
[data-bs-theme="dark"] .btn-followup:hover { background: rgba(218,165,32,0.15); color: #daa520; border-color: rgba(218,165,32,0.3); }

/* ========== PIPES LIST VIEW TABLE BUTTONS ========== */
[data-bs-theme="dark"] a.btn-pipe-view,
[data-bs-theme="dark"] .btn-pipe-view {
    background: linear-gradient(135deg, #b8860b, #daa520);
    color: #0d0b09;
    border: none;
}
[data-bs-theme="dark"] a.btn-pipe-view:hover,
[data-bs-theme="dark"] .btn-pipe-view:hover {
    background: linear-gradient(135deg, #daa520, #f0c040);
    color: #0d0b09;
}
[data-bs-theme="dark"] a.btn-pipe-update,
[data-bs-theme="dark"] .btn-pipe-update {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.12);
}
[data-bs-theme="dark"] a.btn-pipe-update:hover,
[data-bs-theme="dark"] .btn-pipe-update:hover {
    background: rgba(218,165,32,0.15);
    color: #daa520;
    border-color: rgba(218,165,32,0.3);
}
[data-bs-theme="dark"] a.btn-pipe-delete,
[data-bs-theme="dark"] .btn-pipe-delete {
    background: transparent;
    color: #e74c3c;
    border-color: rgba(231,76,60,0.4);
}
[data-bs-theme="dark"] a.btn-pipe-delete:hover,
[data-bs-theme="dark"] .btn-pipe-delete:hover {
    background: rgba(231,76,60,0.15);
    color: #ff6b5a;
}

/* Pipes panel table borders (override inline #f5f5f5) */
[data-bs-theme="dark"] .pipes-panel .table tbody td {
    border-top-color: rgba(255,255,255,0.04);
}

/* Pipes panel sort arrows (override inline white → gold) */
[data-bs-theme="dark"] .pipes-panel .dataTable th.sorting:after { color: #daa520; }
[data-bs-theme="dark"] .pipes-panel .dataTable th.sorting_asc:after { color: #daa520; }
[data-bs-theme="dark"] .pipes-panel .dataTable th.sorting_desc:after { color: #daa520; }

/* Pipes card view buttons (a tags) */
[data-bs-theme="dark"] a.btn-card-view {
    color: #0d0b09;
}
[data-bs-theme="dark"] a.btn-card-view:hover {
    color: #0d0b09;
}
[data-bs-theme="dark"] a.btn-card-update {
    color: rgba(255,255,255,0.6);
}

/* ========== MODAL HEADER DARK (page-specific #2b2d42) ========== */
[data-bs-theme="dark"] .modal-header-dark {
    background: rgba(184,134,11,0.1);
    border-bottom: 1px solid rgba(184,134,11,0.15);
}

/* ========== HELP PAGE VERSION HEADINGS (inline style="color:#333") ========== */
[data-bs-theme="dark"] .help-content h3 { color: #fff !important; }

/* ========== DELETE MODAL (page-specific) ========== */
[data-bs-theme="dark"] #deleteModal .modal-body { color: #e8e0d4; }
[data-bs-theme="dark"] #deleteModal .modal-footer { border-top-color: rgba(255,255,255,0.06); }

/* ========== SIGNUP PAGE ========== */
[data-bs-theme="dark"] .signup-panel {
    background: linear-gradient(135deg, #1e1c1a 0%, #252218 100%) !important;
    border: 1px solid rgba(184,134,11,0.15);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
[data-bs-theme="dark"] .signup-panel .panel-head {
    background: rgba(184,134,11,0.1) !important;
    color: #daa520;
    border-bottom: 1px solid rgba(184,134,11,0.15);
}
[data-bs-theme="dark"] .signup-panel .panel-body-inner {
    color: #e8e0d4;
}
[data-bs-theme="dark"] .signup-panel .form-row label.form-label {
    color: rgba(255,255,255,0.6) !important;
}
[data-bs-theme="dark"] .signup-panel .form-row .form-control {
    background: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: #e8e0d4 !important;
}
[data-bs-theme="dark"] .signup-panel .form-row .form-control:focus {
    border-color: rgba(218,165,32,0.5) !important;
    box-shadow: 0 0 0 3px rgba(218,165,32,0.15) !important;
}
[data-bs-theme="dark"] .signup-panel .form-row .form-control::placeholder {
    color: rgba(255,255,255,0.3);
}
[data-bs-theme="dark"] .signup-panel .form-row .help-text {
    color: rgba(255,255,255,0.4) !important;
}
[data-bs-theme="dark"] .signup-panel .required-star {
    color: #daa520 !important;
}
[data-bs-theme="dark"] .signup-panel .terms-row {
    color: #e8e0d4;
}
[data-bs-theme="dark"] .signup-panel .terms-row a {
    color: #daa520 !important;
}
[data-bs-theme="dark"] .signup-panel select option {
    background: #1e1c1a;
    color: #e8e0d4;
}

/* Signup hero — already dark gradient, just ensure text is white */
[data-bs-theme="dark"] .signup-hero {
    background: linear-gradient(135deg, #1a1610 0%, #1e1c1a 40%, #2b2519 70%, rgba(184,134,11,0.3) 100%) !important;
    border: 1px solid rgba(184,134,11,0.15);
}

/* Features sidebar */
[data-bs-theme="dark"] .features-sidebar {
    background: linear-gradient(135deg, #1e1c1a 0%, #252218 100%) !important;
    border: 1px solid rgba(184,134,11,0.15);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
[data-bs-theme="dark"] .features-sidebar .sidebar-head {
    background: rgba(184,134,11,0.1) !important;
}
[data-bs-theme="dark"] .features-sidebar .sidebar-head h3 {
    color: #daa520 !important;
}
[data-bs-theme="dark"] .features-sidebar .feature-item h4 {
    color: #fff !important;
}
[data-bs-theme="dark"] .features-sidebar .feature-item p {
    color: rgba(255,255,255,0.5) !important;
}

/* Warning alert */
[data-bs-theme="dark"] .alert-warning-gold {
    background: rgba(218,165,32,0.1) !important;
    border-color: rgba(218,165,32,0.3) !important;
    color: #daa520 !important;
}

/* Back link */
[data-bs-theme="dark"] .back-link {
    color: #daa520;
}
[data-bs-theme="dark"] .back-link:hover {
    color: #f0c040;
}

/* Signup button overrides */
[data-bs-theme="dark"] .btn-gold {
    color: #0d0b09 !important;
}
[data-bs-theme="dark"] .btn-outline-gold {
    color: #daa520 !important;
    border-color: rgba(218,165,32,0.5) !important;
}
[data-bs-theme="dark"] .btn-outline-gold:hover {
    background: rgba(218,165,32,0.15) !important;
    color: #daa520 !important;
}

/* Signup footer */
[data-bs-theme="dark"] .signup-panel p[style*="color: #999"],
[data-bs-theme="dark"] .signup-panel p[style*="color:#999"] {
    color: rgba(255,255,255,0.4) !important;
}

/* Signup / Forgot Password page footer divider */
[data-bs-theme="dark"] div[style*="border-top: 1px solid #e0e0e0"],
[data-bs-theme="dark"] .forgot-footer {
    border-top-color: rgba(255,255,255,0.06) !important;
}
[data-bs-theme="dark"] div[style*="border-top: 1px solid #e0e0e0"] p,
[data-bs-theme="dark"] .forgot-footer p {
    color: rgba(255,255,255,0.3) !important;
}

/* ========== FORGOT PASSWORD PAGE ========== */
[data-bs-theme="dark"] .forgot-hero {
    background: linear-gradient(135deg, #1a1610 0%, #1e1c1a 40%, #2b2519 70%, rgba(184,134,11,0.3) 100%) !important;
    border: 1px solid rgba(184,134,11,0.15);
}
[data-bs-theme="dark"] .forgot-panel {
    background: linear-gradient(135deg, #1e1c1a 0%, #252218 100%) !important;
    border: 1px solid rgba(184,134,11,0.15);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
[data-bs-theme="dark"] .forgot-panel .panel-head {
    background: rgba(184,134,11,0.1) !important;
    color: #daa520;
    border-bottom: 1px solid rgba(184,134,11,0.15);
}
[data-bs-theme="dark"] .forgot-panel .panel-body-inner {
    color: #e8e0d4;
}
[data-bs-theme="dark"] .forgot-panel .form-label {
    color: rgba(255,255,255,0.6) !important;
}
[data-bs-theme="dark"] .forgot-panel .form-control {
    background: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: #e8e0d4 !important;
}
[data-bs-theme="dark"] .forgot-panel .form-control:focus {
    border-color: rgba(218,165,32,0.5) !important;
    box-shadow: 0 0 0 3px rgba(218,165,32,0.15) !important;
}
[data-bs-theme="dark"] .forgot-panel .form-control::placeholder {
    color: rgba(255,255,255,0.3);
}
[data-bs-theme="dark"] .forgot-panel .form-hint {
    color: rgba(255,255,255,0.4) !important;
}
[data-bs-theme="dark"] .forgot-panel p {
    color: rgba(255,255,255,0.5) !important;
}
[data-bs-theme="dark"] .alert-forgot.alert-success-custom {
    background: rgba(74,175,80,0.12) !important;
    border-color: rgba(74,175,80,0.25) !important;
    color: #6fcf6f !important;
}
[data-bs-theme="dark"] .alert-forgot.alert-error-custom {
    background: rgba(218,165,32,0.1) !important;
    border-color: rgba(218,165,32,0.3) !important;
    color: #daa520 !important;
}
