:root {
    --cafe-900: #1a120e;
    --cafe-800: #2d1f17;
    --cafe-700: #3d2b1f;
    --cafe-600: #4e3a2e;
    --cafe-500: #6b5344;
    --azul-500: #2563eb;
    --azul-600: #1d4ed8;
    --azul-400: #60a5fa;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #f4f1ee;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--cafe-800);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.2s;
}
.sidebar .brand {
    padding: 1.25rem;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    border-bottom: 1px solid var(--cafe-700);
    letter-spacing: .5px;
}
.sidebar .nav-link {
    color: #c9b9ab;
    padding: .65rem 1.25rem;
    font-size: .9rem;
    border-left: 3px solid transparent;
    transition: all .15s;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background: var(--cafe-700);
    border-left-color: var(--azul-500);
}
.sidebar .nav-link i {
    width: 22px;
    text-align: center;
    margin-right: .5rem;
}
.sidebar .nav-section {
    color: var(--cafe-500);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 1.25rem .35rem;
}
.sidebar-version {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: .75rem 1.25rem;
    font-size: .7rem;
    color: var(--cafe-500);
    border-top: 1px solid var(--cafe-700);
}

/* Main content */
.main-content {
    margin-left: 240px;
    min-height: 100vh;
}

/* Topbar */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e0db;
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar .user-info {
    color: var(--cafe-600);
    font-size: .85rem;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cafe-800);
}
.stat-card .stat-label {
    font-size: .8rem;
    color: var(--cafe-500);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.stat-card .stat-icon {
    font-size: 2rem;
    color: var(--azul-500);
    opacity: .7;
}

/* Buttons */
.btn-primary {
    background: var(--azul-500);
    border-color: var(--azul-500);
}
.btn-primary:hover {
    background: var(--azul-600);
    border-color: var(--azul-600);
}
.btn-cafe {
    background: var(--cafe-800);
    border-color: var(--cafe-800);
    color: #fff;
}
.btn-cafe:hover {
    background: var(--cafe-700);
    border-color: var(--cafe-700);
    color: #fff;
}

/* Tables */
.table thead {
    background: var(--cafe-800);
    color: #fff;
}
.table thead th {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
    border: none;
}

/* Page header */
.page-header {
    padding: 1.5rem;
}
.page-header h4 {
    color: var(--cafe-800);
    font-weight: 700;
    margin: 0;
}

/* Login page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cafe-900) 0%, var(--cafe-700) 100%);
}
.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.login-card h3 {
    color: var(--cafe-800);
    font-weight: 700;
}
.login-card .subtitle {
    color: var(--cafe-500);
    font-size: .85rem;
}

/* Result card */
.result-card {
    border: 2px solid var(--azul-500);
    border-radius: 12px;
    text-align: center;
    padding: 2rem;
}
.result-card .senha-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--azul-600);
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

/* Badge */
.badge-isento {
    background: #059669;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
}
