/* Estilos Admin */
.admin-page {
    min-height: 100vh;
    background: #f8f9fa;
}

.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #8B1538 0%, #6B0F2A 100%);
    padding: 20px;
}

.admin-panel {
    display: flex;
    min-height: 100vh;
}

.admin-nav {
    background: #343a40;
    width: 280px;
    padding: 30px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.admin-nav-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.admin-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.admin-nav h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 20px;
}

.admin-btn {
    background: none;
    border: none;
    color: #adb5bd;
    padding: 15px 20px;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: #495057;
    color: white;
    transform: translateX(5px);
}

.admin-btn.active {
    background: #8B1538;
    color: white;
}

.admin-btn.logout-btn {
    margin-top: 30px;
    background: #dc3545;
    color: white;
}

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

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

.admin-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 30px;
}

.admin-section h3 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 30px;
    font-weight: 700;
    border-bottom: 3px solid #8B1538;
    padding-bottom: 10px;
}

/* Gerenciamento de Pedidos */
.admin-orders {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-order {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.admin-order:hover {
    border-color: #8B1538;
    transform: translateY(-2px);
}

.admin-order.pending {
    border-left: 5px solid #ffc107;
}

.admin-order.confirmed {
    border-left: 5px solid #17a2b8;
}

.admin-order.ready {
    border-left: 5px solid #28a745;
}

.admin-order.rejected {
    border-left: 5px solid #dc3545;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.order-id {
    font-weight: 700;
    color: #8B1538;
    font-size: 1.1rem;
}

.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-status.pending {
    background: #fff3cd;
    color: #856404;
}

.order-status.confirmed {
    background: #d1ecf1;
    color: #0c5460;
}

.order-status.ready {
    background: #d4edda;
    color: #155724;
}

.order-status.rejected {
    background: #f8d7da;
    color: #721c24;
}

.order-details {
    margin-bottom: 20px;
}

.order-items {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.order-item:last-child {
    border-bottom: none;
}

.order-customer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.customer-info {
    background: white;
    padding: 10px;
    border-radius: 8px;
}

.customer-info strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.order-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.order-actions .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.rejection-reason {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    color: #721c24;
}

/* Gerenciamento de Produtos */
.admin-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.admin-product {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.admin-product:hover {
    border-color: #8B1538;
    transform: translateY(-2px);
}

.product-info h4 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.product-price {
    color: #8B1538;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.product-category {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: white;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* Gerenciamento de Administradores */
.admin-admins {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.admin-admin {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.admin-admin:hover {
    border-color: #8B1538;
}

.admin-info h4 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.admin-role {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Configuração */
.config-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.config-item label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
}

.config-item input {
    width: 200px;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-right: 10px;
}

.config-item input:focus {
    border-color: #8B1538;
    outline: none;
}

/* Modais de Formulário para Admin */
.admin-modal {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.admin-modal h3 {
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
}

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

.admin-modal .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

.alert {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Página de Histórico */
.history-container {
    max-width: 1000px;
    margin: 0 auto;
}

.history-header {
    text-align: center;
    margin-bottom: 40px;
}

.history-header h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.history-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.history-item {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 25px;
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-order-id {
    font-weight: 700;
    color: #8B1538;
    font-size: 1.2rem;
}

.history-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.history-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-items-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.history-total {
    text-align: right;
    font-size: 1.3rem;
    font-weight: 700;
    color: #8B1538;
}

.history-empty {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
}

.history-empty h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

.history-empty p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Responsivo */
@media (max-width: 1024px) {
    .admin-panel {
        flex-direction: column;
    }
    
    .admin-nav {
        width: 100%;
        padding: 20px 0;
    }
    
    .admin-nav-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .admin-logo {
        width: 40px;
        height: 40px;
        margin-bottom: 0;
    }
    
    .admin-nav h2 {
        font-size: 1.3rem;
    }
    
    .admin-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 20px;
    }
    
    .admin-btn {
        flex: 0 0 auto;
        padding: 10px 20px;
        margin-right: 10px;
    }
    
    .admin-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .admin-section {
        padding: 20px;
    }
    
    .admin-section h3 {
        font-size: 1.5rem;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .order-customer {
        grid-template-columns: 1fr;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .order-actions .btn {
        width: 100%;
    }
    
    .admin-products {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .admin-admin {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .config-item input {
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .history-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}