/* =========================================================================
   Theme Redesign — Login & Dashboard
   Layers on top of the existing Hyper admin theme (app-saas.min.css).
   Loaded last, so plain selectors here win the cascade without needing
   to fight the vendor theme's CSS variable system. Only a handful of
   sidebar/topbar rules use !important, where the vendor theme sets
   backgrounds via inline-specificity CSS variables.
   ========================================================================= */

:root {
    --brand-1: #7c3aed;
    --brand-2: #b754f9;
    --brand-3: #ff5da2;
    --brand-gradient: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 55%, var(--brand-3) 100%);

    --ink-900: #150e27;
    --ink-800: #1e1533;
    --ink-700: #372952;
    --ink-500: #6b5c88;
    --ink-300: #9a8fb5;

    --surface: #ffffff;
    --surface-muted: #f7f4fc;
    --surface-border: #eae3f7;

    --success: #0acf97;
    --warning: #ffb020;
    --danger: #ff5b5b;
    --info: #3e8bff;

    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;

    --shadow-glow: 0 20px 60px -20px rgba(124, 58, 237, .45);
    --shadow-card: 0 10px 30px -18px rgba(21, 14, 39, .22);
    --shadow-soft: 0 2px 14px rgba(21, 14, 39, .06);
}

/* =========================================================================
   1. Login / Authentication
   ========================================================================= */

body.authentication-bg {
    background: var(--ink-900);
    min-height: 100vh;
    overflow-x: hidden;
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    isolation: isolate;
}

.auth-blob {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .55;
    animation: authFloat 16s ease-in-out infinite;
    pointer-events: none;
}

.auth-blob-1 { width: 560px; height: 560px; background: var(--brand-2); top: -180px; left: -140px; }
.auth-blob-2 { width: 460px; height: 460px; background: var(--brand-3); bottom: -160px; right: -120px; animation-delay: -5s; }
.auth-blob-3 { width: 320px; height: 320px; background: var(--brand-1); top: 45%; left: 62%; opacity: .35; animation-delay: -9s; }

@keyframes authFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -24px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-blob { animation: none; }
}

.auth-card {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 980px;
    min-height: 560px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-glow);
}

.auth-brand-pane {
    flex: 1 1 42%;
    position: relative;
    background: var(--brand-gradient);
    color: #fff;
    padding: 52px 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-brand-pane::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 26% 112%, rgba(255, 255, 255, .22), transparent 60%);
    pointer-events: none;
}

.auth-brand-pane .auth-logo {
    display: inline-flex;
    position: relative;
    z-index: 1;
}

.auth-brand-pane .auth-logo img {
    height: 28px;
}

.auth-brand-copy {
    position: relative;
    z-index: 1;
    margin-top: 32px;
}

.auth-brand-copy h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.auth-brand-copy p {
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .82);
    max-width: 320px;
    margin: 0;
}

.auth-highlights {
    position: relative;
    z-index: 1;
    list-style: none;
    padding: 0;
    margin: 30px 0 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-highlights li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, .92);
}

.auth-highlights li i {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.auth-form-pane {
    flex: 1 1 58%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 52px 48px;
}

.auth-form-inner {
    width: 100%;
    max-width: 380px;
}

.auth-form-inner .auth-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand-2);
    margin-bottom: 10px;
}

.auth-form-inner h4 {
    font-size: 24px;
    font-weight: 700;
    color: var(--ink-900);
}

.auth-form-inner .text-muted {
    color: var(--ink-500) !important;
}

.auth-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: 6px;
}

.auth-input-group .input-group-text {
    background: var(--surface-muted);
    border-color: var(--surface-border);
    color: var(--ink-500);
}

.auth-input-group .form-control {
    border-color: var(--surface-border);
    background: var(--surface-muted);
}

.auth-input-group .form-control:focus {
    border-color: var(--brand-2);
    background: var(--surface);
    box-shadow: 0 0 0 .2rem rgba(183, 84, 249, .15);
}

.btn-auth-primary {
    background: var(--brand-gradient);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: .68rem 1rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 24px -10px rgba(124, 58, 237, .55);
    transition: transform .15s ease, box-shadow .15s ease;
}

.btn-auth-primary:hover,
.btn-auth-primary:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -10px rgba(124, 58, 237, .65);
}

.btn-auth-primary:active {
    transform: translateY(0);
}

@media (max-width: 991.98px) {
    .auth-card {
        flex-direction: column;
        max-width: 460px;
        min-height: auto;
    }

    .auth-brand-pane {
        padding: 34px 32px;
    }

    .auth-highlights {
        display: none;
    }

    .auth-form-pane {
        padding: 40px 32px;
    }
}

/* =========================================================================
   2. Topbar
   ========================================================================= */

.navbar-custom {
    background: rgba(255, 255, 255, .86) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--surface-border);
    box-shadow: var(--shadow-soft);
}

html[data-topbar-color="dark"] .navbar-custom {
    background: rgba(21, 14, 39, .9) !important;
    border-bottom-color: rgba(255, 255, 255, .08);
}

.navbar-custom .topbar-menu .nav-link {
    border-radius: 10px;
    transition: background-color .15s ease, color .15s ease;
}

.navbar-custom .topbar-menu .nav-link:hover {
    background: var(--surface-muted);
    color: var(--brand-1);
}

.logo-topbar .logo-light img,
.logo-topbar .logo-dark img {
    height: 26px;
}

.topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 16px;
    flex: none;
}

.nav-user {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
}

.nav-user h5 {
    font-weight: 600;
    color: var(--ink-800);
    font-size: 14px;
}

/* =========================================================================
   3. Sidebar
   ========================================================================= */

.leftside-menu {
    background: linear-gradient(180deg, var(--ink-900) 0%, #1b1030 100%) !important;
    border-right: none !important;
}

.leftside-menu .side-nav-title {
    color: rgba(255, 255, 255, .35) !important;
    letter-spacing: .08em;
    font-size: 11px;
    font-weight: 700;
}

.leftside-menu .side-nav-link {
    color: rgba(255, 255, 255, .68) !important;
    border-radius: 12px;
    margin: 2px 12px;
    transition: background-color .15s ease, color .15s ease;
}

.leftside-menu .side-nav-link i {
    color: rgba(255, 255, 255, .55);
}

.leftside-menu .side-nav-link:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff !important;
}

.leftside-menu .side-nav-link:hover i {
    color: #fff;
}

.leftside-menu .side-nav-item.menuitem-active > .side-nav-link {
    background: var(--brand-gradient) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px -8px rgba(183, 84, 249, .6);
}

.leftside-menu .side-nav-item.menuitem-active > .side-nav-link i {
    color: #fff !important;
}

.leftside-menu .button-sm-hover {
    color: rgba(255, 255, 255, .5);
}

/* =========================================================================
   4. Dashboard
   ========================================================================= */

.dash-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
}

.dash-header h2 {
    font-weight: 700;
    color: var(--ink-900);
    margin: 0;
    font-size: 24px;
}

.dash-header p {
    color: var(--ink-500);
    margin: 4px 0 0;
    font-size: 13.5px;
}

.dash-picker-group {
    display: flex;
    gap: 10px;
}

.dash-picker-group select.picker {
    border-radius: 10px;
    border: 1px solid var(--surface-border);
    padding: 8px 14px;
    font-weight: 500;
    color: var(--ink-700);
    background-color: var(--surface);
}

.dash-chart-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.dash-chart-card .card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--surface-border);
    padding: 20px 24px;
}

.dash-chart-card .card-header .header-title {
    font-weight: 700;
    color: var(--ink-900);
}

.dash-chart-card .card-body {
    padding: 20px 24px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1199.98px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .stat-grid { grid-template-columns: 1fr; }
}

.stat-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 22px;
}

.stat-card .stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    color: #fff;
    margin-bottom: 16px;
}

.stat-card.stat-users .stat-icon { background: linear-gradient(135deg, #7c3aed, #b754f9); }
.stat-card.stat-posts .stat-icon { background: linear-gradient(135deg, #0acf97, #38e1b0); }
.stat-card.stat-reports .stat-icon { background: linear-gradient(135deg, #ffb020, #ff7a45); }
.stat-card.stat-withdrawals .stat-icon { background: linear-gradient(135deg, #3e8bff, #5dc1fd); }

.stat-card .stat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-500);
    margin: 0;
}

.stat-card .stat-link {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
    color: var(--brand-1);
    font-size: 12px;
    margin-left: auto;
    transition: background-color .15s ease, color .15s ease;
}

.stat-card .stat-link:hover {
    background: var(--brand-gradient);
    color: #fff;
}

.stat-card .stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--ink-900);
    margin: 8px 0 14px;
    line-height: 1;
}

.stat-card .stat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.stat-card .stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--surface-muted);
    color: var(--ink-700);
    border: 1px solid var(--surface-border);
}

.stat-card .stat-chip b {
    color: var(--ink-900);
    font-weight: 700;
}

/* =========================================================================
   5. Logo — breathing glow (login brand pane + sidebar)
   A soft white halo pulses behind the mark so it stays legible against the
   gradient/dark backgrounds instead of blending into them.
   ========================================================================= */

.auth-logo,
.leftside-menu .logo {
    position: relative;
    isolation: isolate;
}

.auth-logo img,
.leftside-menu .logo img {
    position: relative;
    filter: drop-shadow(0 2px 10px rgba(21, 14, 39, .18));
}

.auth-logo::before,
.leftside-menu .logo::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .3) 48%, rgba(255, 255, 255, 0) 74%);
    animation: logoBreathe 3.2s ease-in-out infinite;
    pointer-events: none;
}

.auth-logo::before {
    width: 150px;
    height: 150px;
    transform: translate(-50%, -50%) scale(.82);
}

.leftside-menu .logo::before {
    width: 92px;
    height: 92px;
    transform: translate(-50%, -50%) scale(.8);
}

@keyframes logoBreathe {
    0%, 100% { opacity: .48; transform: translate(-50%, -50%) scale(.8); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.18); }
}

@media (prefers-reduced-motion: reduce) {

    .auth-logo::before,
    .leftside-menu .logo::before {
        animation: none;
        opacity: .85;
        transform: translate(-50%, -50%) scale(1);
    }
}
