* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #E85D04;
    --secondary: #333;
    --light: #f5f5f5;
    --border: #ddd;
    --text: #333;
    --text-light: #666;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background-color: #f0f2f5;
}

.admin-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    background: var(--secondary);
    color: white;
    padding: 20px;
    position: fixed;
    width: 250px;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.sidebar-header h2 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #ccc;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.ativo {
    background: var(--primary);
    color: white;
}

.sidebar-footer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 15px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c82333;
}

/* Main Content */
.admin-main {
    margin-left: 250px;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 24px;
    color: var(--text);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 14px;
}

.admin-content {
    padding: 30px;
    flex: 1;
}

.admin-container h1 {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--text);
}

.admin-container h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card-stat {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-content h3 {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.stat-numero {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
}

.acoes-rapidas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.btn-acao {
    padding: 15px;
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn-acao:hover {
    background: var(--primary);
    color: white;
}

/* Tabelas */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-table thead {
    background: var(--light);
    border-bottom: 2px solid var(--border);
}

.admin-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.admin-table tbody tr:hover {
    background: #f9f9f9;
}

/* Formulários */
.admin-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 800px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Botões */
.btn-primary, .btn-secondary, .btn-pequeno, .btn-editar, .btn-deletar {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #d64a00;
}

.btn-secondary {
    background: var(--light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-pequeno {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-editar {
    background: var(--info);
    color: white;
}

.btn-editar:hover {
    background: #138496;
}

.btn-deletar {
    background: var(--danger);
    color: white;
}

.btn-deletar:hover {
    background: #c82333;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-sucesso {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-erro {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-ativo, .badge-sucesso {
    background: #d4edda;
    color: #155724;
}

.badge-inativo, .badge-erro {
    background: #f8d7da;
    color: #721c24;
}

.badge-pendente, .badge-warning {
    background: #fff3cd;
    color: #856404;
}

/* Responsivo */
@media (max-width: 768px) {
    .admin-wrapper {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-footer {
        position: static;
        margin-top: 20px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-table {
        font-size: 12px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px;
    }
}
