:root {
    --primary: #aa8038;
    --primary-dark: #8a672c;
    --primary-light: #f4ead9;
    --sidebar-bg: #1f1c17;
    --sidebar-text: #d8cdb8;
    --body-bg: #f6f4f0;
    --card-border: #eae3d6;
    --text-dark: #2c2620;
    --danger: #c0392b;
    --success: #2e7d32;
}

body {
    background: var(--body-bg);
    color: var(--text-dark);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------- Layout ---------- */
.wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    min-height: 100vh;
    position: sticky;
    top: 0;
    align-self: flex-start;
}

.sidebar .brand {
    padding: 1.25rem 1.25rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
    letter-spacing: .3px;
}

.sidebar .brand span { color: var(--primary); }

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: .65rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    border-left: 3px solid transparent;
    font-size: .92rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(170, 128, 56, .18);
    color: #fff;
    border-left-color: var(--primary);
}

.main-content { flex: 1; min-width: 0; }

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--card-border);
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.content-area { padding: 1.5rem; }

/* ---------- Components ---------- */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

.card {
    border: 1px solid var(--card-border);
    border-radius: .5rem;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--card-border);
    font-weight: 600;
}

.stat-card {
    border-radius: .6rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--primary);
}
.stat-card .value { font-size: 1.6rem; font-weight: 700; color: var(--text-dark); }
.stat-card .label { color: #7a7367; font-size: .85rem; }

.table thead th {
    background: var(--primary-light);
    color: var(--text-dark);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: none;
}

.badge-active { background: var(--success); }
.badge-inactive { background: #9e9e9e; }

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sidebar-bg), #3a3122);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: .75rem;
    padding: 2.25rem;
    box-shadow: 0 15px 40px rgba(0,0,0,.25);
}

.auth-card .brand {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 1.3rem;
}
.auth-card .brand span { color: var(--primary); }

.sidebar-toggle { display: none; }

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        z-index: 1050;
        left: -260px;
        transition: left .25s ease;
        height: 100vh;
    }
    .sidebar.show { left: 0; }
    .sidebar-toggle { display: inline-flex; }
}
