/* =============================================================
   Station Custom Styles – Unified Material Design
   ============================================================= */

a.btn.header-item.noti-icon {
    display: flex;
    align-items: center;
}

/* ── Page Background ───────────────────────────────────────── */
.page-content {
    background: #f4f6fb;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    transition: all 0.15s ease;
}
.btn-sm {
    border-radius: 0.375rem;
    padding: 0.3rem 0.75rem;
}
.btn-primary {
    background: #2c3e50;
    border-color: #2c3e50;
}
.btn-primary:hover,
.btn-primary:focus {
    background: #1a252f;
    border-color: #1a252f;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.3);
}
.btn-dark {
    background: #1e293b;
    border-color: #1e293b;
}
.btn-dark:hover,
.btn-dark:focus {
    background: #0f172a;
    border-color: #0f172a;
}
.btn-outline-secondary {
    border-color: #dee2e6;
    color: #495057;
}
.btn-outline-secondary:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #212529;
}

/* ── Cards – Material Tile ─────────────────────────────────── */
.card {
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.06),
        0 0 1px rgba(0, 0, 0, 0.04);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid #eef0f3;
}
.card .card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
}
.card-h-100 {
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.06),
        0 0 1px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* ── Avatar / Icon – GLOBAL: No backgrounds anywhere ───────── */
.avatar-title {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.avatar-sm,
.avatar-md,
.avatar-lg {
    width: auto !important;
    height: auto !important;
    background: transparent !important;
}
.avatar-sm .avatar-title,
.avatar-md .avatar-title,
.avatar-lg .avatar-title {
    width: auto !important;
    height: auto !important;
    background: transparent !important;
}
.avatar-title i {
    font-size: 26px !important;
}

/* Exceptions: keep round bg for empty-state hero icons & auth pages */
.text-center .avatar-lg .avatar-title,
.text-center .avatar-md .avatar-title,
.auth-page .avatar-title,
[class*="auth-"] .avatar-title {
    background: rgba(44, 62, 80, 0.08) !important;
    border-radius: 50% !important;
    width: 4rem !important;
    height: 4rem !important;
}
.text-center .avatar-lg,
.text-center .avatar-md {
    width: 4rem !important;
    height: 4rem !important;
}
.text-center .avatar-lg .avatar-title i,
.text-center .avatar-md .avatar-title i {
    font-size: 24px !important;
}

/* ── Stat Cards – Uniform Size ─────────────────────────────── */
.card-body.py-3 {
    min-height: 80px;
    display: flex;
    align-items: center;
}
.card-body.py-3 > .d-flex {
    width: 100%;
}
.card-body.py-3 i.bx.flex-shrink-0 {
    font-size: 1.5rem;
}
.card-body.py-3 p.text-muted,
.card-body .text-muted.lh-1 {
    font-size: 0.7rem !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-bottom: 0.25rem !important;
}
.card-body.py-3 h4,
.card-body.py-3 h5,
.card-body h4.mb-1,
.card-body h5.mb-0 {
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.1rem;
}

/* ── Tables – Striped, Clean ───────────────────────────────── */
.table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom-width: 1px;
}
.table thead tr,
.table thead th {
    background-color: #f8f9fc !important;
}
.table td {
    vertical-align: middle;
    font-size: 0.8125rem;
    color: #334155;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 0, 0, 0.015);
}
.table > tbody > tr:hover > * {
    background-color: rgba(44, 62, 80, 0.03);
}
table.dataTable tbody tr:hover {
    background-color: rgba(44, 62, 80, 0.03) !important;
}

/* ── Badges ────────────────────────────────────────────────── */
.badge {
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 0.375rem;
}

/* ── Form Controls ─────────────────────────────────────────── */
.form-control,
.form-select {
    border-radius: 0.5rem;
    border-color: #e2e8f0;
    font-size: 0.8125rem;
}
.form-control:focus,
.form-select:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 0.2rem rgba(148, 163, 184, 0.15);
}
.form-control-sm,
.form-select-sm {
    border-radius: 0.375rem;
}
.form-check-input:checked {
    background-color: #2c3e50;
    border-color: #2c3e50;
}

/* ── Page Titles ───────────────────────────────────────────── */
.page-title-box h4 {
    font-weight: 700;
    color: #1e293b;
}

/* ── Shadows ───────────────────────────────────────────────── */
.shadow-sm {
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.06),
        0 0 1px rgba(0, 0, 0, 0.04) !important;
}

/* ── Channel Cards ─────────────────────────────────────────── */
.channel-card {
    transition: all 0.2s ease;
    border-radius: 0.75rem;
}
.channel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1) !important;
}

/* ── Sync Tab ──────────────────────────────────────────────── */
#sync-jobs-table th {
    font-size: 0.6875rem;
    padding: 0.5rem 0.75rem;
}
#sync-jobs-table td {
    padding: 0.625rem 0.75rem;
}

/* ── Breadcrumbs ───────────────────────────────────────────── */
.breadcrumb-item a {
    color: #64748b;
    text-decoration: none;
}
.breadcrumb-item a:hover {
    color: #2c3e50;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
    border-radius: 0.5rem;
    border: none;
    font-size: 0.8125rem;
}

/* ── Dropdowns ─────────────────────────────────────────────── */
.dropdown-menu {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-size: 0.8125rem;
}
.dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
}
.dropdown-item:hover {
    background: #f1f5f9;
}
.table-responsive {
    overflow: visible !important;
}
.table-responsive .dropdown-menu {
    position: absolute;
    z-index: 1050;
}
.dataTables_wrapper .table-responsive,
.card-body .table-responsive {
    overflow: visible !important;
}

/* ── DataTables ────────────────────────────────────────────── */
.dataTables_wrapper .dataTables_length select {
    border-radius: 0.375rem;
    border-color: #e2e8f0;
    font-size: 0.8125rem;
    padding: 0.25rem 2rem 0.25rem 0.5rem;
}
.dataTables_wrapper .dataTables_filter input {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 0.2rem rgba(148, 163, 184, 0.15);
    outline: none;
}
.dataTables_wrapper .dataTables_info {
    font-size: 0.8125rem;
    color: #64748b;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0.375rem !important;
    margin: 0 2px;
    font-size: 0.8125rem;
    border-color: #e2e8f0 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #2c3e50 !important;
    border-color: #2c3e50 !important;
    color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f1f5f9 !important;
    border-color: #dee2e6 !important;
    color: #1e293b !important;
}
.dataTables_wrapper .dataTables_processing {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
}
table.dataTable thead .sorting:before,
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc:after {
    opacity: 0.3;
}
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:after {
    opacity: 0.8;
}
table.dataTable.no-footer {
    border-bottom: none;
}

/* ── Mapping / Search ──────────────────────────────────────── */
.variant-results {
    position: relative;
    z-index: 1060;
}
.variant-dropdown {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 260px;
    overflow-y: auto;
    z-index: 1070;
}
.variant-dropdown-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.8125rem;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s ease;
}
.variant-dropdown-item:last-child {
    border-bottom: none;
}
.variant-dropdown-item:hover {
    background: #f0f7ff;
}

/* ── Pagination ────────────────────────────────────────────── */
.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 2px;
    font-size: 0.8125rem;
    color: #64748b;
    border-color: #e2e8f0;
}
.pagination .page-item.active .page-link {
    background: #2c3e50;
    border-color: #2c3e50;
}

/* ── Pill Tag Input ────────────────────────────────────────── */
.pill-tag-input {
    background: #fff;
    transition: border-color 0.15s ease;
}
.pill-tag-input:focus-within {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}
.pill-tag .btn-close {
    filter: none;
    opacity: 0.5;
    transition: opacity 0.15s;
}
.pill-tag .btn-close:hover {
    opacity: 1;
}

/* ── Product Form Cards ────────────────────────────────────── */
.row.g-3 > .col-xl-8 > .card + .card,
.row.g-3 > .col-xl-4 > .card + .card,
.row.g-4 > .col-xl-8 > .card + .card,
.row.g-4 > .col-xl-4 > .card + .card {
    margin-top: 0.75rem;
}

/* ── Category Tree ─────────────────────────────────────────── */
.category-indent {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── Sync Job Icons ────────────────────────────────────────── */
.job-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 16px;
    flex-shrink: 0;
}

/* ── Nav Tabs ──────────────────────────────────────────────── */
.nav-tabs-custom .nav-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
}
.nav-tabs-custom .nav-link.active {
    color: #1e293b;
    font-weight: 600;
}

/* ── Filter Buttons ────────────────────────────────────────── */
.financial-filter,
.status-filter,
.filter-btn {
    border-radius: 20px !important;
    padding: 0.25rem 0.875rem !important;
    font-size: 0.75rem !important;
}

/* ── Product filter toolbars ───────────────────────────────── */
.station-filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    align-items: start;
}

.station-filter-block {
    min-width: 0;
}

.station-filter-grid .filter-toolbar-buttons {
    gap: 0.35rem;
}

.station-filter-grid .filter-toolbar-buttons .btn {
    border-radius: 0.25rem !important;
    padding: 0.25rem 0.5rem !important;
    white-space: nowrap;
}

.station-filter-dropdown-toggle {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: calc(1.5em + 0.5rem + 2px);
    overflow: hidden;
    text-align: left;
}

.station-filter-dropdown-toggle::after {
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.station-filter-dropdown-menu {
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.35rem;
}

.station-filter-dropdown-menu .dropdown-item {
    align-items: center;
    border-radius: 0.25rem;
    display: flex;
    min-width: 0;
}

.station-filter-count-badge {
    flex-shrink: 0;
    font-weight: 500;
}

.station-filter-channel-logo {
    flex-shrink: 0;
    height: 20px;
    margin-right: 0.5rem;
    object-fit: contain;
    width: 20px;
}

@media (min-width: 768px) {
    .products-filter-row {
        grid-template-columns: minmax(18rem, 1fr);
    }

    .customers-filter-row {
        grid-template-columns: 1fr;
    }

    .platform-products-filter-row {
        grid-template-columns: minmax(14rem, 1.15fr) minmax(18rem, 1.55fr) minmax(7rem, 0.45fr) minmax(7rem, 0.45fr);
    }

    .channel-listing-filter-row {
        grid-template-columns: minmax(14rem, 1.1fr) minmax(20rem, 1.7fr) minmax(7rem, 0.45fr) minmax(8rem, 0.55fr);
    }

    .platform-customers-filter-row {
        grid-template-columns: minmax(14rem, 1.1fr) minmax(18rem, 1.55fr) minmax(12rem, 0.85fr);
    }

    .channel-customers-filter-row {
        grid-template-columns: minmax(14rem, 1.1fr) minmax(22rem, 1.8fr) minmax(10rem, 0.75fr);
    }
}

@media (min-width: 1200px) {
    .products-filter-row {
        grid-template-columns: minmax(24rem, 1fr);
    }

    .platform-products-filter-row {
        grid-template-columns: minmax(15rem, 1.2fr) minmax(22rem, 1.8fr) minmax(7rem, 0.45fr) minmax(7rem, 0.45fr);
    }

    .channel-listing-filter-row {
        grid-template-columns: minmax(15rem, 1.15fr) minmax(24rem, 2fr) minmax(7rem, 0.45fr) minmax(8rem, 0.55fr);
    }

    .platform-customers-filter-row {
        grid-template-columns: minmax(15rem, 1.15fr) minmax(24rem, 1.9fr) minmax(14rem, 0.95fr);
    }

    .channel-customers-filter-row {
        grid-template-columns: minmax(15rem, 1.15fr) minmax(26rem, 2fr) minmax(11rem, 0.8fr);
    }
}

/* ── Platform / Selection Cards ────────────────────────────── */
.platform-card {
    transition: all 0.15s ease;
}
.platform-card:hover {
    border-color: #94a3b8 !important;
}
.platform-card.border-primary {
    border-color: #2c3e50 !important;
    box-shadow: 0 0 0 1px #2c3e50;
}
.platform-card .avatar-md .avatar-title {
    background: rgba(44, 62, 80, 0.08) !important;
    border-radius: 50% !important;
    width: 3.5rem !important;
    height: 3.5rem !important;
}
.platform-card .avatar-md {
    width: 3.5rem !important;
    height: 3.5rem !important;
}

/* ── Migration progress ────────────────────────────────────── */
.progress {
    border-radius: 4px;
    background: #e9ecef;
}

button#bulk-delete-btn,
button#bulk-clear-btn {
    padding: 0 !important;
    margin: 0 !important;
    height: 21px !important;
    padding-right: 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ── Notification Dropdown Fix ─────────────────────────────── */
#notification-dropdown .dropdown-menu,
#notification-dropdown .dropdown-menu.dropdown-menu-lg {
    width: 320px !important;
    max-width: 320px !important;
    min-width: 320px !important;
    overflow: hidden !important;
    right: 0 !important;
    left: auto !important;
    transform: translate3d(0, 0, 0) !important;
}
#notification-dropdown .notification-item {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    display: block;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
#notification-dropdown .notification-item .d-flex {
    width: 100%;
    overflow: hidden;
}
#notification-dropdown .notification-item h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.35;
    font-size: 12px !important;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
#notification-dropdown .notification-item .flex-grow-1 {
    min-width: 0;
    overflow: hidden;
    width: 0;
    flex: 1;
}
#notification-dropdown .notification-item .flex-shrink-0 {
    flex-shrink: 0;
}
#notification-dropdown .notification-avatar,
#notification-dropdown .notification-avatar .avatar-title {
    width: 32px;
    height: 32px;
}
#notification-dropdown .notification-avatar .avatar-title {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =============================================================
   Dark Mode Overrides
   ============================================================= */
[data-bs-theme="dark"] .page-content {
    background: #1a1d21;
}
[data-bs-theme="dark"] .card {
    background: #212529;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), 0 0 1px rgba(0, 0, 0, 0.15);
}
[data-bs-theme="dark"] .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-bs-theme="dark"] .card .card-title {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .card-h-100 {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), 0 0 1px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-bs-theme="dark"] .card-body.py-3 h4,
[data-bs-theme="dark"] .card-body.py-3 h5,
[data-bs-theme="dark"] .card-body h4.mb-1,
[data-bs-theme="dark"] .card-body h5.mb-0 {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .table th {
    color: #94a3b8;
}
[data-bs-theme="dark"] .table thead tr,
[data-bs-theme="dark"] .table thead th {
    background-color: #1e2328 !important;
}
[data-bs-theme="dark"] .table td {
    color: #cbd5e1;
}
[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.02);
}
[data-bs-theme="dark"] .table > tbody > tr:hover > * {
    background-color: rgba(255, 255, 255, 0.04);
}
[data-bs-theme="dark"] table.dataTable tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
}
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #2b3035;
    border-color: #495057;
    color: #e2e8f0;
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    border-color: #6c757d;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.2);
}
[data-bs-theme="dark"] .dropdown-menu {
    background: #2b3035;
    border-color: #495057;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
[data-bs-theme="dark"] .dropdown-item {
    color: #cbd5e1;
}
[data-bs-theme="dark"] .dropdown-item:hover {
    background: #343a40;
    color: #f8f9fa;
}
[data-bs-theme="dark"] .page-title-box h4 {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .breadcrumb-item a {
    color: #94a3b8;
}
[data-bs-theme="dark"] .breadcrumb-item a:hover {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .nav-tabs-custom .nav-link {
    color: #94a3b8;
}
[data-bs-theme="dark"] .nav-tabs-custom .nav-link.active {
    color: #f8f9fa;
}
[data-bs-theme="dark"] .variant-dropdown {
    background: #2b3035;
    border-color: #495057;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
[data-bs-theme="dark"] .variant-dropdown-item {
    border-bottom-color: #343a40;
}
[data-bs-theme="dark"] .variant-dropdown-item:hover {
    background: #343a40;
}
[data-bs-theme="dark"] .pill-tag-input {
    background: #2b3035;
}
[data-bs-theme="dark"] .progress {
    background: #343a40;
}
[data-bs-theme="dark"] .btn-outline-secondary {
    border-color: #495057;
    color: #adb5bd;
}
[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background: #343a40;
    border-color: #6c757d;
    color: #f8f9fa;
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #495057;
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input {
    background: #2b3035;
    border-color: #495057;
    color: #e2e8f0;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input:focus {
    border-color: #6c757d;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select {
    background: #2b3035;
    border-color: #495057;
    color: #e2e8f0;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_info {
    color: #94a3b8;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-color: #495057 !important;
    color: #adb5bd !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #343a40 !important;
    border-color: #6c757d !important;
    color: #f8f9fa !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_processing {
    background: rgba(33, 37, 41, 0.9);
}
[data-bs-theme="dark"] .pagination .page-link {
    color: #adb5bd;
    border-color: #495057;
    background: #2b3035;
}
[data-bs-theme="dark"] .shadow-sm {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), 0 0 1px rgba(0, 0, 0, 0.15) !important;
}
[data-bs-theme="dark"] .bg-light {
    background-color: #2b3035 !important;
}
[data-bs-theme="dark"] .text-muted {
    color: #8b95a5 !important;
}
[data-bs-theme="dark"] .border {
    border-color: rgba(255, 255, 255, 0.1) !important;
}
[data-bs-theme="dark"] .border-bottom {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}
[data-bs-theme="dark"] .border-top {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}
[data-bs-theme="dark"] .alert {
    border: 1px solid rgba(255, 255, 255, 0.08);
}
[data-bs-theme="dark"] .platform-card .avatar-md .avatar-title {
    background: rgba(255, 255, 255, 0.08) !important;
}
[data-bs-theme="dark"] .text-center .avatar-lg .avatar-title,
[data-bs-theme="dark"] .text-center .avatar-md .avatar-title {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Channel type selector grid */
.channel-type-option {
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.channel-type-option:hover {
    border-color: var(--bs-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.channel-type-option.border-primary {
    box-shadow: 0 0 0 1px var(--bs-primary);
}

/* Station guide center */
.station-guide-page {
    align-items: flex-start;
}
.station-guide-nav,
.station-guide-toc {
    position: sticky;
    top: 92px;
}
.station-guide-nav .card-body {
    padding: 1rem;
}
.station-guide-group-title {
    display: flex;
    align-items: center;
    gap: .4rem;
    letter-spacing: .04em;
    line-height: 1.2;
}
.station-guide-group-title i {
    display: block;
    flex-shrink: 0;
    stroke-width: 2;
}
.station-guide-nav .list-group-item {
    border: 1px solid transparent;
    border-radius: 7px;
    margin-bottom: 2px;
    color: #475569;
    font-size: .84rem;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .65rem;
}
.station-guide-nav-icon {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    display: block;
    stroke-width: 2;
    color: #64748b;
}
.station-guide-nav .list-group-item.active {
    background: #f8fafc;
    color: #111827;
    border-color: var(--station-guide-active-color, #94a3b8);
    border-left-width: 3px;
    font-weight: 600;
}
.station-guide-nav .list-group-item:hover:not(.active) {
    background: #f8fafc;
    color: #111827;
}
.station-guide-content-card {
    border: 1px solid #e6ebf1;
    border-top: 3px solid var(--station-guide-color, #e6ebf1);
}
.station-guide-content section {
    padding-bottom: 1.75rem;
    margin-bottom: 1.75rem;
}
.station-guide-content section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}
.station-guide-content h5 {
    color: #111827;
    font-weight: 700;
    margin-bottom: .85rem;
}
.station-guide-content p,
.station-guide-content li {
    color: #475569;
    line-height: 1.82;
    font-size: .9rem;
}
.station-guide-content ul,
.station-guide-content ol {
    padding-left: 1.2rem;
    margin-bottom: 0;
}
.station-guide-content strong {
    color: #111827;
    font-weight: 700;
}
.station-guide-step-group {
    border: 1px solid #edf1f5;
    border-left: 3px solid var(--station-guide-color);
    border-radius: 8px;
    background: #fff;
    padding: 1rem 1rem 1rem 1.1rem;
    margin-bottom: .9rem;
}
.station-guide-step-group:last-child {
    margin-bottom: 0;
}
.station-guide-step-group h6 {
    color: #111827;
    font-size: .88rem;
    font-weight: 700;
    margin-bottom: .35rem;
}
.station-guide-step-intro {
    color: #64748b;
    font-size: .84rem;
    line-height: 1.65;
    margin-bottom: .75rem;
}
.station-guide-step-list li + li {
    margin-top: .45rem;
}
.station-guide-callout {
    border: 1px solid #dbeafe;
    border-left: 3px solid #2563eb;
    background: #eff6ff;
    border-radius: 8px;
}
.station-guide-panel {
    border: 1px solid #edf1f5;
    border-radius: 8px;
    background: #fff;
    border-left: 3px solid #e2e8f0;
}
.station-guide-toc a {
    color: #64748b;
    font-size: .8rem;
    padding: .25rem 0;
    display: block;
}
.station-guide-toc a:hover {
    color: #111827;
}
.station-guide-module-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: var(--station-guide-color);
}
.station-guide-grid-card {
    border: 1px solid #e6ebf1;
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.station-guide-grid-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}
.station-guide-grid-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.station-guide-filter-button {
    color: #475569;
    background: #fff;
}
.station-guide-filter-button.active {
    color: #111827;
    background: #f1f5f9;
    border-color: #cbd5e1 !important;
    font-weight: 600;
}
.station-guide-search {
    max-width: 380px;
}
.station-guide-hidden {
    display: none !important;
}
@media (max-width: 1199.98px) {
    .station-guide-toc {
        position: static;
    }
}
@media (max-width: 991.98px) {
    .station-guide-nav {
        position: static;
    }
}

/* Dark mode */
[data-bs-theme="dark"] .station-guide-grid-card,
[data-bs-theme="dark"] .station-guide-panel,
[data-bs-theme="dark"] .station-guide-step-group {
    background: #2b3035;
    border-color: rgba(255, 255, 255, 0.1);
}
[data-bs-theme="dark"] .station-guide-content-card {
    background: #2b3035;
    border-color: rgba(255, 255, 255, 0.1);
    border-top-color: var(--station-guide-color, rgba(255, 255, 255, 0.1));
}
[data-bs-theme="dark"] .station-guide-nav .list-group-item {
    color: #adb5bd;
}
[data-bs-theme="dark"] .station-guide-nav .list-group-item.active,
[data-bs-theme="dark"] .station-guide-nav .list-group-item:hover {
    background: #343a40;
    color: #f8f9fa;
}
[data-bs-theme="dark"] .station-guide-grid-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
[data-bs-theme="dark"] .station-guide-filter-button {
    background: #2b3035;
    color: #adb5bd;
    border-color: rgba(255, 255, 255, 0.1);
}
[data-bs-theme="dark"] .station-guide-filter-button.active {
    background: #495057;
    color: #f8f9fa;
}
[data-bs-theme="dark"] .station-guide-callout {
    background: rgba(37, 99, 235, .12);
    border-color: rgba(37, 99, 235, .28);
}
[data-bs-theme="dark"] .station-guide-content h5,
[data-bs-theme="dark"] .station-guide-content strong,
[data-bs-theme="dark"] .station-guide-step-group h6,
[data-bs-theme="dark"] .station-guide-grid-card .text-dark,
[data-bs-theme="dark"] .station-guide-panel .text-dark {
    color: #f8f9fa !important;
}
[data-bs-theme="dark"] .station-guide-content p,
[data-bs-theme="dark"] .station-guide-content li {
    color: #adb5bd;
}

/* Sidebar locked navigation */
#sidebar-menu .sidebar-link-locked {
    display: flex;
    align-items: center;
    color: #8b95a1 !important;
    cursor: not-allowed;
}
#sidebar-menu .sidebar-link-locked:hover {
    color: #8b95a1 !important;
}
#sidebar-menu .sidebar-link-locked > i:not(.sidebar-lock-icon) {
    flex: 0 0 auto;
}
#sidebar-menu .sidebar-link-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#sidebar-menu .sidebar-lock-icon {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin-left: auto;
    opacity: .75;
}
[data-bs-theme="dark"] #sidebar-menu .sidebar-link-locked,
[data-bs-theme="dark"] #sidebar-menu .sidebar-link-locked:hover {
    color: #7f8994 !important;
}
