:root {
    --primary: #FAAC30;
    --primary-hover: #e09825;
    --primary-light: #fff8eb;
    --dark-sidebar: #1e293b;
    --dark-sidebar-hover: #334155;
    --bg-body: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

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

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--dark-sidebar);
    color: #ffffff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar-brand {
    padding: 1.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand span {
    color: #ffffff;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar-menu .menu-header {
    padding: 0.75rem 1.5rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
    background-color: var(--dark-sidebar-hover);
    color: var(--primary);
    border-left: 4px solid var(--primary);
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: 64px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-light);
    color: var(--text-dark);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(250, 172, 48, 0.3);
}

.user-badge .role-tag {
    background-color: var(--primary);
    color: #000;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-weight: 700;
}

.page-container {
    padding: 2rem;
    flex-grow: 1;
}

.card-custom {
    background-color: #ffffff;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.card-custom-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-custom-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.card-custom-body {
    padding: 1.5rem;
}

.stat-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background-color: var(--primary-light);
    color: var(--primary-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.btn-primary-custom {
    background-color: var(--primary);
    color: #000000;
    font-weight: 600;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    color: #000000;
}

.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table-custom td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.925rem;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background-color: #f1f5f9;
}

.badge-custom {
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background-color: #dcfce7; color: #166534; }
.badge-warning { background-color: #fef9c3; color: #854d0e; }
.badge-info { background-color: #e0f2fe; color: #075985; }
.badge-danger { background-color: #fee2e2; color: #991b1b; }

.login-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99;
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .main-content {
        width: 100%;
    }

    .topbar {
        padding: 0 1rem;
    }

    .page-container {
        padding: 1rem;
    }

    .user-badge span:first-child {
        display: none;
    }

    .table-custom th,
    .table-custom td {
        padding: 0.6rem 0.6rem;
        font-size: 0.82rem;
    }

    .card-custom-body {
        padding: 1rem;
    }

    .card-custom-header {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}