/**
 * Estilos do Painel Administrativo
 */

/* Bootstrap Icons - Ícones modernos para o menu */
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css');

:root {
    --primary-color: #1a5490;
    --secondary-color: #2c3e50;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #333;
    --text-muted: #6c757d;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, #144075 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    max-width: 120px;
    margin-bottom: 20px;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 5px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

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

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #144075;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 84, 144, 0.3);
}

.btn-block {
    width: 100%;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 12px;
}

/* ===== ADMIN LAYOUT ===== */
.admin-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: var(--light-bg);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
}

.admin-logo {
    max-width: 80px;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.admin-sidebar {
    width: 250px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #144075 100%);
    min-height: calc(100vh - 70px);
    position: fixed;
    left: 0;
    top: 70px;
    padding: 20px 0;
    overflow-y: auto;
}

.admin-content {
    margin-left: 250px;
    padding: 30px;
    min-height: calc(100vh - 70px);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    transition: all 0.3s;
    gap: 10px;
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.25);
    color: white;
    border-left: 3px solid #1a5490;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sidebar-menu .menu-icon {
    width: 28px;
    height: 28px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 4px;
    flex-shrink: 0;
}

.sidebar-menu .menu-icon i {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    display: block;
    line-height: 1;
}

.sidebar-menu a:hover .menu-icon,
.sidebar-menu a.active .menu-icon {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-menu a:hover .menu-icon i,
.sidebar-menu a.active .menu-icon i {
    color: white;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

/* ===== TABLES ===== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--text-color);
}

.table tr:hover {
    background: var(--light-bg);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

/* ===== ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    border: 1px solid var(--danger-color);
    color: #c00;
}

.alert-success {
    background: #efe;
    border: 1px solid var(--success-color);
    color: #060;
}

.alert-info {
    background: #e7f3ff;
    border: 1px solid var(--info-color);
    color: #004085;
}

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

.badge-success {
    background: var(--success-color);
    color: white;
}

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

.badge-warning {
    background: var(--warning-color);
    color: #333;
}

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

/* ===== FILTERS ===== */
.filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        font-size: 28px;
        padding: 10px;
    }
    
    .admin-header {
        padding: 12px 15px;
        flex-wrap: wrap;
    }
    
    .admin-header-left {
        gap: 10px;
    }
    
    .admin-header-left h2 {
        font-size: 16px;
        display: none;
    }
    
    .admin-logo {
        max-width: 60px;
    }
    
    .admin-header-right {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .admin-header-right .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .user-info {
        gap: 8px;
    }
    
    .user-info > div:last-child {
        display: none;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        width: 280px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: block;
        transition: opacity 0.3s ease;
    }
    
    .admin-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .filters {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 8px 6px;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-footer {
        margin-left: 0 !important;
        padding: 15px;
        font-size: 11px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .badge {
        font-size: 11px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .admin-header {
        padding: 10px 12px;
    }
    
    .admin-logo {
        max-width: 50px;
    }
    
    .admin-header-right .btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .admin-content {
        padding: 10px;
    }
    
    .card {
        padding: 12px;
    }
    
    .card-title {
        font-size: 14px;
    }
    
    .table {
        font-size: 11px;
    }
    
    .table th,
    .table td {
        padding: 6px 4px;
    }
    
    .sidebar-menu a {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .sidebar-menu .menu-icon {
        width: 24px;
        height: 24px;
    }
    
    .sidebar-menu .menu-icon i {
        font-size: 16px;
    }
}

