:root {
    --sidebar-width: 280px;
    --sidebar-bg: linear-gradient(180deg, #12304a 0%, #173f5f 52%, #0d2235 100%);
    --sidebar-border: rgba(255, 255, 255, 0.12);
    --sidebar-text: rgba(255, 255, 255, 0.88);
    --sidebar-muted: rgba(255, 255, 255, 0.58);
    --sidebar-active: rgba(255, 255, 255, 0.12);
    --sidebar-active-border: rgba(255, 255, 255, 0.22);
}

body {
    background: #f4f6f9;
}

.admin-wrapper {
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    min-height: 100vh;
    padding: 1.25rem 1rem;
    box-shadow: inset -1px 0 0 rgba(255,255,255,.04);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .4rem .45rem 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 14px;
    background: rgba(255,255,255,.92);
    padding: .4rem;
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.brand-title {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: .02em;
}

.brand-subtitle {
    color: var(--sidebar-muted);
    font-size: .82rem;
}

.sidebar-balance {
    margin: 0 .25rem 1.1rem;
    padding: .9rem 1rem;
    border: 1px solid var(--sidebar-border);
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(10px);
}

.balance-label {
    color: var(--sidebar-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .2rem;
}

.balance-value {
    font-weight: 700;
    font-size: 1.15rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: .95rem;
}

.sidebar-section {
    position: relative;
}

.sidebar-section + .sidebar-section {
    padding-top: .95rem;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-section-label {
    color: var(--sidebar-muted);
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: 0 .8rem .55rem;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    border-radius: 14px;
    padding: .78rem .9rem;
    display: flex;
    align-items: center;
    gap: .8rem;
    font-weight: 500;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
    border: 1px solid transparent;
}

.nav-icon {
    width: 1.15rem;
    height: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.15rem;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    background: var(--sidebar-active);
    color: #fff;
    border-color: var(--sidebar-active-border);
    transform: translateX(2px);
}

.content-area {
    flex: 1;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.card-widget {
    border: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.table thead th {
    white-space: nowrap;
}

@media (max-width: 992px) {
    .sidebar {
        width: 100%;
        min-height: auto;
        padding-bottom: 1rem;
    }
}
