/**
 * Estilos personalizados — Sistema de Uniformes
 */

/* ========================
   Variables de colores
   ======================== */
:root {
    --sidebar-ancho: 250px;
    --sidebar-bg: #2c3e50;
    --sidebar-hover: #34495e;
    --sidebar-activo: #1abc9c;
    --header-alto: 56px;
}

/* ========================
   Layout principal
   ======================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    overflow-x: hidden;
}

/* ========================
   Sidebar
   ======================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-ancho);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: #ecf0f1;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar .logo {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar .logo h5 {
    margin: 0;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}

.sidebar .logo small {
    color: #95a5a6;
    font-size: 0.75rem;
}

.sidebar .menu {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.sidebar .menu li a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar .menu li a:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
    border-left-color: var(--sidebar-activo);
}

.sidebar .menu li a.active {
    background-color: var(--sidebar-hover);
    color: #fff;
    border-left-color: var(--sidebar-activo);
}

.sidebar .menu li a i {
    margin-right: 10px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar .menu-seccion {
    padding: 15px 20px 5px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #7f8c8d;
}

/* ========================
   Contenido principal
   ======================== */
.contenido-principal {
    margin-left: var(--sidebar-ancho);
    min-height: 100vh;
}

.header-top {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 10px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-alto);
}

.header-top h6 {
    margin: 0;
    color: #555;
}

.area-contenido {
    padding: 20px 25px;
}

/* ========================
   Tarjetas del dashboard
   ======================== */
.tarjeta-dashboard {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.tarjeta-dashboard:hover {
    transform: translateY(-2px);
}

.tarjeta-dashboard .card-body {
    padding: 20px;
}

.tarjeta-dashboard .icono {
    font-size: 2rem;
    opacity: 0.7;
}

.tarjeta-dashboard .valor {
    font-size: 1.8rem;
    font-weight: 700;
}

.tarjeta-dashboard .etiqueta {
    font-size: 0.85rem;
    color: #6c757d;
}

/* ========================
   Tablas
   ======================== */
.table th {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    font-size: 0.9rem;
    vertical-align: middle;
}

/* ========================
   Formularios
   ======================== */
.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
}

/* ========================
   Badges y estados
   ======================== */
.badge {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 5px 10px;
}

/* ========================
   Alertas flash
   ======================== */
.alerta-flash {
    border-radius: 6px;
    padding: 12px 20px;
    margin-bottom: 15px;
}

/* ========================
   Botones de acción en tablas
   ======================== */
.btn-accion {
    padding: 3px 8px;
    font-size: 0.8rem;
}

/* ========================
   Líneas dinámicas (cotización, pedido, venta)
   ======================== */
.linea-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
}

.linea-item:hover {
    border-color: #c5ccd3;
}

/* ========================
   Impresión
   ======================== */
@media print {
    .sidebar,
    .header-top,
    .no-imprimir {
        display: none !important;
    }
    .contenido-principal {
        margin-left: 0 !important;
    }
    .area-contenido {
        padding: 0 !important;
    }
    body {
        background: #fff;
    }
}

/* ========================
   Stock bajo
   ======================== */
.stock-bajo {
    color: #dc3545;
    font-weight: 600;
}

.stock-ok {
    color: #198754;
}

/* ========================
   Responsive (para testing en navegador)
   ======================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.abierto {
        transform: translateX(0);
    }
    .contenido-principal {
        margin-left: 0;
    }
}
