/* Estilos específicos para a página de administração */

/* Garantir que o header principal tenha prioridade */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #1f1e1f;
}

.admin-hero {
    height: 50vh;
    background-image: linear-gradient(rgba(29, 29, 29, 0.8), rgba(29, 29, 29, 0.8)), url(./img/banerr.png);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 70px;
}

.admin-hero .hero-content {
    text-align: center;
    color: white;
}

.admin-hero .hero-content h1 {
    font-size: 4.5rem;
    font-family: 'Indie Flower', cursive;
    color: #f31212;
    margin-bottom: 1rem;
}

.admin-hero .hero-content h2 {
    font-size: 2.2rem;
    font-family: 'Indie Flower', cursive;
    color: #ffffff;
}

.admin-section {
    padding: 4rem 0;
    background-color: #f5f5f5;
    min-height: 70vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.admin-header h2 {
    font-size: 3.5rem;
    color: #333;
    font-family: 'Indie Flower', cursive;
}

.admin-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.add-product-btn {
    padding: 1.2rem 2.5rem;
    background: #f31212;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.add-product-btn:hover {
    background: #d10a0a;
}

.action-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn {
    background: #28a745;
    color: white;
}

.export-btn:hover {
    background: #218838;
}

.import-btn {
    background: #007bff;
    color: white;
}

.import-btn:hover {
    background: #0056b3;
}

.reset-btn {
    background: #ffc107;
    color: #333;
}

.reset-btn:hover {
    background: #e0a800;
}

.admin-filters {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.search-input,
.category-select {
    padding: 1rem 1.5rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.4rem;
    flex: 1;
    min-width: 200px;
}

.search-input:focus,
.category-select:focus {
    outline: none;
    border-color: #f31212;
}

.products-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th,
.products-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.products-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 1.4rem;
}

.products-table td {
    font-size: 1.4rem;
    color: #666;
}

.product-image-cell {
    width: 80px;
}

.product-image-cell img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.product-price {
    font-weight: 600;
    color: #f31212;
}

.actions-cell {
    display: flex;
    gap: 0.8rem;
}

.edit-btn,
.delete-btn {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.edit-btn {
    background: #007bff;
    color: white;
}

.edit-btn:hover {
    background: #0056b3;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 3rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    right: 2rem;
    top: 1.5rem;
    font-size: 3rem;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 2rem;
    font-family: 'Indie Flower', cursive;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-size: 1.6rem;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.4rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f31212;
}

.form-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    margin-top: 3rem;
}

.save-btn,
.cancel-btn {
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn {
    background: #28a745;
    color: white;
}

.save-btn:hover {
    background: #218838;
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background: #5a6268;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}

/* Responsividade */
@media (max-width: 768px) {
    .login-container {
        padding: 0 1rem;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    .login-header h2 {
        font-size: 2rem;
    }
    
    .login-header p {
        font-size: 1.2rem;
    }
    
    .admin-header-bar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        top: 70px; /* Manter abaixo do header principal */
    }
    
    .admin-user-info {
        font-size: 1.2rem;
    }
    
    .logout-btn {
        padding: 0.6rem 1rem;
        font-size: 1.2rem;
    }
    
    .admin-hero .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .admin-hero .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-header h2 {
        font-size: 2.8rem;
        text-align: center;
    }
    
    .admin-actions {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .action-btn {
        padding: 0.8rem 1.2rem;
        font-size: 1.2rem;
    }
    
    .admin-filters {
        flex-direction: column;
    }
    
    .products-table {
        font-size: 1.2rem;
    }
    
    .products-table th,
    .products-table td {
        padding: 1rem 0.8rem;
    }
    
    .actions-cell {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .edit-btn,
    .delete-btn {
        padding: 0.6rem 1rem;
        font-size: 1rem;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 2rem;
        width: 95%;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .login-header h2 {
        font-size: 1.8rem;
    }
    
    .login-header p {
        font-size: 1.1rem;
    }
    
    .login-form input {
        padding: 1rem;
        font-size: 1.3rem;
    }
    
    .login-btn {
        padding: 1rem;
        font-size: 1.4rem;
    }
    
    .login-info {
        padding: 1rem;
    }
    
    .login-info p {
        font-size: 1.2rem;
    }
    
    .admin-header-bar {
        padding: 0.8rem;
        top: 70px; /* Manter abaixo do header principal */
    }
    
    .admin-user-info {
        font-size: 1.1rem;
    }
    
    .logout-btn {
        padding: 0.5rem 0.8rem;
        font-size: 1.1rem;
    }
    
    .admin-hero .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .admin-hero .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .admin-header h2 {
        font-size: 2.2rem;
    }
    
    .products-table th,
    .products-table td {
        padding: 0.8rem 0.5rem;
        font-size: 1.2rem;
    }
    
    .product-image-cell img {
        width: 40px;
        height: 40px;
    }
    
    .modal-content {
        margin: 15% auto;
        padding: 1.5rem;
    }
    
    .modal-content h2 {
        font-size: 2rem;
    }
    
    .form-group label {
        font-size: 1.4rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 1.3rem;
        padding: 1rem;
    }
}

/* Tela de Login */
.login-section {
    height: 100vh;
    background-image: linear-gradient(rgba(29, 29, 29, 0.8), rgba(29, 29, 29, 0.8)), url(./img/banerr.png);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 70px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 0 2rem;
}

.login-card {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.login-header h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-family: 'Indie Flower', cursive;
}

.login-header p {
    color: #666;
    font-size: 1.4rem;
}

.login-form {
    margin-bottom: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    color: #333;
    font-weight: 600;
}

.login-form input {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.4rem;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #f31212;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.4rem;
}

.toggle-password:hover {
    color: #f31212;
}

.login-btn {
    width: 100%;
    padding: 1.2rem;
    background: #f31212;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.login-btn:hover {
    background: #d10a0a;
}

.login-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #f31212;
}

.login-info p {
    margin: 0.5rem 0;
    font-size: 1.3rem;
    color: #666;
}

.login-info code {
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    color: #333;
}

/* Header do Painel Admin */
.admin-header-bar {
    background: #333;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.4rem;
}

.admin-user-info i {
    font-size: 2rem;
    color: #f31212;
}

.logout-btn {
    padding: 0.8rem 1.5rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.4rem;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn:hover {
    background: #c82333;
}

/* Ajuste para o painel admin */
.admin-panel .admin-hero {
    margin-top: 140px; /* 70px do header principal + 70px do header admin */
}

.admin-panel .admin-section {
    margin-top: 0;
} 