:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --border: #e8edf5;
    --text: #18212f;
    --muted: #718096;
    --sidebar: #0f172a;
    --sidebar-soft: #111c34;
    --primary: #2563eb;
    --primary-2: #1d4ed8;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --shadow: 0 10px 30px rgba(15, 23, 42, .08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

/* =========================================================
   AUTH / LOGIN PAGE
========================================================= */
body.auth-body {
    min-height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .10), transparent 28%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, .08), transparent 24%),
        linear-gradient(135deg, #eef4ff 0%, #f8fbff 50%, #f4f7fb 100%);
}

.auth-page {
    height: 100dvh;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    overflow: hidden;
}

.auth-left {
    position: relative;
    padding: 34px 42px;
    background:
        radial-gradient(circle at 18% 16%, rgba(59,130,246,.18), transparent 22%),
        radial-gradient(circle at 82% 82%, rgba(16,185,129,.12), transparent 22%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 28, 52, 0.96));
    color: #fff;
    overflow: hidden;
}

.auth-left::before {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.12);
    top: -90px;
    left: -100px;
    filter: blur(24px);
}

.auth-left::after {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.10);
    bottom: -70px;
    right: -60px;
    filter: blur(22px);
}

.auth-left-content {
    position: relative;
    z-index: 2;
    height: 100%;
    max-width: 620px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 4px;
}

.brand-badge,
.auth-mobile-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: linear-gradient(135deg, #3b82f6, #7c3aed);
    color: white;
    box-shadow: 0 14px 34px rgba(59, 130, 246, .30);
    flex-shrink: 0;
}

.brand-company {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 16px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.brand-company img {
    height: 30px;
    width: auto;
    object-fit: contain;
    display: block;
}

.app-hero-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 8px 0 2px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.app-logo-wrap {
    width: 90px;
    height: 90px;
    border-radius: 24px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.09);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    flex-shrink: 0;
}



.app-logo-hero {
    width: 110px;
    height: 110px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}


.app-hero-text {
    min-width: 0;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: .35rem .7rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, .14);
    border: 1px solid rgba(255,255,255,.08);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #c7d2fe;
    margin-bottom: .65rem;
}

.auth-title {
    font-size: clamp(2rem, 2.5vw, 2.7rem);
    font-weight: 800;
    line-height: 1.08;
    margin: 0 0 .55rem;
    color: #ffffff;
    letter-spacing: -.02em;
}

.auth-subtitle {
    font-size: .98rem;
    line-height: 1.7;
    color: rgba(255,255,255,.78);
    max-width: 100%;
    margin: 0;
}

.auth-feature-list {
    display: grid;
    gap: 10px;
    margin-top: 2px;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.07);
}

.auth-feature-icon,
.auth-feature-item i {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.08);
    color: #ffffff;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.auth-feature-body {
    min-width: 0;
}

.auth-feature-body strong {
    display: block;
    font-size: .95rem;
    line-height: 1.3;
    color: #ffffff;
    margin-bottom: .15rem;
    font-weight: 700;
}

.auth-feature-body span {
    display: block;
    font-size: .85rem;
    line-height: 1.5;
    color: rgba(255,255,255,.68);
}

.download-card {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
}

.download-title {
    color: #ffffff;
    font-size: .98rem;
    font-weight: 800;
    margin-bottom: .2rem;
}

.download-subtitle {
    color: rgba(255,255,255,.70);
    font-size: .85rem;
    line-height: 1.55;
    margin-bottom: .85rem;
}

.download-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.store-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 7px 12px;
    border-radius: 16px;
    background: rgba(8, 15, 30, .42);
    border: 1px solid rgba(255,255,255,.10);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .14);
}

.store-button:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,.16);
}

.store-button img {
    display: block;
    height: 36px;
    width: auto;
    object-fit: contain;
}

.auth-left-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    padding: .4rem .75rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 700;
    color: #dbeafe;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(255,255,255,.08);
}

.footer-divider {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
}

.footer-text {
    color: rgba(255,255,255,.68);
    font-size: .84rem;
}

.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 100dvh;
    overflow: hidden;
}

.auth-card-wrap {
    width: 100%;
    max-width: 430px;
}

.auth-card,
.login-card {
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 20px 60px rgba(15, 23, 42, .12);
    border-radius: 28px;
    padding: 28px;
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: #0f172a;
    line-height: 1.15;
}

.login-subtitle {
    color: var(--muted);
    font-size: .98rem;
    line-height: 1.6;
    margin-bottom: 1.4rem;
}

.login-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
    font-size: .95rem;
}

.input-icon-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
    z-index: 2;
}

.modern-input {
    height: 52px;
    border-radius: 16px;
    border: 1px solid #d9e2ef;
    padding-left: 44px;
    font-size: 15px;
    box-shadow: none !important;
    background: rgba(255,255,255,.92);
}

.modern-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .10) !important;
}

.btn-login {
    height: 52px;
    border-radius: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border: 0;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .20);
}

.auth-footer-text {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

/* =========================================================
   PANEL LAYOUT
========================================================= */
.panel-body {
    background: var(--bg);
}

.panel-wrapper {
    min-height: 100vh;
    display: flex;
}

.app-sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--sidebar), #0b1325);
    color: white;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    overflow-y: auto;
    box-shadow: 8px 0 30px rgba(2, 8, 23, .18);
}

.sidebar-top {
    margin-bottom: 24px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.sidebar-brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 12px 24px rgba(59, 130, 246, .25);
}

.sidebar-brand-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
}

.sidebar-brand-subtitle {
    color: rgba(255,255,255,.65);
    font-size: 13px;
}

.sidebar-user-card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.sidebar-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: white;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-user-name {
    font-weight: 700;
    font-size: 15px;
}

.sidebar-user-role {
    font-size: 13px;
    color: rgba(255,255,255,.76);
}

.sidebar-user-email {
    font-size: 12px;
    color: rgba(255,255,255,.54);
    margin-top: 2px;
    word-break: break-word;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-section-title {
    font-size: 11px;
    color: rgba(255,255,255,.45);
    letter-spacing: .12em;
    font-weight: 700;
    margin: 14px 8px 8px;
}

.sidebar-link {
    text-decoration: none;
    color: rgba(255,255,255,.84);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 14px;
    transition: .2s ease;
    font-weight: 500;
}

.sidebar-link:hover {
    background: rgba(255,255,255,.07);
    color: white;
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(37,99,235,.22), rgba(124,58,237,.22));
    color: white;
    border: 1px solid rgba(255,255,255,.08);
}

.sidebar-link i {
    font-size: 17px;
}

.panel-main {
    flex: 1;
    margin-left: 280px;
    min-width: 0;
}

.topbar {
    height: 84px;
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-topbar-toggle {
    border: 1px solid var(--border);
    background: white;
    border-radius: 12px;
    width: 42px;
    height: 42px;
    box-shadow: var(--shadow);
}

.topbar-title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
}

.topbar-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px 14px;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
}

.topbar-user-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.topbar-user-name {
    font-weight: 700;
    font-size: 14px;
}

.topbar-user-role {
    font-size: 12px;
    color: var(--muted);
}

.btn-logout {
    border-radius: 14px;
    font-weight: 600;
    padding: 10px 16px;
}

.panel-content {
    padding: 28px;
}

/* CARDS */
.stat-card,
.content-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 132px;
}

.stat-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-label {
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 36px;
    line-height: 1;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.stat-note {
    font-size: 13px;
    color: #94a3b8;
}

.content-card {
    overflow: hidden;
}

.content-card-header {
    padding: 22px 22px 10px;
}

.content-card-header h5 {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
}

/* TABLE */
.modern-table {
    margin: 0;
}

.modern-table thead th {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 1px solid var(--border);
    padding: 16px 22px;
    background: #fbfdff;
}

.modern-table tbody td {
    padding: 16px 22px;
    border-color: var(--border);
    vertical-align: middle;
}

.modern-table tbody tr:hover {
    background: #f8fbff;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 94px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-status.success {
    background: rgba(16,185,129,.12);
    color: #047857;
}

.badge-status.warning {
    background: rgba(245,158,11,.14);
    color: #b45309;
}

.badge-status.danger {
    background: rgba(239,68,68,.12);
    color: #b91c1c;
}

.badge-status.secondary {
    background: rgba(100,116,139,.12);
    color: #475569;
}

/* MOBILE */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 23, .45);
    opacity: 0;
    visibility: hidden;
    transition: .2s;
    z-index: 1035;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

    @media (max-width: 991.98px) {
        body.auth-body {
            overflow: auto;
        }

        .auth-page {
            grid-template-columns: 1fr;
            height: auto;
            min-height: 100dvh;
        }

        .auth-left {
            display: none !important;
        }

        .auth-right {
            padding: 20px;
            min-height: 100dvh;
        }

        .auth-card,
        .login-card {
            padding: 24px;
            border-radius: 24px;
        }

        .app-sidebar {
            transform: translateX(-100%);
            transition: transform .25s ease;
        }

        .app-sidebar.show {
            transform: translateX(0);
        }

        .panel-main {
            margin-left: 0;
        }

        .topbar {
            padding: 0 16px;
            height: 76px;
        }

        .topbar-title {
            font-size: 22px;
        }

        .panel-content {
            padding: 16px;
        }

        .content-card-header h5 {
            font-size: 20px;
        }

        .stat-card {
            min-height: auto;
        }
    }

    @media (max-width: 575.98px) {
        .topbar-title {
            font-size: 18px;
        }

        .topbar-subtitle {
            display: none;
        }

        .modern-table thead th,
        .modern-table tbody td {
            padding: 14px 14px;
            font-size: 13px;
        }

        .auth-card,
        .login-card {
            padding: 20px;
        }

        .login-title {
            font-size: 24px;
        }
    }

    @media (max-height: 860px) and (min-width: 992px) {
        .auth-left {
            padding: 24px 34px;
        }

        .auth-left-content {
            gap: 14px;
        }

        .brand-badge {
            width: 56px;
            height: 56px;
            border-radius: 18px;
            font-size: 24px;
        }

        .brand-company img {
            max-height: 20px;
        }

        .app-hero-card {
            padding: 16px 18px;
            gap: 14px;
        }

    

        .hero-kicker {
            margin-bottom: .5rem;
            font-size: .68rem;
        }

        .auth-title {
            font-size: 1.9rem;
            margin-bottom: .45rem;
        }

        .auth-subtitle {
            font-size: .9rem;
            line-height: 1.55;
        }

        .auth-feature-item {
            padding: 10px 12px;
            gap: 10px;
        }

        .auth-feature-icon {
            width: 38px;
            height: 38px;
            border-radius: 12px;
            font-size: .95rem;
        }

        .auth-feature-body strong {
            font-size: .88rem;
        }

        .auth-feature-body span {
            font-size: .78rem;
            line-height: 1.4;
        }

        .download-card {
            padding: 14px 16px;
        }

        .download-title {
            font-size: .92rem;
        }

        .download-subtitle {
            font-size: .8rem;
            line-height: 1.45;
            margin-bottom: .7rem;
        }

        .store-button {
            min-height: 50px;
            padding: 6px 10px;
        }

        .store-button img {
            height: 31px;
        }

        .footer-badge,
        .footer-text {
            font-size: .74rem;
        }

        .auth-right {
            padding: 18px;
        }

        .auth-card,
        .login-card {
            padding: 24px;
            border-radius: 24px;
        }

        .login-title {
            font-size: 1.75rem;
        }

        .login-subtitle {
            font-size: .9rem;
            margin-bottom: 1rem;
        }

        .modern-input,
        .btn-login {
            height: 48px;
        }


        @media (max-height: 860px) and (min-width: 992px) {
        .brand-company img {
            height: 26px;
        }

        .brand-badge {
            width: 52px;
            height: 52px;
            font-size: 23px;
        }

        .app-hero-card {
            gap: 14px;
            padding: 4px 0 0;
        }

        .app-logo-hero {
            width: 86px;
            height: 86px;
        }

        .auth-title {
            font-size: 1.9rem;
        }

        .auth-subtitle {
            font-size: .9rem;
            line-height: 1.55;
        }
    }
}