:root {
    --primary: #475569; /* Cinza Ardósia para substituir o azul */
    --bg: #f1f5f9;      /* Cinza mais claro para destacar os cards brancos */
    --sidebar: #000000; /* Sidebar preta conforme solicitado */
    --text: #334155;
    --white: #ffffff;
    --gray-light: #e2e8f0;
}

body { font-family: 'Inter', sans-serif; margin: 0; background: var(--bg); color: var(--text); }
.container { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: 260px; background: var(--sidebar); color: white; padding: 2rem 1rem; }
.sidebar h2 {
    display: flex;
    align-items: center;
    overflow: hidden; /* Esconde o ADMIN enquanto ele desliza */
    margin: 0;
}
.brand-name {
    opacity: 0;
    animation: fadeIn 1.5s ease forwards;
    display: inline-block;
    will-change: opacity;
}

.sidebar h2 span:last-child { 
    color: #94a3b8; 
    margin-left: 8px;
    opacity: 0;
    transform: translateX(-60px); /* Começa atrás do IA STUDIO */
    animation: revealAdmin 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
    will-change: transform, opacity;
}
.sidebar nav { margin-top: 3rem; display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar nav a, .sidebar nav button { 
    padding: 1rem; color: #cbd5e1; text-decoration: none; border-radius: 8px; 
    background: linear-gradient(to right, #1e293b 50%, transparent 50%);
    background-size: 200% 100%;
    background-position: right bottom;
    transition: background-position 0.6s ease, color 0.6s ease; 
    border: none; text-align: left; cursor: pointer;
    will-change: background-position;
}
.sidebar nav a.active, .sidebar nav a:hover, .sidebar nav button:hover { background-position: left bottom; color: white; }

/* Main Content */
.main-content { 
    flex: 1; padding: 2rem; 
    background: linear-gradient(-45deg, #020617, #0f172a, #1e293b);
    background-size: 200% 200%;
    animation: gradientMove 15s ease infinite;
}
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.search-bar input { 
    padding: 0.8rem 1.5rem; 
    border-radius: 25px; 
    border: 1px solid #e2e8f0; 
    width: 300px; 
    background: linear-gradient(to right, #cbd5e1 50%, #f1f5f9 50%);
    background-size: 200% 100%;
    background-position: right bottom;
    transition: background-position 0.8s ease, border-color 0.6s ease; 
}
.search-bar input:focus { background-position: left bottom; outline: none; border-color: var(--primary); }
.btn-primary { background: var(--primary); color: white; border: none; padding: 0.8rem 1.5rem; border-radius: 8px; cursor: pointer; transition: background-color 0.6s ease; }
.btn-primary:hover { background: #334155; }

/* Table */
.table-section { background: var(--white); border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { background: #f1f5f9; padding: 1rem; text-align: left; font-size: 0.9rem; }
tr { 
    background: linear-gradient(to right, #e2e8f0 50%, #f1f5f9 50%);
    background-size: 200% 100%;
    background-position: right bottom;
    transition: background-position 0.8s ease; 
}
tr:hover { background-position: left bottom; }
td { padding: 1rem; border-top: 1px solid #f1f5f9; }

/* Animação para os itens da tabela */
.product-name-wrapper { overflow: hidden; display: flex; flex-direction: column; }
.product-reveal {
    opacity: 0;
    transform: translateX(-30px);
    display: inline-block;
    animation: revealAdmin 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
}

.product-img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.product-details { display: block; font-size: 0.75rem; color: #64748b; margin-top: 4px; }

/* Destaque de Categorias (Badges) */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-roupas { background: #dcfce7; color: #166534; } /* Verde para Roupas */
.badge-pods { background: #fef9c3; color: #854d0e; }   /* Amarelo para Pods */

/* Modal */
.modal { 
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.4); 
    backdrop-filter: blur(8px); 
    align-items: center; justify-content: center; 
    z-index: 1000;
}
.modal-content { 
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 2.5rem; border-radius: 16px; width: 450px; 
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.4);
    animation: fadeInUp 0.5s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#modalTitle { margin-bottom: 1.5rem; color: #ffffff; font-size: 1.5rem; }

.form-group { margin-bottom: 1rem; color: #cbd5e1; }

input, select, textarea { 
    width: 100%; padding: 0.8rem; margin-bottom: 1rem; 
    border: 1px solid #e2e8f0; border-radius: 8px; box-sizing: border-box; 
    background-color: #f1f5f9;
    transition: background-color 0.6s ease, border-color 0.4s ease;
}
input:focus, select:focus, textarea:focus { 
    background-color: #e2e8f0; outline: none; border-color: var(--primary); 
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: 1rem; margin-top: 1rem; }

.btn-save, .btn-cancel {
    flex: 1; border: none; padding: 1rem; border-radius: 8px; font-weight: 600; cursor: pointer;
    transition: background-color 0.6s ease, transform 0.2s ease;
}

.btn-save { 
    background-color: var(--primary); color: white; 
}
.btn-cancel { 
    background-color: #e2e8f0; color: var(--text); 
}

.btn-save:hover { background-color: #334155; transform: translateY(-2px); }
.btn-cancel:hover { background-color: #cbd5e1; transform: translateY(-2px); }


/* Responsividade */
@media (max-width: 1024px) {
    .sidebar { width: 200px; }
    .search-bar input { width: 220px; }
}

@media (max-width: 768px) {
    .container { flex-direction: column; }
    
    .sidebar { 
        width: 100%; 
        padding: 1rem; 
        box-sizing: border-box; 
    }
    
    .sidebar nav { 
        margin-top: 1rem; 
        flex-direction: row; 
        overflow-x: auto; 
        gap: 0.5rem;
        padding-bottom: 0.8rem;
    }
    
    .sidebar nav a, .sidebar nav button { white-space: nowrap; padding: 0.6rem 1rem; }
    
    header { flex-direction: column; gap: 1rem; align-items: stretch; }
    .search-bar input { width: 100%; }
    .btn-primary { width: 100%; }
    
    .table-section { overflow-x: auto; }
    table { min-width: 650px; }

    .modal-content { width: 95%; margin: 10px; }
    .form-row { grid-template-columns: 1fr; }
}

/* Estilos da Tela de Login */
.login-page {
    background: linear-gradient(-45deg, #000000, #020617, #111827);
    background-size: 200% 200%;
    animation: gradientMove 12s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: fadeInUp 0.8s ease-out;
    will-change: transform, opacity;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--sidebar);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Garante que o ADMIN fique escondido até sair de trás */
}

.login-header h2 span:last-child { 
    color: #94a3b8; 
    display: inline-block;
    margin-left: 8px;
    opacity: 0;
    transform: translateX(-60px); /* Começa atrás do IA STUDIO */
    animation: revealAdmin 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
}

.login-header p { color: #64748b; margin-top: 0.5rem; }

.input-wrapper { position: relative; }
.input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    transition: color 0.3s ease;
}
.input-wrapper input { padding-left: 2.8rem; margin-bottom: 0; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.input-wrapper input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.1); }
.input-wrapper input:focus + i { color: var(--primary); }

.btn-login {
    width: 100%; background: var(--sidebar); color: white; border: none;
    padding: 1rem; border-radius: 6px; font-weight: 600; cursor: pointer;
    transition: background-color 0.6s ease, transform 0.2s ease; margin-top: 1rem;
}
.btn-login:hover { background: var(--primary); transform: translateY(-2px); }
.btn-login:active { transform: translateY(0); }

.error-message { color: #ef4444; font-size: 0.875rem; margin-top: 1rem; text-align: center; min-height: 1.2rem; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes revealAdmin {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}