:root {
    --brand: #25D366;
    --brand-dark: #128C7E;
    --brand-darker: #075E54;
    --sidebar-bg: #111b21;
    --sidebar-bg-active: #1f2c34;
    --sidebar-text: #aebac1;
    --sidebar-text-active: #ffffff;
    --page-bg: #f4f6f9;
    --card-radius: 14px;
}

body {
    background: var(--page-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.925rem;
}

/* Sidebar */
.app-sidebar {
    width: 260px;
    height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
}

.app-sidebar .brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1.25rem 1.25rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.app-sidebar .brand .logo-dot {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.app-sidebar .nav-scroll {
    flex: 1;
    overflow-y: auto;
    padding: .75rem 0.75rem 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.25) transparent;
}

.app-sidebar .nav-scroll::-webkit-scrollbar {
    width: 6px;
}

.app-sidebar .nav-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.25);
    border-radius: 3px;
}

.app-sidebar .nav-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.app-sidebar .nav-section-title {
    text-transform: uppercase;
    font-size: .68rem;
    letter-spacing: .08em;
    color: #5b6b73;
    padding: 1rem .75rem .35rem;
    font-weight: 700;
}

.app-sidebar .nav-link {
    color: var(--sidebar-text);
    padding: .6rem .8rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: .7rem;
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: 2px;
}

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

.app-sidebar .nav-link:hover {
    background: var(--sidebar-bg-active);
    color: var(--sidebar-text-active);
}

.app-sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-darker));
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,.25);
}

.app-sidebar .nav-link .badge-mini {
    margin-left: auto;
}

/* Main area */
.app-main {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    background: #fff;
    border-bottom: 1px solid #e9edf1;
    padding: .7rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-topbar .wallet-chip {
    background: #eafaf0;
    color: var(--brand-darker);
    border: 1px solid #c9f0d9;
    border-radius: 999px;
    padding: .35rem .9rem;
    font-weight: 600;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.app-content {
    padding: 1.5rem;
    flex: 1;
}

.sidebar-toggle-btn {
    display: none;
}

@media (max-width: 991px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.show { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .sidebar-toggle-btn { display: inline-flex; }
}

/* Cards */
.card {
    border: 1px solid #edf0f3;
    border-radius: var(--card-radius);
    box-shadow: 0 1px 3px rgba(16,24,40,.04);
}

.stat-card {
    border-radius: var(--card-radius);
    padding: 1.25rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: .75rem;
}

.stat-card .stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-card .stat-label {
    opacity: .85;
    font-size: .82rem;
}

.stat-card.bg-grad-green { background: linear-gradient(135deg, #25D366, #128C7E); }
.stat-card.bg-grad-blue { background: linear-gradient(135deg, #4facfe, #00629b); }
.stat-card.bg-grad-orange { background: linear-gradient(135deg, #f6a93a, #e1560f); }
.stat-card.bg-grad-purple { background: linear-gradient(135deg, #8e6ffb, #5326c9); }

.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.section-heading h4 {
    font-weight: 700;
    margin: 0;
}

.btn-brand {
    background: var(--brand-darker);
    border-color: var(--brand-darker);
    color: #fff;
}

.btn-brand:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.bg-brand {
    background: var(--brand-darker);
    color: #fff;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #0f3d33, #075E54 45%, #111b21 100%);
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 18px;
    padding: 2.25rem 2rem;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
}

.auth-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.6rem;
    margin: 0 auto 1rem;
}
