/* SMARTCO Final Clean Sidebar Readability Fix - 2026-06-19
   Scope: sidebar/navigation contrast only. Preserves routes, layout structure, menu content and component contracts.
   Reason: the final light sidebar layer made grouped navigation labels nearly white on a light background. */

:root {
    --smartco-sidebar-readable-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    --smartco-sidebar-readable-panel: rgba(241, 245, 249, 0.78);
    --smartco-sidebar-readable-panel-open: rgba(236, 253, 245, 0.92);
    --smartco-sidebar-readable-border: rgba(15, 23, 42, 0.11);
    --smartco-sidebar-readable-border-open: rgba(20, 184, 166, 0.34);
    --smartco-sidebar-readable-text: #0f172a;
    --smartco-sidebar-readable-muted: #475569;
    --smartco-sidebar-readable-soft: #64748b;
    --smartco-sidebar-readable-primary: #0f766e;
    --smartco-sidebar-readable-primary-strong: #0f4f4a;
    --smartco-sidebar-readable-active-bg: linear-gradient(135deg, rgba(219, 234, 254, 0.96), rgba(204, 251, 241, 0.88));
    --smartco-sidebar-readable-active-border: rgba(37, 99, 235, 0.46);
}

.sidebar,
.smartco-sidebar-shell {
    background: var(--smartco-sidebar-readable-bg) !important;
    color: var(--smartco-sidebar-readable-text) !important;
    border-inline-end: 1px solid var(--smartco-sidebar-readable-border) !important;
    box-shadow: 0.75rem 0 2rem rgba(15, 23, 42, 0.08) !important;
}

.app-shell[dir="rtl"] .sidebar {
    border-left: 1px solid var(--smartco-sidebar-readable-border) !important;
    border-right: 0 !important;
    box-shadow: -0.75rem 0 2rem rgba(15, 23, 42, 0.08) !important;
}

.app-shell[dir="ltr"] .sidebar {
    border-right: 1px solid var(--smartco-sidebar-readable-border) !important;
    border-left: 0 !important;
    box-shadow: 0.75rem 0 2rem rgba(15, 23, 42, 0.08) !important;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.38) !important;
}

.sidebar,
.sidebar * {
    text-shadow: none !important;
}

.sidebar .brand,
.app-shell .sidebar .brand {
    border-bottom: 1px solid rgba(15, 23, 42, 0.10) !important;
}

.sidebar .brand strong,
.app-shell .sidebar .brand strong {
    color: #0f172a !important;
    font-weight: 900 !important;
}

.sidebar .brand span,
.app-shell .sidebar .brand span {
    color: #64748b !important;
    font-weight: 750 !important;
}

.sidebar .brand-mark {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
    box-shadow: 0 0.65rem 1.35rem rgba(15, 23, 42, 0.12) !important;
}

.sidebar .nav-menu-search,
.app-shell .sidebar .nav-menu-search {
    padding-inline: 0.55rem !important;
}

.sidebar .nav-search-label,
.app-shell .sidebar .nav-search-label {
    color: #475569 !important;
    font-weight: 850 !important;
}

.sidebar .nav-search-control,
.app-shell .sidebar .nav-search-control {
    background: rgba(255, 255, 255, 0.88) !important;
    border: 1px solid rgba(100, 116, 139, 0.36) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 0.35rem 0.85rem rgba(15, 23, 42, 0.05) !important;
}

.sidebar .nav-search-input,
.app-shell .sidebar .nav-search-input {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
}

.sidebar .nav-search-input::placeholder,
.app-shell .sidebar .nav-search-input::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.sidebar .nav-search-clear,
.app-shell .sidebar .nav-search-clear {
    background: rgba(20, 184, 166, 0.12) !important;
    color: #0f766e !important;
    border-inline-start: 1px solid rgba(100, 116, 139, 0.26) !important;
}

.sidebar .smartco-nav-clean,
.sidebar .nav-shell {
    gap: 0.58rem !important;
}

.sidebar .nav-group,
.smartco-nav-clean .nav-group {
    background: var(--smartco-sidebar-readable-panel) !important;
    border: 1px solid var(--smartco-sidebar-readable-border) !important;
    box-shadow: 0 0.35rem 0.95rem rgba(15, 23, 42, 0.045) !important;
}

.sidebar .nav-group-expanded,
.smartco-nav-clean .nav-group-expanded {
    background: var(--smartco-sidebar-readable-panel-open) !important;
    border-color: var(--smartco-sidebar-readable-border-open) !important;
}

.sidebar .nav-group-header,
.app-shell .sidebar .nav-group-header,
.smartco-nav-clean .nav-group-header {
    color: var(--smartco-sidebar-readable-text) !important;
    background: transparent !important;
}

.sidebar .nav-group-header::after,
.smartco-nav-clean .nav-group-header::after {
    color: #64748b !important;
    opacity: 1 !important;
}

.sidebar .nav-group-label,
.app-shell .sidebar .nav-group-label,
.smartco-nav-clean .nav-group-label {
    color: var(--smartco-sidebar-readable-text) !important;
    font-weight: 900 !important;
}

.sidebar .nav-group-icon,
.app-shell .sidebar .nav-group-icon,
.smartco-nav-clean .nav-group-icon {
    background: rgba(20, 184, 166, 0.16) !important;
    color: var(--smartco-sidebar-readable-primary-strong) !important;
    border: 1px solid rgba(20, 184, 166, 0.28) !important;
    font-weight: 900 !important;
}

.sidebar .nav-link,
.sidebar .smartco-sidebar-link,
.smartco-nav-clean .nav-link {
    color: #1e293b !important;
    background: transparent !important;
    border: 1px solid transparent !important;
}

.sidebar .nav-link-text,
.smartco-nav-clean .nav-link-text {
    color: #1e293b !important;
    font-weight: 760 !important;
}

.sidebar .nav-link-meta,
.smartco-nav-clean .nav-link-meta {
    background: rgba(15, 23, 42, 0.06) !important;
    color: #475569 !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    font-weight: 850 !important;
}

.sidebar .nav-link-bullet,
.smartco-nav-clean .nav-link-bullet {
    background: rgba(100, 116, 139, 0.62) !important;
}

.sidebar .nav-link:hover,
.sidebar .smartco-sidebar-link:hover,
.smartco-nav-clean .nav-link:hover {
    background: rgba(219, 234, 254, 0.80) !important;
    border-color: rgba(37, 99, 235, 0.20) !important;
    color: #1d4ed8 !important;
    box-shadow: 0 0.35rem 0.9rem rgba(37, 99, 235, 0.08) !important;
}

.sidebar .nav-link:hover .nav-link-text,
.smartco-nav-clean .nav-link:hover .nav-link-text {
    color: #1d4ed8 !important;
}

.sidebar .nav-link.active,
.sidebar .nav-link[aria-current="page"],
.sidebar .smartco-sidebar-link.active,
.smartco-nav-clean .nav-link.active,
.smartco-nav-clean .nav-link[aria-current="page"] {
    background: var(--smartco-sidebar-readable-active-bg) !important;
    color: #1d4ed8 !important;
    border-color: var(--smartco-sidebar-readable-active-border) !important;
    box-shadow: inset 3px 0 0 #2563eb, 0 0.45rem 1rem rgba(37, 99, 235, 0.12) !important;
}

.app-shell[dir="rtl"] .sidebar .nav-link.active,
.app-shell[dir="rtl"] .sidebar .nav-link[aria-current="page"],
.app-shell[dir="rtl"] .smartco-nav-clean .nav-link.active,
.app-shell[dir="rtl"] .smartco-nav-clean .nav-link[aria-current="page"] {
    box-shadow: inset -3px 0 0 #2563eb, 0 0.45rem 1rem rgba(37, 99, 235, 0.12) !important;
}

.sidebar .nav-link.active .nav-link-text,
.sidebar .nav-link[aria-current="page"] .nav-link-text,
.smartco-nav-clean .nav-link.active .nav-link-text,
.smartco-nav-clean .nav-link[aria-current="page"] .nav-link-text {
    color: #1d4ed8 !important;
    font-weight: 900 !important;
}

.sidebar .nav-link.active .nav-link-meta,
.sidebar .nav-link[aria-current="page"] .nav-link-meta,
.smartco-nav-clean .nav-link.active .nav-link-meta,
.smartco-nav-clean .nav-link[aria-current="page"] .nav-link-meta {
    background: rgba(37, 99, 235, 0.12) !important;
    border-color: rgba(37, 99, 235, 0.22) !important;
    color: #1e40af !important;
}

.sidebar .nav-link.active .nav-link-bullet,
.sidebar .nav-link[aria-current="page"] .nav-link-bullet,
.sidebar .nav-link:hover .nav-link-bullet,
.smartco-nav-clean .nav-link.active .nav-link-bullet,
.smartco-nav-clean .nav-link[aria-current="page"] .nav-link-bullet,
.smartco-nav-clean .nav-link:hover .nav-link-bullet {
    background: #2563eb !important;
}

.sidebar .nav-search-empty,
.smartco-nav-clean .nav-search-empty {
    background: rgba(255, 255, 255, 0.78) !important;
    border-color: rgba(100, 116, 139, 0.32) !important;
    color: #475569 !important;
}
