/* ============================================
   STYLE.CSS - Velazquez
   Sistema de Gestión de Dispositivos
   ============================================ */

/* ==========================================
   RESET Y CONFIGURACIÓN BASE
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    background: #e0e0e0; /* Fondo gris general */
}

/* ==========================================
   CONTENEDOR PRINCIPAL
   Envuelve todo el contenido de las páginas
   ========================================== */
.container {
   
    margin: 0 auto;
    padding: 5px;
}

/* ==========================================
   ENCABEZADOS (H1, H2)
   Títulos de secciones y subsecciones
   ========================================== */
h1 {
    font-size: 20px;
    margin-bottom: 5px;
    color: #2c3e50;
}

h2 {
    font-size: 16px;
    margin: 5px 0 5px;
    color: black;
    border-bottom: 2px solid #FF7D00; /* Línea color corporativo */
    padding-bottom: 2px;
}

/* ==========================================
   ICONOS
   SVG y imágenes usadas en menú y botones
   ========================================== */
.icono {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 5px;
}

button .icono,
a.boton .icono {
    width: 18px;
    height: 18px;
}

.icono-grande {
    width: 40px;
    height: 40px;
}

.icono-pequeno {
    width: 14px;
    height: 14px;
}

/* ==========================================
   ALERTAS Y MENSAJES
   Mensajes de éxito, error e información
   ========================================== */
.alert {
    padding: 5px 10px;
    margin-bottom: 5px;
    border-radius: 3px;
    border-left: 3px solid;
    font-size: 13px;
}

.alert.success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert.error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert.info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* ==========================================
   FORMULARIOS
   Estilos para todos los formularios
   ========================================== */
form {
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 5px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 13px;
}

/* Campos de entrada de texto, números, fechas, etc. */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 6px 10px;
    margin-top: 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

/* Borde naranja cuando el campo está activo */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #FF7D00;
}

/* ==========================================
   BOTONES
   Botones primarios, secundarios y de peligro
   ========================================== */
button,
.boton {
    display: inline-block;
    padding: 6px 15px;
    background: #FF7D00; /* Color corporativo */
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.3s;
}

/* Hover más suave - naranja más claro */
button:hover,
.boton:hover {
    background: #fff3e6;
}

/* Botón secundario (gris) */
button.secundario {
    background: #95a5a6;
}

button.secundario:hover {
    background: #a8b5b6;
}

/* Botón de peligro (rojo) */
button.peligro {
    background: #e74c3c;
}

button.peligro:hover {
    background: #ed6456;
}

/* ==========================================
   TABLAS
   Listados de clientes, dispositivos, etc.
   ========================================== */
table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 5px;
}

/* Encabezado de tabla - color corporativo */
thead {
    background: #FF7D00;
    color: white;
}

th, td {
    padding: 8px;
    text-align: left;
    font-size: 13px;
}

/* Filas alternas en gris claro */
tbody tr:nth-child(even) {
    background: #f8f9fa;
}

/* Hover en filas - naranja muy suave */
tbody tr:hover {
    background: #fff3e6;
}

/* ==========================================
   NAVEGACIÓN GENERAL
   Si usas nav en lugar del menu-bar
   ========================================== */
nav {
    background: #2c3e50;
    padding: 8px 0;
    margin-bottom: 5px;
}

nav ul {
    list-style: none;
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

nav li {
    margin-right: 15px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 3px;
    transition: background 0.3s;
    font-size: 13px;
}

nav a:hover,
nav a.active {
    background: #fff3e6; /* Hover naranja suave */
}

/* ==========================================
   CLASES UTILIDADES
   Alineación y espaciado rápido
   ========================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 10px;
}

.mb-20 {
    margin-bottom: 10px;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ==========================================
   HEADER - NOMBRE DEL SISTEMA
   Barra superior con el nombre de la empresa
   ========================================== */
.header {
    background: #FF7D00; /* Color corporativo */
    color: white;
    padding: 0px 2px;
	line-height: 15px;
    font-size: 14px;
    font-weight: bold;
}

/* ==========================================
   MENU BAR - MENÚ PRINCIPAL
   Barra de navegación con iconos y dropdowns
   ========================================== */
.menu-bar {
    background: #f0f0f0; /* Gris oscuro */
    display: flex;
    align-items: center;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 5px;
}

/* ==========================================
   MENU ITEM - Cada elemento del menú
   Maestros, Pedidos, Reparaciones, etc.
   ========================================== */
.menu-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s;
}

/* Hover naranja suave en items del menú */
.menu-item:hover {
    background: #fff3e6;
}

/* ==========================================
   MENU ICON - Iconos del menú
   SVG dentro de cada menu-item
   ========================================== */
.menu-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 3px;
}

.menu-icon svg {
    width: 100%;
    height: 100%;
    fill: #000000; /* ICONOS EN NEGRO */
}

/* ==========================================
   MENU LABEL - Texto bajo los iconos
   "Maestros", "Pedidos", etc.
   ========================================== */
.menu-label {
    font-size: 11px;
    white-space: nowrap;
    font-weight: bold; /* TEXTO EN NEGRITA */
	color: black;
}

/* ==========================================
   DROPDOWN MENU - Menú desplegable
   Aparece al hacer hover en "Maestros"
   ========================================== */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* Mostrar dropdown al hacer hover */
.menu-item:hover .dropdown-menu {
    display: block;
}

/* ==========================================
   DROPDOWN ITEM - Items dentro del dropdown
   Clientes, Proveedores, Estados, etc.
   ========================================== */
.dropdown-item {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

/* Hover naranja muy suave en items dropdown */
.dropdown-item:hover {
    background: #fff3e6;
    color: #FF7D00;
}

/* ==========================================
   BUSCADOR DE PARTES
   Campo de búsqueda en el menú
   ========================================== */
.search-parte {
    padding: 8px 12px;
}

.input-parte {
    width: 90px !important;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

.input-parte:focus {
    outline: none;
    border-color: #FF7D00; /* Borde naranja al enfocar */
}


/* ==========================================
   RESPONSIVE - MÓVILES
   ========================================== */
@media (max-width: 768px) {
    /* Menú con scroll horizontal */
    .menu-bar {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        gap: 3px;
        padding: 0 5px;
        white-space: nowrap;
    }
    
    /* Items no se encogen */
    .menu-item {
        flex: 0 0 auto;
        min-width: 65px;
        padding: 6px 8px;
    }
    
    /* Iconos más pequeños */
    .menu-icon {
        width: 24px;
        height: 24px;
        margin-bottom: 2px;
    }
    
    .menu-icon svg {
        width: 100%;
        height: 100%;
    }
    
    /* Texto más pequeño */
    .menu-label {
        font-size: 10px;
    }
    
    /* Buscador más compacto */
    .search-parte {
        min-width: 140px;
        padding: 6px 8px;
    }
    
    .input-parte {
        width: 100%;
        font-size: 12px;
        padding: 5px 8px;
    }
    
    /* Header más pequeño */
    .header {
        font-size: 13px;
        padding: 8px 10px;
    }
    
    /* Tablas responsive */
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 6px 4px;
    }
    
    /* Contenedor con menos padding */
    .container {
        padding: 8px;
    }
    
    /* Formularios más compactos */
    form {
        padding: 12px 10px;
    }
    
    h1 {
        font-size: 18px;
    }
    
    h2 {
        font-size: 15px;
    }
}

/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
    .menu-item {
        min-width: 55px;
        padding: 5px 6px;
    }
    
    .menu-label {
        font-size: 9px;
    }
    
    .search-parte {
        min-width: 120px;
    }
}