/* ==========================================================================
   SignalPusher — Coherent Brand Design System
   Tokens → Components. No surprise gradients. No light-on-light. No cliffs.
   ========================================================================== */

:root {
    --sp-navy-900: #0a1422;
    --sp-navy-800: #0f1c2e;
    --sp-navy-700: #142a47;
    --sp-navy-600: #1d3962;
    --sp-cyan: #30d5ff;
    --sp-cyan-soft: rgba(48, 213, 255, .12);
    --sp-purple: #7c5cff;
    --sp-page: #f4f7fb;
    --sp-card: #ffffff;
    --sp-border: #e6ecf2;
    --sp-text: #0f1c2e;
    --sp-muted: #6b7a90;
    --sp-shadow-sm: 0 4px 12px rgba(15, 28, 46, .04);
    --sp-shadow-md: 0 10px 26px rgba(15, 28, 46, .08);
    --sp-shadow-lg: 0 22px 55px rgba(15, 28, 46, .12);
}

/* --------------------------------------------------------------------------
   1. Page foundation
   -------------------------------------------------------------------------- */
html, body {
    background: var(--sp-page) !important;
    color: var(--sp-text);
}

/* Kill the harsh navy hero strip behind the topbar */
.wrapper::before {
    display: none !important;
}

.wrapper {
    background: var(--sp-page) !important;
}

main.content {
    background: var(--sp-page);
}

/* --------------------------------------------------------------------------
   2. Sidebar (solid navy, white text, cyan accent)
   -------------------------------------------------------------------------- */
.sidebar {
    background: var(--sp-navy-800) !important;
    box-shadow: 1px 0 0 rgba(255, 255, 255, .04), 8px 0 24px rgba(15, 28, 46, .12);
}

.sidebar-content {
    background: transparent !important;
}

.sidebar-brand {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: .65rem;
    padding: 1.1rem 1.4rem !important;
    color: #fff !important;
    font-weight: 700;
    letter-spacing: .005em;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    text-decoration: none !important;
}

.sidebar-brand img {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    flex-shrink: 0;
}

.sidebar-brand span {
    color: #fff !important;
}

.sidebar-user {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    padding: 1rem 1.4rem !important;
}

.sidebar-user .fw-bold,
.sidebar-user * {
    color: rgba(255, 255, 255, .9) !important;
}

.sidebar-nav {
    padding-top: .5rem !important;
}

.sidebar-header {
    color: rgba(255, 255, 255, .38) !important;
    letter-spacing: .14em;
    font-size: .68rem !important;
    text-transform: uppercase;
    padding: 1.1rem 1.5rem .35rem !important;
    font-weight: 600;
}

.sidebar-link {
    color: rgba(255, 255, 255, .78) !important;
    padding: .72rem 1.5rem !important;
    margin: 1px 0 !important;
    border-radius: 0 !important;
    border-left: 3px solid transparent !important;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    background: transparent !important;
}

.sidebar-link i,
.sidebar-link svg {
    color: rgba(255, 255, 255, .55) !important;
    margin-right: .75rem;
    width: 18px;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, .04) !important;
    color: #fff !important;
}

.sidebar-link:hover i,
.sidebar-link:hover svg {
    color: var(--sp-cyan) !important;
}

.sidebar-item.active > .sidebar-link {
    background: rgba(48, 213, 255, .10) !important;
    color: #fff !important;
    border-left-color: var(--sp-cyan) !important;
}

.sidebar-item.active > .sidebar-link i,
.sidebar-item.active > .sidebar-link svg {
    color: var(--sp-cyan) !important;
}

/* --------------------------------------------------------------------------
   3. Topbar (clean white, dark text, visible icons)
   -------------------------------------------------------------------------- */
.navbar-theme {
    background: var(--sp-card) !important;
    border-bottom: 1px solid var(--sp-border) !important;
    box-shadow: var(--sp-shadow-sm);
    min-height: 64px;
    padding: 0 1.5rem !important;
}

.navbar-theme .hamburger,
.navbar-theme .hamburger::before,
.navbar-theme .hamburger::after {
    background: var(--sp-text) !important;
}

.sidebar-toggle {
    color: var(--sp-text) !important;
    margin-right: 1rem !important;
}

.sp-topbar-context {
    flex-direction: column;
    line-height: 1.15;
    padding: .25rem 0;
}

.sp-topbar-page {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sp-text);
}

.sp-topbar-sub {
    font-size: .76rem;
    color: var(--sp-muted);
    font-weight: 500;
}

.sp-env-badge {
    background: var(--sp-cyan-soft);
    color: #067da0;
    border: 1px solid rgba(48, 213, 255, .32);
    font-weight: 700;
    border-radius: 999px;
    padding: .3rem .7rem;
    font-size: .7rem;
    letter-spacing: .04em;
}

/* --------------------------------------------------------------------------
   4. User dropdown (visible pill, avatar, name)
   -------------------------------------------------------------------------- */
.sp-user-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: .5rem;
    height: 38px;
    line-height: 1;
    color: var(--sp-text) !important;
    padding: 0 .85rem 0 .35rem !important;
    border-radius: 999px;
    border: 1px solid var(--sp-border);
    background: var(--sp-card);
    transition: background .15s ease, border-color .15s ease;
    text-decoration: none !important;
}

.sp-user-toggle:hover,
.sp-user-toggle:focus {
    background: #f0f5fb;
    border-color: rgba(48, 213, 255, .35);
    color: var(--sp-text) !important;
}

.sp-user-toggle::after {
    display: none !important;
}

.sp-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sp-cyan), var(--sp-purple));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .78rem;
    flex-shrink: 0;
}

.sp-user-name {
    font-weight: 600;
    color: var(--sp-text);
    font-size: .9rem;
}

.sp-user-chev {
    font-size: .68rem;
    color: var(--sp-muted);
}

.sp-user-menu {
    border: 1px solid var(--sp-border);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    min-width: 240px;
    box-shadow: var(--sp-shadow-lg);
}

.sp-user-menu-header {
    padding: .85rem 1rem;
    background: var(--sp-navy-800);
    color: #fff;
}

.sp-user-menu-name {
    font-weight: 700;
    color: #fff;
}

.sp-user-menu-email {
    font-size: .78rem;
    color: rgba(255, 255, 255, .65);
}

.sp-user-menu .dropdown-item {
    padding: .65rem 1rem;
    color: var(--sp-text);
    font-weight: 500;
}

.sp-user-menu .dropdown-item:hover {
    background: #f0f5fb;
    color: var(--sp-text);
}

.sp-user-menu .dropdown-divider {
    margin: 0;
    border-color: var(--sp-border);
}

/* --------------------------------------------------------------------------
   5. Page header / titles (dark text on light page bg)
   -------------------------------------------------------------------------- */
.header {
    margin-top: 0;
    margin-bottom: 1.75rem;
    padding-top: 1.5rem;
    color: var(--sp-text);
}

.header-title {
    color: var(--sp-text) !important;
    font-weight: 800;
    letter-spacing: -.005em;
    margin-bottom: .25rem;
}

.breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.breadcrumb-item,
.breadcrumb-item.active,
.breadcrumb-item a {
    color: var(--sp-muted) !important;
    font-size: .82rem;
}

/* --------------------------------------------------------------------------
   6. Cards
   -------------------------------------------------------------------------- */
.card {
    border: 1px solid var(--sp-border) !important;
    border-radius: 14px !important;
    box-shadow: var(--sp-shadow-sm);
    background: var(--sp-card);
}

.card-header {
    border-bottom: 1px solid var(--sp-border) !important;
    background: var(--sp-card);
    border-radius: 14px 14px 0 0 !important;
    padding: 1rem 1.25rem;
}

.card-title {
    color: var(--sp-text);
    font-weight: 700;
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.btn-primary {
    background: linear-gradient(135deg, var(--sp-cyan), var(--sp-purple)) !important;
    border: 0 !important;
    box-shadow: 0 8px 18px rgba(48, 213, 255, .18);
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    filter: brightness(1.05);
    box-shadow: 0 10px 22px rgba(48, 213, 255, .26);
}

/* --------------------------------------------------------------------------
   8. Footer (admin only)
   -------------------------------------------------------------------------- */
.footer {
    background: transparent !important;
    border-top: 1px solid var(--sp-border) !important;
    padding: 1rem 1.5rem !important;
}

.footer .text-muted {
    color: var(--sp-muted) !important;
}

/* --------------------------------------------------------------------------
   9. Auth (login) shell
   -------------------------------------------------------------------------- */
.sp-auth-page {
    background:
        radial-gradient(circle at top left, rgba(48, 213, 255, .14), transparent 30rem),
        radial-gradient(circle at bottom right, rgba(124, 92, 255, .12), transparent 28rem),
        var(--sp-page) !important;
}

.sp-auth-page .preloader,
.sp-auth-page .footer {
    display: none !important;
}

.sp-auth-page .wrapper,
.sp-auth-page .main {
    min-height: 100vh;
    background: transparent !important;
}

.sp-auth-page .content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.sp-auth-page #app {
    width: 100%;
}

.sp-login-logo-tile {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sp-navy-900) 0%, var(--sp-navy-700) 55%, var(--sp-cyan) 100%);
    box-shadow: 0 22px 55px rgba(15, 28, 46, .22), 0 10px 28px rgba(48, 213, 255, .22);
}

.sp-login-logo-tile img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.sp-login-card {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.sp-login-kicker {
    color: var(--sp-muted);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: .75rem;
}

/* --------------------------------------------------------------------------
   FORCE OVERRIDES — modern.css gives sidebar-brand/-user/-content/-nav their
   own white/blue backgrounds. We must explicitly override every one of them.
   -------------------------------------------------------------------------- */
.sidebar,
.sidebar .sidebar-brand,
.sidebar .sidebar-brand:hover,
.sidebar .sidebar-user,
.sidebar .sidebar-content,
.sidebar .sidebar-nav,
.sidebar .sidebar-dropdown,
.sidebar .sidebar-dropdown .sidebar-link {
    background: var(--sp-navy-800) !important;
}

.sidebar .sidebar-link,
.sidebar a.sidebar-link {
    background: transparent !important;
    color: rgba(255, 255, 255, .78) !important;
}

.sidebar .sidebar-link:hover,
.sidebar a.sidebar-link:hover {
    background: rgba(255, 255, 255, .04) !important;
    color: #fff !important;
}

.sidebar .sidebar-item.active > .sidebar-link,
.sidebar .sidebar-item.active > .sidebar-link:hover {
    background: rgba(48, 213, 255, .10) !important;
    color: #fff !important;
}

.sidebar .sidebar-dropdown .sidebar-item .sidebar-link:hover {
    background: rgba(255, 255, 255, .04) !important;
    color: #fff !important;
}

.sidebar .sidebar-brand,
.sidebar .sidebar-brand:hover {
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.sidebar .sidebar-user {
    color: rgba(255, 255, 255, .9) !important;
    text-align: left !important;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}


/* Topbar right padding + nav-link override so the pill behaves */
.navbar-theme {
    padding-right: 1.5rem !important;
}
.navbar-theme .nav-link.sp-user-toggle {
    padding: 0 .85rem 0 .35rem !important;
}
.navbar-theme .nav-item.dropdown {
    margin-right: .25rem;
}
.sp-user-name {
    font-size: .87rem;
    line-height: 1;
}
.sp-user-chev {
    font-size: .65rem;
    line-height: 1;
    color: var(--sp-muted);
    margin-left: .15rem;
}
.sp-env-badge {
    line-height: 1.4;
}
