/* PDS shell — layout + sidebar (overrides crowded legacy chrome) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --sidebar-width: 272px;
    --pds-ink: #0f172a;
    --pds-ink-soft: #334155;
    --pds-muted: #64748b;
    --pds-line: #e2e8f0;
    --pds-soft: #f1f5f9;
    --pds-white: #ffffff;
    --pds-accent: #0f766e;
    --pds-accent-bright: #0d9488;
    --pds-accent-soft: rgba(15, 118, 110, 0.1);
    --pds-sidebar: #ffffff;
    --pds-sidebar-elevated: #f8fafc;
    --pds-sidebar-hover: rgba(15, 118, 110, 0.08);
    --pds-sidebar-width: 272px;
    --pds-topbar-h: 64px;
    --pds-radius: 14px;
    --pds-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.35);
    --primary-color: #0f766e;
    --primary-dark: #0d9488;
    --bg-sidebar: #ffffff;
    --bg-sidebar-hover: #f1f5f9;
    --text--color: #0f766e;
    --main--color: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
}

html, body {
    font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif !important;
}

body {
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(20, 184, 166, 0.12), transparent 55%),
        radial-gradient(900px 400px at 100% 0%, rgba(14, 165, 233, 0.08), transparent 50%),
        var(--pds-soft) !important;
    color: var(--pds-ink);
}

/* —— Sidebar —— */
.modern-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--pds-sidebar-width);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: var(--pds-ink);
    z-index: 12000;
    display: flex;
    flex-direction: column;
    height: 100vh;
    border-right: 1px solid var(--pds-line);
    box-shadow: 4px 0 24px -16px rgba(15, 23, 42, 0.25);
    transform: translateX(0);
    transition: transform 0.28s ease;
}

.modern-sidebar .sidebar-header {
    padding: 1rem 1rem 0.75rem !important;
    border-bottom: 1px solid var(--pds-line);
    gap: 0.5rem;
}

.modern-sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.modern-sidebar .sidebar-brand img {
    height: 40px !important;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.modern-sidebar .sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.modern-sidebar .sidebar-brand-text strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pds-ink);
    letter-spacing: -0.02em;
}

.modern-sidebar .sidebar-brand-text span {
    font-size: 0.68rem;
    color: var(--pds-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modern-sidebar .sidebar-search {
    padding: 0.75rem 0.85rem 0.35rem;
}

.modern-sidebar .sidebar-search-wrap {
    position: relative;
}

.modern-sidebar .sidebar-search-wrap i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.8rem;
    pointer-events: none;
}

.modern-sidebar .sidebar-search-wrap input {
    width: 100%;
    border: 1px solid var(--pds-line);
    background: #f8fafc;
    color: var(--pds-ink);
    border-radius: 10px;
    padding: 0.55rem 0.75rem 0.55rem 2rem;
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.modern-sidebar .sidebar-search-wrap input::placeholder {
    color: #94a3b8;
}

.modern-sidebar .sidebar-search-wrap input:focus {
    border-color: rgba(15, 118, 110, 0.45);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.modern-sidebar .sidebar-list {
    list-style: none;
    padding: 0.35rem 0.55rem 1rem;
    margin: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

/* Section labels with accent dots */
.modern-sidebar .nav-section-label {
    margin: 0.85rem 0.65rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.modern-sidebar .nav-section-label::before {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #cbd5e1;
    flex-shrink: 0;
}

.modern-sidebar .nav-section-label[data-section="workspace"]::before { background: linear-gradient(135deg, #0f766e, #0284c7); }
.modern-sidebar .nav-section-label[data-section="insights"]::before { background: linear-gradient(135deg, #7c3aed, #e11d48); }
.modern-sidebar .nav-section-label[data-section="catalog"]::before { background: linear-gradient(135deg, #d97706, #ea580c); }
.modern-sidebar .nav-section-label[data-section="samples"]::before { background: linear-gradient(135deg, #059669, #0891b2); }
.modern-sidebar .nav-section-label[data-section="team"]::before { background: linear-gradient(135deg, #4f46e5, #c026d3); }
.modern-sidebar .nav-section-label[data-section="more"]::before { background: linear-gradient(135deg, #64748b, #94a3b8); }

.modern-sidebar .sidebar-list > li > a,
.modern-sidebar .logout-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.7rem;
    color: var(--pds-ink-soft) !important;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.88rem;
    border-radius: 10px;
    border: none;
    background: transparent;
    transition: background 0.15s, color 0.15s;
    width: 100%;
    text-align: left;
}

.modern-sidebar .sidebar-list > li > a i,
.modern-sidebar .logout-btn i {
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.82rem;
    border-radius: 9px;
    color: #64748b;
    background: #f1f5f9;
    transition: color 0.15s, background 0.15s, transform 0.15s;
    flex-shrink: 0;
}

.modern-sidebar .sidebar-list > li > a:hover > i:not(.nav-caret),
.modern-sidebar .logout-btn:hover i {
    transform: translateY(-1px);
}

.modern-sidebar .sidebar-list > li > a:hover,
.modern-sidebar .sidebar-list > li > a:focus,
.modern-sidebar .logout-btn:hover {
    background: var(--pds-sidebar-hover);
    color: var(--pds-accent) !important;
}

.modern-sidebar .nav-parent .nav-caret {
    margin-left: auto;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    font-size: 0.7rem !important;
    color: #94a3b8 !important;
    transition: transform 0.2s, color 0.15s;
    display: inline-block !important;
    transform: none;
}

.modern-sidebar .nav-parent[aria-expanded="true"] .nav-caret,
.modern-sidebar .nav-parent.is-open .nav-caret {
    transform: rotate(180deg);
    color: var(--pds-accent) !important;
}

/* Vibrant parent tones */
.modern-sidebar [data-tone="teal"] > a > i:not(.nav-caret) { color: #0f766e !important; background: rgba(15, 118, 110, 0.14); }
.modern-sidebar [data-tone="sky"] > a > i:not(.nav-caret) { color: #0284c7 !important; background: rgba(2, 132, 199, 0.14); }
.modern-sidebar [data-tone="violet"] > a > i:not(.nav-caret) { color: #7c3aed !important; background: rgba(124, 58, 237, 0.14); }
.modern-sidebar [data-tone="rose"] > a > i:not(.nav-caret) { color: #e11d48 !important; background: rgba(225, 29, 72, 0.12); }
.modern-sidebar [data-tone="amber"] > a > i:not(.nav-caret) { color: #d97706 !important; background: rgba(217, 119, 6, 0.14); }
.modern-sidebar [data-tone="emerald"] > a > i:not(.nav-caret) { color: #059669 !important; background: rgba(5, 150, 105, 0.14); }
.modern-sidebar [data-tone="indigo"] > a > i:not(.nav-caret) { color: #4f46e5 !important; background: rgba(79, 70, 229, 0.14); }
.modern-sidebar [data-tone="cyan"] > a > i:not(.nav-caret) { color: #0891b2 !important; background: rgba(8, 145, 178, 0.14); }
.modern-sidebar [data-tone="orange"] > a > i:not(.nav-caret) { color: #ea580c !important; background: rgba(234, 88, 12, 0.14); }
.modern-sidebar [data-tone="fuchsia"] > a > i:not(.nav-caret) { color: #c026d3 !important; background: rgba(192, 38, 211, 0.12); }
.modern-sidebar [data-tone="slate"] > a > i:not(.nav-caret) { color: #475569 !important; background: rgba(71, 85, 105, 0.12); }
.modern-sidebar [data-tone="lime"] > a > i:not(.nav-caret) { color: #65a30d !important; background: rgba(101, 163, 13, 0.14); }
.modern-sidebar [data-tone="blue"] > a > i:not(.nav-caret) { color: #2563eb !important; background: rgba(37, 99, 235, 0.14); }

.modern-sidebar [data-tone="rose"] .logout-btn i { color: #e11d48 !important; background: rgba(225, 29, 72, 0.12); }
.modern-sidebar [data-tone="rose"] .logout-btn:hover { background: rgba(225, 29, 72, 0.08); color: #e11d48 !important; }

.modern-sidebar [data-tone="teal"] > a:hover,
.modern-sidebar [data-tone="teal"] > a.is-active,
.modern-sidebar [data-tone="teal"] > a.is-open { background: rgba(15, 118, 110, 0.08); color: #0f766e !important; }
.modern-sidebar [data-tone="sky"] > a:hover,
.modern-sidebar [data-tone="sky"] > a.is-active,
.modern-sidebar [data-tone="sky"] > a.is-open { background: rgba(2, 132, 199, 0.08); color: #0284c7 !important; }
.modern-sidebar [data-tone="violet"] > a:hover,
.modern-sidebar [data-tone="violet"] > a.is-active,
.modern-sidebar [data-tone="violet"] > a.is-open { background: rgba(124, 58, 237, 0.08); color: #7c3aed !important; }
.modern-sidebar [data-tone="rose"] > a:hover,
.modern-sidebar [data-tone="rose"] > a.is-active,
.modern-sidebar [data-tone="rose"] > a.is-open { background: rgba(225, 29, 72, 0.08); color: #e11d48 !important; }
.modern-sidebar [data-tone="amber"] > a:hover,
.modern-sidebar [data-tone="amber"] > a.is-active,
.modern-sidebar [data-tone="amber"] > a.is-open { background: rgba(217, 119, 6, 0.1); color: #d97706 !important; }
.modern-sidebar [data-tone="emerald"] > a:hover,
.modern-sidebar [data-tone="emerald"] > a.is-active,
.modern-sidebar [data-tone="emerald"] > a.is-open { background: rgba(5, 150, 105, 0.08); color: #059669 !important; }
.modern-sidebar [data-tone="indigo"] > a:hover,
.modern-sidebar [data-tone="indigo"] > a.is-active,
.modern-sidebar [data-tone="indigo"] > a.is-open { background: rgba(79, 70, 229, 0.08); color: #4f46e5 !important; }
.modern-sidebar [data-tone="cyan"] > a:hover,
.modern-sidebar [data-tone="cyan"] > a.is-active,
.modern-sidebar [data-tone="cyan"] > a.is-open { background: rgba(8, 145, 178, 0.08); color: #0891b2 !important; }
.modern-sidebar [data-tone="orange"] > a:hover,
.modern-sidebar [data-tone="orange"] > a.is-active,
.modern-sidebar [data-tone="orange"] > a.is-open { background: rgba(234, 88, 12, 0.08); color: #ea580c !important; }
.modern-sidebar [data-tone="fuchsia"] > a:hover,
.modern-sidebar [data-tone="fuchsia"] > a.is-active,
.modern-sidebar [data-tone="fuchsia"] > a.is-open { background: rgba(192, 38, 211, 0.08); color: #c026d3 !important; }
.modern-sidebar [data-tone="slate"] > a:hover,
.modern-sidebar [data-tone="slate"] > a.is-active,
.modern-sidebar [data-tone="slate"] > a.is-open { background: rgba(71, 85, 105, 0.08); color: #475569 !important; }
.modern-sidebar [data-tone="lime"] > a:hover,
.modern-sidebar [data-tone="lime"] > a.is-active,
.modern-sidebar [data-tone="lime"] > a.is-open { background: rgba(101, 163, 13, 0.08); color: #65a30d !important; }
.modern-sidebar [data-tone="blue"] > a:hover,
.modern-sidebar [data-tone="blue"] > a.is-active,
.modern-sidebar [data-tone="blue"] > a.is-open { background: rgba(37, 99, 235, 0.08); color: #2563eb !important; }

.modern-sidebar .sidebar-list ul.collapse {
    background: transparent;
    padding: 0.15rem 0 0.35rem 0.35rem;
    margin: 0;
    display: none;
    flex-direction: column;
    gap: 0.1rem;
    border-left: 2px solid var(--pds-line);
    margin-left: 1.15rem;
}

.modern-sidebar [data-tone="teal"] ul.collapse { border-left-color: rgba(15, 118, 110, 0.35); }
.modern-sidebar [data-tone="sky"] ul.collapse { border-left-color: rgba(2, 132, 199, 0.35); }
.modern-sidebar [data-tone="violet"] ul.collapse { border-left-color: rgba(124, 58, 237, 0.35); }
.modern-sidebar [data-tone="rose"] ul.collapse { border-left-color: rgba(225, 29, 72, 0.3); }
.modern-sidebar [data-tone="amber"] ul.collapse { border-left-color: rgba(217, 119, 6, 0.35); }
.modern-sidebar [data-tone="emerald"] ul.collapse { border-left-color: rgba(5, 150, 105, 0.35); }
.modern-sidebar [data-tone="indigo"] ul.collapse { border-left-color: rgba(79, 70, 229, 0.35); }
.modern-sidebar [data-tone="cyan"] ul.collapse { border-left-color: rgba(8, 145, 178, 0.35); }
.modern-sidebar [data-tone="orange"] ul.collapse { border-left-color: rgba(234, 88, 12, 0.35); }
.modern-sidebar [data-tone="fuchsia"] ul.collapse { border-left-color: rgba(192, 38, 211, 0.3); }
.modern-sidebar [data-tone="slate"] ul.collapse { border-left-color: rgba(71, 85, 105, 0.3); }
.modern-sidebar [data-tone="lime"] ul.collapse { border-left-color: rgba(101, 163, 13, 0.35); }
.modern-sidebar [data-tone="blue"] ul.collapse { border-left-color: rgba(37, 99, 235, 0.35); }

.modern-sidebar .sidebar-list ul.collapse.show {
    display: flex;
}

.modern-sidebar .sidebar-list ul li a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--pds-muted) !important;
    border-radius: 8px;
    text-decoration: none !important;
}

.modern-sidebar .sidebar-list ul li a i {
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    border-radius: 7px;
    flex-shrink: 0;
}

/* Cycle child icon colors for a lively submenu */
.modern-sidebar .sidebar-list ul li:nth-child(8n+1) a i { color: #0f766e !important; background: rgba(15, 118, 110, 0.12); }
.modern-sidebar .sidebar-list ul li:nth-child(8n+2) a i { color: #0284c7 !important; background: rgba(2, 132, 199, 0.12); }
.modern-sidebar .sidebar-list ul li:nth-child(8n+3) a i { color: #7c3aed !important; background: rgba(124, 58, 237, 0.12); }
.modern-sidebar .sidebar-list ul li:nth-child(8n+4) a i { color: #e11d48 !important; background: rgba(225, 29, 72, 0.1); }
.modern-sidebar .sidebar-list ul li:nth-child(8n+5) a i { color: #d97706 !important; background: rgba(217, 119, 6, 0.12); }
.modern-sidebar .sidebar-list ul li:nth-child(8n+6) a i { color: #059669 !important; background: rgba(5, 150, 105, 0.12); }
.modern-sidebar .sidebar-list ul li:nth-child(8n+7) a i { color: #4f46e5 !important; background: rgba(79, 70, 229, 0.12); }
.modern-sidebar .sidebar-list ul li:nth-child(8n+8) a i { color: #ea580c !important; background: rgba(234, 88, 12, 0.12); }

.modern-sidebar .sidebar-list ul li a:hover,
.modern-sidebar .sidebar-list ul li a.is-active {
    background: rgba(15, 23, 42, 0.04);
    color: var(--pds-ink) !important;
}

.modern-sidebar .sidebar-list ul li a.is-active {
    font-weight: 600;
}

.modern-sidebar .sidebar-list .badge {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.15rem 0.4rem;
}

.modern-sidebar .sidebar-list li.is-filtered-out {
    display: none !important;
}

.modern-sidebar .sidebar-footer {
    border-top: 1px solid var(--pds-line);
    padding: 0.65rem 1rem !important;
    font-size: 0.68rem !important;
    color: #94a3b8 !important;
}

.logout-btn {
    cursor: pointer;
}

.sidebar-toggle {
    background: #f8fafc;
    border: 1px solid var(--pds-line);
    color: var(--pds-ink-soft);
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

.sidebar-toggle:hover {
    background: var(--pds-accent-soft);
    color: var(--pds-accent);
    border-color: rgba(15, 118, 110, 0.25);
}

.modern-sidebar-open,
.sidebar-expand-btn {
    background: #fff !important;
    color: var(--pds-ink) !important;
    border: 1px solid var(--pds-line) !important;
    box-shadow: var(--pds-shadow) !important;
}

.sidebar-expand-btn:hover,
.modern-sidebar-open:hover {
    color: var(--pds-accent) !important;
}

@media (max-width: 991.98px) {
    .modern-sidebar {
        transform: translateX(-105%);
    }
    .modern-sidebar.active {
        transform: translateX(0);
    }
    .modern-sidebar-open {
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 12001;
        border-radius: 10px;
        padding: 0.55rem 0.7rem;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 992px) {
    body.sidebar-collapsed .modern-sidebar {
        transform: translateX(-105%);
    }
    body.sidebar-collapsed .main-section,
    body.sidebar-collapsed .main-container {
        margin-left: 0 !important;
        width: calc(100vw - 1.5rem) !important;
    }
    .sidebar-expand-btn {
        position: fixed;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
        z-index: 11999;
        border-radius: 0 10px 10px 0;
        padding: 0.85rem 0.65rem;
        display: none;
        align-items: center;
        justify-content: center;
    }
    body.sidebar-collapsed .sidebar-expand-btn {
        display: flex !important;
    }
}

/* —— Main shell —— */
.main-section,
.main-container {
    margin-left: var(--pds-sidebar-width) !important;
    width: calc(100vw - var(--pds-sidebar-width) - 1.25rem) !important;
    min-height: 100vh;
    padding: 0.85rem 0.85rem 1.25rem !important;
    background: transparent !important;
    transition: margin-left 0.28s ease, width 0.28s ease;
}

@media (max-width: 991.98px) {
    .main-section,
    .main-container {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0.75rem !important;
        padding-top: 3.5rem !important;
    }
}

.pds-topbar {
    position: relative;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--pds-radius);
    padding: 0.65rem 1rem;
    margin-bottom: 0.85rem;
    box-shadow: var(--pds-shadow);
    min-height: var(--pds-topbar-h);
}

.pds-topbar .dropdown-menu {
    z-index: 1110;
}

.pds-topbar .pds-brand-mark {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.pds-topbar .pds-brand-mark .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pds-accent), #38bdf8);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
}

.pds-topbar .pds-brand-mark strong {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pds-ink);
    letter-spacing: -0.02em;
}

.pds-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pds-topbar .form-select {
    border-radius: 10px !important;
    border-color: var(--pds-line) !important;
    font-size: 0.85rem !important;
    min-width: 160px;
    background: #fff;
}

.pds-topbar .main_link {
    width: 40px;
    height: 40px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--pds-soft);
    color: var(--pds-ink-soft) !important;
    border: 1px solid var(--pds-line);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pds-topbar .main_link:hover {
    background: var(--pds-accent-soft);
    color: var(--pds-accent) !important;
    border-color: rgba(15, 118, 110, 0.25);
}

.pds-content-shell {
    position: relative;
    /* Do NOT set z-index here — it traps Bootstrap modals under .modal-backdrop on body */
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: calc(var(--pds-radius) + 2px);
    box-shadow: var(--pds-shadow);
    min-height: calc(100vh - 7rem);
    overflow: visible;
}

.pds-content-shell .card-style-3,
.card-styles .card-style-3 {
    min-height: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.pds-content-shell .card-content {
    padding: 1rem 1.15rem 1.35rem !important;
}

.pds-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin: 0 0 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--pds-line);
    font-size: 0.92rem;
}

.pds-breadcrumb a {
    color: var(--pds-muted) !important;
    font-weight: 500;
    text-decoration: none !important;
}

.pds-breadcrumb a:hover {
    color: var(--pds-accent) !important;
}

.pds-breadcrumb .current {
    color: var(--pds-ink);
    font-weight: 700;
}

.pds-breadcrumb i {
    font-size: 0.65rem;
    color: #94a3b8;
    margin: 0 0.2rem;
}

/* Soften primary buttons toward teal without breaking legacy pages */
.btn-primary {
    background: linear-gradient(135deg, #0f766e, #0d9488) !important;
    border-color: #0f766e !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #0d9488, #14b8a6) !important;
    border-color: #0d9488 !important;
}

.btn-outline-primary {
    color: #0f766e !important;
    border-color: rgba(15, 118, 110, 0.45) !important;
}

.btn-outline-primary:hover {
    background: var(--pds-accent-soft) !important;
    color: #0f766e !important;
}

/* Secondary / pending badges — dark ink on light chip (never white-on-silver) */
.badge.bg-secondary,
.badge.badge-secondary,
.badge-secondary,
.badge.text-bg-secondary,
span.badge.bg-secondary,
.table .badge.bg-secondary,
td .badge.bg-secondary {
    background-color: #e2e8f0 !important;
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border: 1px solid #94a3b8 !important;
    --bs-bg-opacity: 1 !important;
    opacity: 1 !important;
}

.bg-secondary:not(.card):not(.btn):not(.alert):not(.badge) {
    background-color: #64748b !important;
}

/*
 * Modal stacking — shell chrome (sidebar 12000, topbar 1100) must stay under dialogs.
 * Backdrop is appended to <body>; dialogs often live inside .main-section.
 */
.modal-backdrop {
    z-index: 20000 !important;
}
.modal-backdrop.show,
.modal-backdrop.fade.show {
    z-index: 20000 !important;
}
.modal {
    z-index: 20010 !important;
}
.modal.show {
    z-index: 20010 !important;
}
.modal .modal-dialog {
    position: relative;
    z-index: 20011;
    pointer-events: auto;
}
.modal .modal-content {
    pointer-events: auto;
}

/* Nested / stacked Bootstrap modals */
body.modal-open .modal-backdrop ~ .modal-backdrop {
    z-index: 20020 !important;
}
body.modal-open .modal.show ~ .modal.show,
body.modal-open .modal.show + .modal.show {
    z-index: 20030 !important;
}

/* Select2 / datepickers opened from inside a modal */
.modal .select2-container--open,
.modal .select2-dropdown,
.select2-container--open {
    z-index: 20040 !important;
}
body > .select2-container {
    z-index: 20040 !important;
}

/* SweetAlert above shell + modals when needed */
.swal-overlay,
.swal2-container {
    z-index: 30000 !important;
}

/* ------------------------------------------------------------------ */
/* Table action dropdowns                                             */
/* Keep horizontal scroll on wrappers; menus use fixed Popper (JS).   */
/* Never target .modern-sidebar li (that collapses the nav).          */
/* ------------------------------------------------------------------ */
.dataTables_wrapper {
    overflow-x: auto !important;
    overflow-y: visible;
}

.table-responsive {
    overflow-x: auto;
}

table .dropdown-menu,
.dropdown-menu.show {
    z-index: 2050 !important;
}

/* Legacy .dropdown li { overflow-x:hidden } must not clip menu items */
.dropdown-menu > li,
ul.dropdown-menu > li {
    overflow: visible !important;
}

