/*!
 * theme-refresh.css — modern UI refresh over SB Admin 2 (affiliate portal only).
 * Additive layer loaded after sb-admin-2.css. Remove the <link> in
 * auth-layout.cover.tpl to fully roll back. No structural widths are changed.
 */

:root {
    --rx-primary: #1d95fa;
    --rx-primary-600: #0b73e6;
    --rx-primary-700: #0a5fc0;
    --rx-ink: #2b3145;
    --rx-muted: #8a93a5;
    --rx-bg: #eef2f8;
    --rx-line: #eceff5;
    --rx-radius: 1rem;
    --rx-radius-sm: 0.7rem;
}

/* ---------- Base ---------- */
body#page-top {
    background-color: var(--rx-bg);
    color: #3d4257;
    font-family: "Inter", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
    color: var(--rx-ink);
    font-weight: 700;
    letter-spacing: -0.01em;
}

a { color: var(--rx-primary-600); }
a:hover { color: var(--rx-primary-700); }

/* ---------- Cards & shadows ---------- */
.card {
    border: none;
    border-radius: var(--rx-radius);
    box-shadow: 0 1px 3px rgba(20, 30, 60, 0.05), 0 8px 24px rgba(20, 30, 60, 0.06);
    transition: box-shadow 0.2s ease;
}
.card.shadow, .card.shadow-lg { box-shadow: 0 1px 3px rgba(20, 30, 60, 0.05), 0 10px 30px rgba(20, 30, 60, 0.08) !important; }
.card.shadow:hover, .card.shadow-lg:hover { box-shadow: 0 6px 16px rgba(20, 30, 60, 0.08), 0 18px 44px rgba(20, 30, 60, 0.12) !important; }
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--rx-line);
    border-top-left-radius: var(--rx-radius) !important;
    border-top-right-radius: var(--rx-radius) !important;
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.card-header h6 { color: var(--rx-ink) !important; letter-spacing: 0.01em; }

.shadow { box-shadow: 0 1px 3px rgba(20, 30, 60, 0.05), 0 10px 30px rgba(20, 30, 60, 0.07) !important; }
.shadow-sm { box-shadow: 0 1px 2px rgba(20, 30, 60, 0.06), 0 4px 12px rgba(20, 30, 60, 0.05) !important; }

/* Left-accent stat cards */
.border-left-primary { border-left: 0.28rem solid var(--rx-primary) !important; }
.border-left-success { border-left: 0.28rem solid #22c55e !important; }
.border-left-info    { border-left: 0.28rem solid #36b9cc !important; }
.border-left-warning { border-left: 0.28rem solid #f6c23e !important; }

/* ---------- Buttons ---------- */
.btn {
    border-radius: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background-image 0.15s ease;
}
.btn-primary {
    background-image: linear-gradient(135deg, #2a97ff, var(--rx-primary-600));
    border: none;
    box-shadow: 0 4px 12px rgba(13, 115, 230, 0.28);
}
.btn-primary:hover {
    transform: translateY(-1px);
    background-image: linear-gradient(135deg, var(--rx-primary), var(--rx-primary-700));
    box-shadow: 0 6px 18px rgba(13, 115, 230, 0.36);
}
.btn-primary:focus, .btn-primary.focus { box-shadow: 0 0 0 0.2rem rgba(29, 149, 250, 0.4); }
.btn-success { background-image: linear-gradient(135deg, #2ecc71, #16a34a); border: none; }
.btn-user { border-radius: 2rem; padding: 0.7rem 1rem; }
.btn-block.btn-user { padding: 0.8rem 1rem; }

/* ---------- Forms ---------- */
.form-control {
    border-radius: 0.6rem;
    border: 1px solid #dfe3ec;
    padding: 0.55rem 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus {
    border-color: var(--rx-primary);
    box-shadow: 0 0 0 0.2rem rgba(29, 149, 250, 0.15);
}
.form-control-user {
    border-radius: 2rem !important;
    padding: 1.1rem 1.25rem;
    font-size: 0.9rem;
}

/* ---------- Topbar ---------- */
.topbar {
    background-image: linear-gradient(90deg, var(--rx-primary-600) 0%, #1596f5 100%) !important;
    box-shadow: 0 2px 14px rgba(11, 95, 206, 0.25) !important;
}
.topbar #sidebarToggleTop { color: rgba(255, 255, 255, 0.9); }
.topbar .nav-item .nav-link { color: rgba(255, 255, 255, 0.92) !important; }
.topbar .topbar-divider { border-right: 1px solid rgba(255, 255, 255, 0.25); }
.topbar .img-profile { border: 2px solid rgba(255, 255, 255, 0.5); }

/* ---------- Sidebar ---------- */
.sidebar {
    background: #ffffff !important;
    border-right: 1px solid var(--rx-line);
    box-shadow: 2px 0 14px rgba(20, 30, 60, 0.03);
}
.sidebar-dark hr.sidebar-divider { border-top: 1px solid var(--rx-line); }
.sidebar-dark .nav-item .nav-link { color: #5b6270; font-weight: 500; }
.sidebar-dark .nav-item .nav-link i { color: #9aa2b1; transition: color 0.15s ease; }

.sidebar-dark .nav-item .nav-link:hover,
.sidebar-dark .nav-item .nav-link:focus {
    background: #f1f6ff !important;
    color: var(--rx-primary-600) !important;
    border-left: none !important;
    border-radius: var(--rx-radius-sm) !important;
}
.sidebar-dark .nav-item .nav-link:hover i,
.sidebar-dark .nav-item .nav-link:focus i { color: var(--rx-primary-600) !important; }

.sidebar-dark .nav-item.active .nav-link {
    background: linear-gradient(135deg, #2a97ff, var(--rx-primary-600)) !important;
    color: #fff !important;
    border-left: none !important;
    border-radius: var(--rx-radius-sm) !important;
    box-shadow: 0 4px 12px rgba(13, 115, 230, 0.32);
}
.sidebar-dark .nav-item.active .nav-link i { color: #fff !important; }

/* inset pill look without touching sidebar/nav-link widths on mobile */
@media (min-width: 768px) {
    .sidebar .nav-item .nav-link {
        width: auto;
        margin: 0.12rem 0.6rem;
        padding: 0.7rem 0.9rem;
        border-radius: var(--rx-radius-sm);
    }
}

/* Sidebar submenu (collapse) */
.sidebar .nav-item .collapse .collapse-inner,
.sidebar .nav-item .collapsing .collapse-inner {
    border-radius: var(--rx-radius-sm) !important;
    box-shadow: 0 6px 20px rgba(20, 30, 60, 0.1) !important;
    border-left: none !important;
}
.sidebar .collapse-item { color: #5b6270; }
.sidebar .collapse-item:hover { background-color: #f1f6ff !important; color: var(--rx-primary-600); }
.sidebar .collapse-item.active { color: var(--rx-primary-600) !important; font-weight: 700; }

.sidebar #sidebarToggle { background: rgba(29, 149, 250, 0.12); }
.sidebar #sidebarToggle:hover { background: rgba(29, 149, 250, 0.22); }
.sidebar-dark #sidebarToggle::after { color: var(--rx-primary-600); }

/* ---------- Tables ---------- */
.table thead th {
    border-bottom: 2px solid var(--rx-line);
    border-top: none;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--rx-muted);
    font-weight: 700;
}
.table td, .table th { border-top: 1px solid #f0f2f7; }
.table-bordered td, .table-bordered th { border: 1px solid var(--rx-line); }
.table tbody tr { transition: background-color 0.12s ease; }
.table:not(.table-inner) tbody tr:hover { background-color: #f7f9fd; }

/* ---------- Misc ---------- */
.dropdown-menu {
    border: none;
    border-radius: var(--rx-radius-sm);
    box-shadow: 0 8px 28px rgba(20, 30, 60, 0.14);
}
.dropdown-item:active { background-color: var(--rx-primary); }
.alert { border: none; border-radius: var(--rx-radius-sm); }
.badge { border-radius: 0.5rem; font-weight: 600; }
.list-group-item { border-color: var(--rx-line); }

.scroll-to-top {
    background: linear-gradient(135deg, var(--rx-primary), var(--rx-primary-600));
    border-radius: var(--rx-radius-sm);
    box-shadow: 0 4px 12px rgba(13, 115, 230, 0.32);
    line-height: 44px;
}
.scroll-to-top:hover { background: linear-gradient(135deg, var(--rx-primary-600), var(--rx-primary-700)); }

.sticky-footer { background: transparent; }
.sticky-footer .copyright { color: var(--rx-muted); }

/* Custom scrollbar for a cleaner modern feel */
* { scrollbar-width: thin; scrollbar-color: #c7cedd transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #c7cedd; border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #aeb7ca; }
