/*
  SL theme - overrides Lucid main.css. Load after main.css and color_skins.css,
  with <body class="theme-sl">. Colours come from the SL logo gradient.
*/
:root {
    --sl-blue: #1d4ed8;
    --sl-teal: #0a92b5;
    --sl-grad: linear-gradient(135deg, #1d4ed8 0%, #0a92b5 100%);
    --sl-bg: #f2f6fa;
    --sl-surface: #ffffff;
    --sl-border: #e6ebf1;
    --sl-text: #2b3445;
    --sl-muted: #7a8699;
    --sl-radius: 12px;
    --sl-shadow: 0 2px 12px rgba(20, 45, 90, .06);
}

/* ---------- Base ---------- */
body.theme-sl {
    background: var(--sl-bg);
    font-family: "Rubik", "Ubuntu", sans-serif;
    color: var(--sl-text);
}
body.theme-sl:before, body.theme-sl:after,
.theme-sl #wrapper:before, .theme-sl #wrapper:after { display: none; }
.theme-sl ::selection { color: #fff; background: var(--sl-blue); }
.theme-sl a { color: var(--sl-blue); }
.theme-sl a:hover { color: var(--sl-teal); }

/* ---------- Page loader ---------- */
.theme-sl .page-loader-wrapper { background: var(--sl-surface); }
.theme-sl .page-loader-wrapper p { color: var(--sl-muted); }
.theme-sl .page-loader-wrapper img { width: 72px; height: auto; animation: sl-pulse 1.2s ease-in-out infinite; }
@keyframes sl-pulse { 50% { opacity: .45; transform: scale(.94); } }
.theme-sl .spinner { border-left-color: var(--sl-teal); }

/* ---------- Top bar ---------- */
.theme-sl .navbar-fixed-top {
    top: 0;
    height: 64px;
    background: var(--sl-surface);
    box-shadow: none;
    border-bottom: 1px solid var(--sl-border);
}
.theme-sl .navbar-fixed-top .navbar-brand { padding: 0; margin-right: 0; height: 64px; display: flex; align-items: center; width: 210px; }
.theme-sl .navbar-fixed-top .navbar-brand a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.theme-sl .navbar-fixed-top .navbar-brand img { width: 52px; margin: 0; }
.theme-sl .navbar-brand .brand-text { font-weight: 600; font-size: 19px; letter-spacing: .3px; color: var(--sl-text); }
.theme-sl .navbar-brand .brand-text b {
    background: var(--sl-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.theme-sl .navbar-fixed-top .navbar-right { padding-top: 6px; }
.theme-sl .navbar-nav .icon-menu { padding: 14px 12px; }
.theme-sl .navbar-nav .icon-menu i { color: var(--sl-muted); transition: color .2s; }
.theme-sl .navbar-nav .icon-menu:hover i { color: var(--sl-blue); }
.theme-sl .navbar-nav .icon-menu .notification-dot { background: #f04f6e; box-shadow: 0 0 0 2px #fff; }
.theme-sl .navbar-fixed-top > .container-fluid { flex-wrap: nowrap; align-items: center; height: 64px; }
.theme-sl .navbar-fixed-top .navbar-btn button { color: var(--sl-text); padding: 0 12px 0 0; }
@media screen and (max-width: 1200px) {
    .theme-sl .navbar-fixed-top .navbar-brand { width: auto; }
    .theme-sl .navbar-fixed-top .navbar-right { width: auto; margin-left: auto; padding-top: 0; }
}
@media screen and (max-width: 480px) {
    .theme-sl .navbar-brand .brand-text { display: none; }
}

/* Dropdowns: light cards instead of Lucid's black menus */
.theme-sl .navbar-nav ul.notifications,
.theme-sl .user-account .dropdown .dropdown-menu,
.theme-sl .card .header .header-dropdown li .dropdown-menu {
    background: var(--sl-surface);
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius);
    box-shadow: 0 10px 30px rgba(20, 45, 90, .12);
}
.theme-sl .navbar-nav ul.notifications li { border-bottom-color: var(--sl-border); }
.theme-sl .navbar-nav ul.notifications li > a:hover { background: var(--sl-bg); }
.theme-sl .user-account .dropdown .dropdown-menu a,
.theme-sl .card .header .header-dropdown li .dropdown-menu li a { color: var(--sl-text); }
.theme-sl .user-account .dropdown .dropdown-menu a:hover,
.theme-sl .user-account .dropdown .dropdown-menu a:hover i,
.theme-sl .card .header .header-dropdown li .dropdown-menu li a:hover { color: var(--sl-blue); }
.theme-sl .user-account .dropdown .dropdown-menu li.divider { border-bottom-color: var(--sl-border); }

/* ---------- Sidebar ---------- */
.theme-sl #left-sidebar {
    left: 0;
    margin-top: 64px;
    height: calc(100% - 64px);
    background: var(--sl-surface);
    border-right: 1px solid var(--sl-border);
}
.theme-sl.offcanvas-active #left-sidebar { left: 0; }
@media screen and (max-width: 1200px) {
    .theme-sl #left-sidebar { left: -250px; }
}

.theme-sl .user-account {
    margin: 18px 15px 10px;
    padding: 14px;
    border-radius: var(--sl-radius);
    background: var(--sl-bg);
    display: flex; align-items: center; gap: 12px;
}
.theme-sl .user-account .user-photo { width: 44px !important; height: 44px; object-fit: cover; border: 2px solid #fff; box-shadow: var(--sl-shadow); }
.theme-sl .user-account .dropdown span { color: var(--sl-muted); font-size: 12px; display: block; }
.theme-sl .user-account .user-name strong { color: var(--sl-text); }

.theme-sl #left-sidebar .nav-tabs { border: 0; padding: 4px 15px 0; }
.theme-sl #left-sidebar .nav-tabs .nav-link {
    border: 0; padding: 6px 0; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; color: var(--sl-muted);
}
.theme-sl #left-sidebar .nav-tabs .nav-link.active { color: var(--sl-muted); background: none; }

.theme-sl .sidebar-nav .metismenu { padding-bottom: 30px; }
.theme-sl .sidebar-nav .metismenu > li { margin: 0 12px 2px; }
.theme-sl .sidebar-nav .metismenu > li a { border-left: 0; }
.theme-sl .sidebar-nav .metismenu a {
    color: var(--sl-text); font-size: 14px; padding: 11px 14px; border-radius: 10px;
}
.theme-sl .sidebar-nav .metismenu > li i { color: var(--sl-muted); width: 22px; margin-right: 8px; transition: color .2s; }
.theme-sl .sidebar-nav .metismenu a:hover,
.theme-sl .sidebar-nav .metismenu a:focus { background: var(--sl-bg); color: var(--sl-blue); }
.theme-sl .sidebar-nav .metismenu a:hover i { color: var(--sl-blue); }

/* Active top-level item: logo gradient pill (Hyrax style) */
.theme-sl .sidebar-nav .metismenu > li.active > a {
    background: var(--sl-grad);
    color: #fff;
    box-shadow: 0 6px 16px rgba(29, 78, 216, .25);
}
.theme-sl .sidebar-nav .metismenu > li.active > a i,
.theme-sl .sidebar-nav .metismenu > li.active > a::after { color: #fff; border-color: #fff; }

.theme-sl .sidebar-nav .metismenu ul { margin-top: 2px; }
.theme-sl .sidebar-nav .metismenu ul a { color: var(--sl-muted); font-size: 13.5px; padding: 8px 14px 8px 48px; }
.theme-sl .sidebar-nav .metismenu ul a::before {
    content: ''; left: 27px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
    border-radius: 50%; border: 1.5px solid currentColor;
}
.theme-sl .sidebar-nav .metismenu ul li.active > a,
.theme-sl .sidebar-nav .metismenu ul a.active { color: var(--sl-blue); font-weight: 500; background: none; }
.theme-sl .sidebar-nav .metismenu ul li.active > a::before { background: currentColor; }
.theme-sl .sidebar-nav .metismenu > li .active a { font-weight: 400; }

/* ---------- Content ---------- */
.theme-sl #main-content { margin-top: 64px; padding: 20px 20px 10px; }
.theme-sl .block-header { padding: 6px 0 14px; }
.theme-sl .block-header h2 { font-weight: 500; color: var(--sl-text); }
.theme-sl .block-header .breadcrumb { padding: 0; margin: 4px 0 0; }
.theme-sl .breadcrumb-item.active { color: var(--sl-muted); }

.theme-sl .card {
    border-radius: var(--sl-radius);
    border: 0;
    box-shadow: var(--sl-shadow);
    margin-bottom: 24px;
}
.theme-sl .card .header { padding: 18px 20px 6px; }
.theme-sl .card .header h2 { font-size: 16px; font-weight: 500; color: var(--sl-text); }
.theme-sl .card .body { color: var(--sl-text); }

/* ---------- Controls ---------- */
.theme-sl .btn { border-radius: 8px; }
.theme-sl .btn-primary,
.theme-sl .auth-main .btn-primary {
    background: var(--sl-grad); border: 0; color: #fff;
    box-shadow: 0 4px 12px rgba(29, 78, 216, .22);
}
.theme-sl .btn-primary:hover, .theme-sl .btn-primary:focus,
.theme-sl .btn-primary:not(:disabled):not(.disabled):active {
    background: var(--sl-grad); filter: brightness(1.08); color: #fff;
}
.theme-sl .btn-outline-primary { color: var(--sl-blue); border-color: var(--sl-blue); }
.theme-sl .btn-outline-primary:hover { background: var(--sl-blue); border-color: var(--sl-blue); color: #fff; }
.theme-sl .text-primary { color: var(--sl-blue) !important; }
.theme-sl .bg-primary, .theme-sl .badge-primary { background: var(--sl-blue) !important; }
.theme-sl .badge-info, .theme-sl .bg-info { background: var(--sl-teal) !important; }

.theme-sl .form-control { border-radius: 8px; border-color: var(--sl-border); }
.theme-sl .form-control:focus {
    border-color: var(--sl-teal);
    box-shadow: 0 0 0 3px rgba(10, 146, 181, .15);
}
.theme-sl .fancy-checkbox input[type="checkbox"]:checked + span:before {
    background: var(--sl-blue); border-color: var(--sl-blue);
}

.theme-sl .table thead th {
    border-top: 0; border-bottom: 1px solid var(--sl-border);
    color: var(--sl-muted); font-weight: 500; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px;
}
.theme-sl .table td { border-top-color: var(--sl-border); }
.theme-sl .page-item.active .page-link { background: var(--sl-blue); border-color: var(--sl-blue); }
.theme-sl .modal-content { border: 0; border-radius: var(--sl-radius); }
