:root {
    --brand-950: #0b1220;
    --brand-900: #121c30;
    --brand-800: #1a2942;
    --brand-700: #22375a;
    --brand-accent: #2f6fed;
    --brand-accent-light: #5b8def;
    --sidebar-width: 264px;
    --sidebar-width-collapsed: 76px;
    --navbar-height: 64px;
    --surface: #f4f6f9;
    --card-radius: 0.75rem;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--surface);
    color: #1c2430;
    /* zoom:80%; */
}
html{
    font-size:13px;  
}

/* ---------------- Layout Shell ---------------- */
.app-wrapper { min-height: 100vh; }

.app-navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--navbar-height);
    background: linear-gradient(90deg, var(--brand-950), var(--brand-800));
    z-index: 1040;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.brand-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: var(--brand-accent);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
}

.brand-text { color: #fff; font-weight: 600; letter-spacing: .3px; }

.avatar-circle {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}

.role-badge {
    padding: .4rem .75rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: .75rem;
}
.role-badge.role-super_admin { background: rgba(47,111,237,.18); color: #9db8f5; }
.role-badge.role-reseller { background: rgba(201,162,39,.18); color: #e3c974; }
.role-badge.role-admin { background: rgba(76,122,63,.2); color: #9ccb8b; }

/* ---------------- Sidebar (dark, per spec) ---------------- */
.app-sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--brand-900);
    z-index: 1030;
    transition: transform .25s ease, width .25s ease;
    overflow-y: auto;
}

.sidebar-inner { padding: 1rem 0.75rem; }

.sidebar-menu-title {
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    font-size: .7rem;
    letter-spacing: .08em;
    margin: 1rem 0.75rem 0.4rem;
}
.sidebar-menu-title:first-child { margin-top: .25rem; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .75rem;
    border-radius: .5rem;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    font-size: .92rem;
    margin-bottom: .15rem;
    transition: background .15s ease, color .15s ease;
}

.sidebar-link i { font-size: 1.05rem; width: 20px; text-align: center; }

.sidebar-link:hover:not(.disabled) { background: rgba(255,255,255,.08); color: #fff; }

.sidebar-link.active {
    background: var(--brand-accent);
    color: #fff;
    font-weight: 600;
}

.sidebar-link.disabled { opacity: .4; pointer-events: none; }

.sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 1020;
}

.app-wrapper.sidebar-collapsed .app-sidebar { width: var(--sidebar-width-collapsed); }
.app-wrapper.sidebar-collapsed .app-sidebar .brand-text,
.app-wrapper.sidebar-collapsed .app-sidebar .sidebar-menu-title,
.app-wrapper.sidebar-collapsed .app-sidebar .sidebar-link span { display: none; }
.app-wrapper.sidebar-collapsed .app-content { margin-left: var(--sidebar-width-collapsed); }

/* ---------------- Content Area ---------------- */
.app-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
    display: flex;
    flex-direction: column;
    transition: margin-left .25s ease;
}

.app-breadcrumb { font-size: .85rem; }

.app-footer {
    margin-top: auto;
    background: #fff;
    border-top: 1px solid #e7ebef;
}

/* ---------------- Cards / Stats ---------------- */
.card { border-radius: var(--card-radius); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}

.btn-brand {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
    color: #fff;
    font-weight: 600;
    border-radius: .5rem;
}
.btn-brand:hover, .btn-brand:focus {
    background-color: var(--brand-accent-light);
    border-color: var(--brand-accent-light);
    color: #fff;
}

/* ---------------- Login Page ---------------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, var(--brand-800), var(--brand-950));
    font-family: 'Inter', sans-serif;
    padding: 1.5rem;
}

.login-wrapper { width: 100%; max-width: 420px; }

.login-card { background: #fff; border-radius: 1rem; padding: 2.25rem 2rem; }

.login-brand-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--brand-900);
    color: var(--brand-accent-light);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); width: 264px; }
    .app-wrapper.sidebar-open .app-sidebar { transform: translateX(0); }
    .app-wrapper.sidebar-open .sidebar-backdrop { display: block; }
    .app-content { margin-left: 0 !important; }
}

@media (max-width: 575.98px) {
    .login-card { padding: 1.75rem 1.25rem; }
}
