:root {
    --bg-dark: #111827;
    --bg-light: #f3f4f6;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --card-bg: #ffffff;
    --success: #10b981;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Estilo Oscuro */
.sidebar {
    width: 320px;
    background-color: var(--bg-dark);
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.brand-logo {
    margin-bottom: 2rem;
    border-bottom: 1px solid #374151;
    padding-bottom: 1.5rem;
}

.brand-logo h1 {
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: white;
}

.brand-logo p {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.form-container h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 600;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    color: #d1d5db;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #374151;
    background-color: #1f2937;
    color: white;
    border-radius: 6px;
    outline: none;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-group textarea {
    resize: none;
    height: 70px;
}

.btn-submit {
    width: 100%;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
}

/* Contenido Principal */
.main-content {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
    height: 100vh;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.top-nav h2 {
    font-size: 1.6rem;
    color: var(--bg-dark);
}

.stats {
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- NUEVO: ESTILOS DE FILTROS --- */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-filter {
    background-color: white;
    color: var(--text-muted);
    border: 1px solid #d1d5db;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    background-color: #f3f4f6;
    color: var(--text-main);
}

.btn-filter.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}
/* --------------------------------- */

/* Tarjetas de Inventario */
.inventory-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.type-card {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.type-header {
    background-color: #e5e7eb;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bg-dark);
}

.brand-section {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.brand-section:last-child {
    border-bottom: none;
}

.brand-title {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.brand-title::before {
    content: "•";
    margin-right: 8px;
    font-size: 1.5rem;
}

/* Tabla Moderna */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: #f9fafb;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    font-size: 0.95rem;
}

td.obs-col {
    max-width: 400px;
    line-height: 1.4;
    color: #4b5563;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.badge.bueno {
    background-color: #d1fae5;
    color: var(--success);
}

.badge.malo {
    background-color: #fee2e2;
    color: var(--danger);
}

.badge-qty {
    background-color: #dbeafe;
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
}

.empty-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    background: white;
    border-radius: 10px;
}