/*
 * AdminLTE CSS Overrides
 * Ensures AdminLTE's default dim colors don't interfere with light theme
 */

/* Override AdminLTE default text colors */
.content-wrapper {
    color: #1f2937;
}

.main-header {
    color: #1f2937 !important;
}

.main-header .navbar {
    background-color: #ffffff;
    color: #1f2937;
}

.main-header a {
    color: #0066cc;
}

/* Info boxes from AdminLTE */
.info-box {
    color: #1f2937;
}

.info-box-text {
    color: #1f2937 !important;
}

.info-box-number {
    color: #1f2937 !important;
}

/* Small boxes */
.small-box {
    color: #1f2937;
}

.small-box .inner h3,
.small-box .inner p {
    color: #1f2937 !important;
}

/* List items */
.list-group-item {
    color: #1f2937;
}

/* Forms */
.form-control,
.form-select {
    color: #1f2937;
}

.form-control:focus,
.form-select:focus {
    color: #1f2937;
}

/* Light sidebar — dark text on white background */
.sidebar-light-primary {
    background-color: #ffffff;
}

.sidebar-light-primary .nav-link {
    color: #1e293b !important;
}

.sidebar-light-primary .nav-link.active {
    background-color: #e0e7ff;
    color: #4338ca !important;
}

.sidebar-light-primary .nav-link:hover {
    background-color: #f1f5f9;
    color: #1e293b !important;
}

.sidebar-light-primary .user-panel > .info > a {
    color: #1e293b !important;
}

/* Sidebar brand */
.brand-link {
    color: #1e293b !important;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0 !important;
}

.brand-link:hover {
    background-color: #f8fafc;
}

/* Ensure content text is dark */
.card-body,
.card-header,
.card-title {
    color: #1f2937 !important;
}

/* Tables */
.table {
    color: #1f2937;
}

.table thead th {
    color: #1f2937;
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.table tbody td {
    color: #1f2937;
    border-color: #d1d5db;
}

/* ── noc-wrap: light gray canvas (fallback for pages without device-monitor-styles) */
/* When device-monitor-styles is included per-page its inline <style> overrides these  */
.noc-wrap {
    background: #f0f2f5;
    min-height: calc(100vh - 120px);
    padding: 1rem;
    border-radius: 12px;
    color: #1e293b;
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
/* NetFlow pages open their OWN noc-wrap inside the layout's noc-wrap — prevent double padding */
.noc-wrap > .noc-wrap {
    padding: 0;
    background: transparent;
    border-radius: 0;
    min-height: unset;
}
/* AdminLTE .card subtle shadow on the gray canvas */
.noc-wrap .card {
    box-shadow: 0 1px 4px rgba(15, 23, 42, .06) !important;
}

/* ── nf-subnav: shared sub-navigation bar (used by NetFlow AND all GA sections) */
.nf-subnav {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 14px;
    padding: 0.55rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .12);
    overflow: hidden;
}
/* Single-row, horizontal-scroll on overflow so tabs never wrap to a 2nd line */
.nf-subnav-inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.22) transparent;
    padding-bottom: 2px;
}
.nf-subnav-inner::-webkit-scrollbar        { height: 3px; }
.nf-subnav-inner::-webkit-scrollbar-track  { background: transparent; }
.nf-subnav-inner::-webkit-scrollbar-thumb  { background: rgba(255,255,255,.25); border-radius: 2px; }
.nf-subnav-link {
    flex: 1 1 auto;
    min-width: max-content;
    text-align: center;
    padding: 0.6rem 1rem;
    color: rgba(255,255,255,.72);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
    white-space: nowrap;
    letter-spacing: .01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nf-subnav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
    text-decoration: none;
}
.nf-subnav-link.is-active {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, .35);
}
.nf-subnav-link i { opacity: .85; margin-right: .5rem; }
.nf-subnav-link.is-active i { opacity: 1; }
@media (max-width: 768px) {
    .nf-subnav-link i { margin-right: 0 !important; }
    .nf-subnav-link span { display: none; }
    .nf-subnav-link { min-width: 44px; padding: 0.6rem 0.75rem; }
}

/* ── Enterprise Nav-Tabs (same look as nf-subnav / ga-subnav) ────────────── */
.nav-tabs {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 14px !important;
    padding: 0.45rem !important;
    border-bottom: none !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .12);
    gap: 0.2rem;
    flex-wrap: wrap;
}
.nav-tabs .nav-item {
    margin-bottom: 0 !important;
}
.nav-tabs .nav-link {
    color: rgba(255, 255, 255, .72) !important;
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: 10px !important;
    padding: 0.52rem 0.9rem !important;
    border: none !important;
    background: transparent !important;
    transition: all .18s ease;
    white-space: nowrap;
    letter-spacing: .01em;
    margin-bottom: 0 !important;
}
.nav-tabs .nav-link i { opacity: .85; }
.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
    color: #fff !important;
    background: rgba(255, 255, 255, .08) !important;
    border: none !important;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, .35);
    border: none !important;
}
.nav-tabs .nav-link.active i { opacity: 1; }
/* When tab-content follows nav-tabs, give it a clean card look */
.nav-tabs ~ .tab-content {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    margin-top: 0.5rem;
}
/* Override Bootstrap border-top-0 utility that creates "connected" look */
.nav-tabs ~ .tab-content.border-top-0 {
    border-top: 1px solid #e6ebf2 !important;
    border-radius: 12px !important;
    margin-top: 0.5rem;
}
@media (max-width: 768px) {
    .nav-tabs .nav-link {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem;
    }
}

/* ── Search autocomplete dropdown above noc-wrap stacking context ────────── */
.ui-autocomplete {
    z-index: 9999 !important;
    position: absolute !important;
}
/* Ensure the main-header (navbar) also sits above noc-wrap */
.main-header {
    z-index: 1030 !important;
    position: relative !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ENTERPRISE THEME — Group Admin pages (auto-applied inside .noc-wrap)
   Modernises cards, headers, tables, buttons, badges, forms, alerts
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page section header — modern hero strip ──────────────────────────────── */
.noc-wrap > .content-header,
.noc-wrap .ga-page-header {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
}

/* ── Cards: clean, slightly elevated, smooth radius ───────────────────────── */
.noc-wrap .card {
    background: #ffffff;
    border: 1px solid #e6ebf2 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(15,23,42,.05) !important;
    margin-bottom: 1rem;
    overflow: visible;
}
.noc-wrap .card-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e6ebf2 !important;
    padding: 0.75rem 1.1rem !important;
    font-weight: 600;
    letter-spacing: .01em;
    color: #1e293b !important;
    border-radius: 12px 12px 0 0 !important;
}
.noc-wrap .card-header .card-title {
    color: #1e293b !important;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
}
.noc-wrap .card-body {
    padding: 1.1rem;
    color: #1e293b !important;
}
.noc-wrap .card-footer {
    background: #f8fafc;
    border-top: 1px solid #e6ebf2;
    padding: 0.7rem 1.1rem;
}
/* Coloured accent border-bottom on card-header (AdminLTE .card-primary etc.) */
.noc-wrap .card.card-primary > .card-header { border-bottom-color: #3b82f6 !important; border-bottom-width: 2px !important; }
.noc-wrap .card.card-success > .card-header { border-bottom-color: #22c55e !important; border-bottom-width: 2px !important; }
.noc-wrap .card.card-info    > .card-header { border-bottom-color: #06b6d4 !important; border-bottom-width: 2px !important; }
.noc-wrap .card.card-warning > .card-header { border-bottom-color: #f59e0b !important; border-bottom-width: 2px !important; }
.noc-wrap .card.card-danger  > .card-header { border-bottom-color: #ef4444 !important; border-bottom-width: 2px !important; }
.noc-wrap .card.card-secondary > .card-header { border-bottom-color: #64748b !important; border-bottom-width: 2px !important; }
/* AdminLTE solid card backgrounds → reset to white with coloured top border */
.noc-wrap .card-outline.card-primary { border-top: 3px solid #3b82f6 !important; }
.noc-wrap .card-outline.card-success { border-top: 3px solid #22c55e !important; }
.noc-wrap .card-outline.card-info    { border-top: 3px solid #06b6d4 !important; }
.noc-wrap .card-outline.card-warning { border-top: 3px solid #f59e0b !important; }
.noc-wrap .card-outline.card-danger  { border-top: 3px solid #ef4444 !important; }

/* ── Tables: clean, light, premium ─────────────────────────────────────────── */
.noc-wrap .table {
    color: #1e293b;
    margin-bottom: 0;
}
.noc-wrap .table thead th {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    border-top: none !important;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 0.75rem 0.85rem;
}
.noc-wrap .table tbody td {
    padding: 0.7rem 0.85rem;
    border-top: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #1e293b;
}
.noc-wrap .table tbody tr:hover td {
    background: rgba(59,130,246,.04);
}
.noc-wrap .table.table-bordered td,
.noc-wrap .table.table-bordered th {
    border: 1px solid #e6ebf2;
}
.noc-wrap .table-striped tbody tr:nth-of-type(odd) {
    background: #fafbfc;
}

/* ── Buttons: subtler, modern radius ───────────────────────────────────────── */
.noc-wrap .btn {
    border-radius: 8px;
    font-weight: 500;
    letter-spacing: .01em;
    transition: all .15s ease;
}
.noc-wrap .btn-sm  { border-radius: 6px; }
.noc-wrap .btn-lg  { border-radius: 10px; }
.noc-wrap .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #2563eb;
}
.noc-wrap .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    box-shadow: 0 2px 8px rgba(59,130,246,.3);
}
.noc-wrap .btn-success { background: #22c55e; border-color: #16a34a; }
.noc-wrap .btn-success:hover { background: #16a34a; border-color: #15803d; }
.noc-wrap .btn-danger  { background: #ef4444; border-color: #dc2626; }
.noc-wrap .btn-danger:hover  { background: #dc2626; border-color: #b91c1c; }
.noc-wrap .btn-warning { background: #f59e0b; border-color: #d97706; color: #fff; }
.noc-wrap .btn-warning:hover { background: #d97706; color: #fff; }
.noc-wrap .btn-info    { background: #06b6d4; border-color: #0891b2; color: #fff; }
.noc-wrap .btn-info:hover    { background: #0891b2; color: #fff; }

/* ── Badges: pill style, soft palette ──────────────────────────────────────── */
.noc-wrap .badge {
    border-radius: 999px;
    padding: 0.35em 0.65em;
    font-weight: 600;
    letter-spacing: .02em;
    font-size: 0.72rem;
}
.noc-wrap .badge-primary   { background: #dbeafe; color: #1d4ed8; }
.noc-wrap .badge-success   { background: #dcfce7; color: #15803d; }
.noc-wrap .badge-danger    { background: #fee2e2; color: #b91c1c; }
.noc-wrap .badge-warning   { background: #fef3c7; color: #b45309; }
.noc-wrap .badge-info      { background: #cffafe; color: #0e7490; }
.noc-wrap .badge-secondary { background: #e2e8f0; color: #475569; }
.noc-wrap .badge-dark      { background: #1e293b; color: #fff; }

/* ── Forms: modern inputs ─────────────────────────────────────────────────── */
.noc-wrap .form-control,
.noc-wrap .form-select,
.noc-wrap .custom-select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: #1e293b;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.noc-wrap .form-control:focus,
.noc-wrap .form-select:focus,
.noc-wrap .custom-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
    outline: none;
}
.noc-wrap .form-control-sm { border-radius: 6px; }
.noc-wrap label {
    color: #334155;
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}
.noc-wrap .input-group-text {
    background: #f1f5f9;
    border-color: #d1d5db;
    color: #475569;
    border-radius: 8px;
}

/* ── Alerts: rounded, soft palette ─────────────────────────────────────────── */
.noc-wrap .alert {
    border-radius: 10px;
    border: 1px solid transparent;
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
}
.noc-wrap .alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.noc-wrap .alert-danger  { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.noc-wrap .alert-warning { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.noc-wrap .alert-info    { background: #f0f9ff; border-color: #bae6fd; color: #0369a1; }

/* ── Pagination: pill style ──────────────────────────────────────────────── */
.noc-wrap .pagination .page-link {
    border: 1px solid #e6ebf2;
    color: #475569;
    margin: 0 2px;
    border-radius: 6px !important;
    padding: 0.4rem 0.75rem;
}
.noc-wrap .pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-color: #3b82f6;
    color: #fff;
}
.noc-wrap .pagination .page-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* ── DataTables wrapper: blend with cards ─────────────────────────────────── */
.noc-wrap .dataTables_wrapper .dataTables_filter input,
.noc-wrap .dataTables_wrapper .dataTables_length select {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    color: #1e293b;
}

/* ── List groups: cleaner ─────────────────────────────────────────────────── */
.noc-wrap .list-group-item {
    border: 1px solid #e6ebf2;
    color: #1e293b;
    padding: 0.7rem 1rem;
}

/* ── Modal: slight refinement ─────────────────────────────────────────────── */
.modal-content {
    border-radius: 12px;
    border: 1px solid #e6ebf2;
}
.modal-header {
    border-bottom: 1px solid #e6ebf2;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}
.modal-footer {
    border-top: 1px solid #e6ebf2;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

/* ── Breadcrumb: refined ──────────────────────────────────────────────────── */
.content-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
    font-size: 0.85rem;
}
.content-header .breadcrumb-item a { color: #3b82f6; }
.content-header .breadcrumb-item.active { color: #64748b; }

/* ── Content-header title ─────────────────────────────────────────────────── */
.content-header h1,
.content-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -.01em;
    margin: 0;
}

/* ── Small box / info box on gray canvas ──────────────────────────────────── */
.noc-wrap .small-box,
.noc-wrap .info-box {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15,23,42,.05);
}

/* ── Tab content panel inside noc-wrap should be white card ───────────────── */
.noc-wrap .tab-content {
    background: #fff;
    border-radius: 0 0 12px 12px;
}

/* ── Section.content tight padding (page header now lives inside noc-wrap) ── */
.content-wrapper > .content {
    padding: 0.75rem 0.75rem 1.5rem !important;
}
.content-wrapper > .content-header {
    display: none !important;   /* legacy header strip; we render hero inside noc-wrap now */
}

/* ── GA Hero: unified page header card on the noc-wrap canvas ─────────────── */
.ga-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e6ebf2;
    border-left: 4px solid #3b82f6;
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    box-shadow: 0 1px 3px rgba(15,23,42,.05);
}
.ga-hero-title h1,
.ga-hero-title h2,
.ga-hero-title h3,
.ga-hero-title h4,
.ga-hero-title h5 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -.01em;
    line-height: 1.4;
}
.ga-hero-title .nav,
.ga-hero-title ul.nav { margin: 0; padding: 0; }
.ga-hero-title .nav-link { padding: 0 !important; }
.ga-hero-crumbs .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.82rem;
}
.ga-hero-crumbs .breadcrumb-item a { color: #3b82f6; text-decoration: none; }
.ga-hero-crumbs .breadcrumb-item a:hover { text-decoration: underline; }
.ga-hero-crumbs .breadcrumb-item.active { color: #64748b; font-weight: 500; }
.ga-hero-crumbs .breadcrumb-item + .breadcrumb-item::before { color: #cbd5e1; }
.ga-hero-crumbs .float-sm-right { float: none !important; }

/* If a page leaves contentTitle/breadcrumb empty, collapse the hero */
.ga-hero:not(:has(.ga-hero-title :not(:empty))):not(:has(.ga-hero-crumbs :not(:empty))) {
    display: none;
}

/* ── Tighter noc-wrap padding so content has more room ─────────────────────── */
.noc-wrap {
    padding: 1rem 1.1rem !important;
}
@media (max-width: 768px) {
    .noc-wrap { padding: 0.75rem !important; }
    .ga-hero { padding: 0.7rem 0.9rem; }
    .ga-hero-title h1, .ga-hero-title h3, .ga-hero-title h5 { font-size: 1.05rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TEXT CONTRAST FIX — ensure all text inside noc-wrap is readable
   ═══════════════════════════════════════════════════════════════════════════ */

/* Default text inside noc-wrap should be near-black for high contrast */
.noc-wrap,
.noc-wrap p,
.noc-wrap span,
.noc-wrap div,
.noc-wrap li,
.noc-wrap td,
.noc-wrap th,
.noc-wrap label,
.noc-wrap a,
.noc-wrap .card-body,
.noc-wrap .card-text,
.noc-wrap .form-text,
.noc-wrap .small,
.noc-wrap small {
    color: #0f172a;  /* slate-900 — strong contrast on light gray bg */
}

/* Links keep blue but slightly darker for contrast */
.noc-wrap a:not(.btn):not(.nav-link):not(.nf-subnav-link):not(.dropdown-item):not(.page-link) {
    color: #1d4ed8;
}
.noc-wrap a:not(.btn):not(.nav-link):not(.nf-subnav-link):not(.dropdown-item):not(.page-link):hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Bootstrap "muted" / "secondary" — bump from #6c757d to readable slate-600 */
.noc-wrap .text-muted,
.noc-wrap .text-secondary {
    color: #475569 !important;   /* WCAG-compliant on light gray */
}
.noc-wrap .text-gray,
.noc-wrap .text-gray-dark {
    color: #334155 !important;
}

/* AdminLTE description-block / small text */
.noc-wrap .description-block .description-text,
.noc-wrap .description-block .description-header,
.noc-wrap .info-box-text,
.noc-wrap .info-box-number,
.noc-wrap .small-box p,
.noc-wrap .small-box h3 {
    color: #0f172a !important;
}

/* Form helpers */
.noc-wrap .form-text,
.noc-wrap .help-block,
.noc-wrap .text-help {
    color: #475569 !important;
}

/* Placeholders not too dim */
.noc-wrap .form-control::placeholder,
.noc-wrap .form-select::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

/* Table cell text strong */
.noc-wrap .table tbody td,
.noc-wrap .table tbody td a {
    color: #0f172a;
}
.noc-wrap .table tbody td .text-muted,
.noc-wrap .table tbody td small {
    color: #475569 !important;
}

/* Card header titles */
.noc-wrap .card-header,
.noc-wrap .card-title,
.noc-wrap .card-header .card-title {
    color: #0f172a !important;
}

/* Hero title stronger */
.ga-hero-title,
.ga-hero-title h1,
.ga-hero-title h2,
.ga-hero-title h3,
.ga-hero-title h4,
.ga-hero-title h5,
.ga-hero-title h6 {
    color: #0f172a !important;
}

/* Breadcrumb readability */
.ga-hero-crumbs .breadcrumb-item.active,
.content-header .breadcrumb-item.active {
    color: #334155 !important;
    font-weight: 600;
}
.ga-hero-crumbs .breadcrumb-item + .breadcrumb-item::before {
    color: #64748b !important;
}

/* Dropdown items */
.noc-wrap .dropdown-menu .dropdown-item {
    color: #0f172a;
}

/* Disabled / placeholder-ish — keep readable */
.noc-wrap .text-light { color: #475569 !important; }

/* Headings everywhere strong */
.noc-wrap h1, .noc-wrap h2, .noc-wrap h3,
.noc-wrap h4, .noc-wrap h5, .noc-wrap h6 {
    color: #0f172a;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TEXT CONTRAST — ELEMENTS OUTSIDE .noc-wrap
   (modals, dropdowns, tooltips, navbar, sidebar all render at body level)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Modals (Bootstrap teleports them outside noc-wrap) ───────────────────── */
.modal-content {
    color: #0f172a;
}
.modal-title {
    color: #0f172a !important;
    font-weight: 600;
}
.modal-body,
.modal-body p,
.modal-body span,
.modal-body div,
.modal-body li,
.modal-body td,
.modal-body th,
.modal-body label,
.modal-body small {
    color: #0f172a;
}
.modal-body .text-muted,
.modal-body .text-secondary {
    color: #475569 !important;
}
.modal-body a:not(.btn) { color: #1d4ed8; }
.modal-body a:not(.btn):hover { color: #1e40af; }
.modal-body .form-control,
.modal-body .form-select,
.modal-body .custom-select {
    color: #0f172a;
    border: 1px solid #d1d5db;
}
.modal-body table th,
.modal-body table td { color: #0f172a; }
.modal-header { color: #0f172a; }
.modal-footer { color: #0f172a; }

/* ── Dropdown menus (rendered at body level by Bootstrap) ─────────────────── */
.dropdown-menu {
    color: #0f172a;
}
.dropdown-menu .dropdown-item {
    color: #0f172a;
}
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    color: #0f172a;
    background: #f1f5f9;
}
.dropdown-menu .dropdown-header {
    color: #475569;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.dropdown-menu .text-muted { color: #475569 !important; }

/* ── Tooltips and popovers ────────────────────────────────────────────────── */
.tooltip-inner {
    background: #1e293b;
    color: #fff;
    font-weight: 500;
}
.tooltip.bs-tooltip-top .arrow::before { border-top-color: #1e293b; }
.tooltip.bs-tooltip-bottom .arrow::before { border-bottom-color: #1e293b; }
.popover {
    border-color: #e6ebf2;
    box-shadow: 0 4px 16px rgba(15,23,42,.1);
}
.popover-header {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 600;
    border-bottom-color: #e6ebf2;
}
.popover-body {
    color: #0f172a;
}

/* ── Main header (top navbar) text contrast ───────────────────────────────── */
.main-header.navbar,
.main-header .navbar-nav .nav-link,
.main-header .nav-link {
    color: #0f172a !important;
}
.main-header .nav-link:hover {
    color: #1d4ed8 !important;
}
.main-header .badge { color: #fff; }
.main-header .text-muted { color: #475569 !important; }

/* ── Sidebar text — stronger contrast ─────────────────────────────────────── */
.sidebar-light-primary .nav-link {
    color: #0f172a !important;
}
.sidebar-light-primary .nav-link p {
    color: inherit !important;
}
.sidebar-light-primary .nav-treeview .nav-link {
    color: #334155 !important;
}
.sidebar-light-primary .nav-link.active,
.sidebar-light-primary .nav-link.active p {
    color: #1d4ed8 !important;
    font-weight: 600;
}
.sidebar-light-primary .user-panel .info a {
    color: #0f172a !important;
    font-weight: 600;
}
.sidebar .nav-icon { color: inherit; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.main-footer {
    color: #475569 !important;
    background: #ffffff;
    border-top: 1px solid #e6ebf2;
}
.main-footer a { color: #1d4ed8; }

/* ── SweetAlert / toastr text (if present) ────────────────────────────────── */
.swal2-title, .swal2-content, .swal2-html-container {
    color: #0f172a !important;
}
.toast-message, .toast-title { color: #fff !important; }

/* ── Cards floating OUTSIDE noc-wrap (login/customer portal) ──────────────── */
body > .login-box .card,
body > .register-box .card {
    color: #0f172a;
}

/* ── Generic global muted-text bump for any page (not just noc-wrap) ──────── */
.text-muted, small.text-muted, .small.text-muted {
    color: #475569 !important;
}
