/* =========================================
   PUNTO DE VENTA - ESTILOS BASE
   Misma línea visual que el sistema de
   proyecciones: fondo gris claro, tarjetas
   blancas, menú #111827, activo #2563eb.
========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #222;
}

.contenido {
    max-width: 1200px;
    margin: 25px auto;
    padding: 0 20px;
}

/* ===========================
   TARJETAS
=========================== */

.tarjeta {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.tarjeta h2 {
    margin-top: 0;
}

/* ===========================
   FORMULARIOS
=========================== */

label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

input,
select {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 7px;
    font-size: 15px;
    font-family: Arial, sans-serif;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0 15px;
}

/* ===========================
   BOTONES
=========================== */

button,
.boton {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 18px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
    font-family: Arial, sans-serif;
    text-decoration: none;
    text-align: center;
}

button:hover,
.boton:hover {
    background: #1d4ed8;
}

.boton-gris {
    background: #6b7280;
}

.boton-gris:hover {
    background: #4b5563;
}

.boton-verde {
    background: #15803d;
}

.boton-verde:hover {
    background: #166534;
}

.boton-rojo {
    background: #dc2626;
}

.boton-rojo:hover {
    background: #b91c1c;
}

.boton-chico {
    margin-top: 0;
    padding: 7px 11px;
    font-size: 13px;
}

/* Botón con apariencia de enlace */

.boton-enlace {
    margin: 0;
    padding: 0;
    background: transparent;
    color: #1565c0;
    font-size: 14px;
}

.boton-enlace:hover {
    background: transparent;
    text-decoration: underline;
}

.boton-enlace.rojo {
    color: #dc2626;
}

.form-linea {
    display: inline;
    margin: 0;
}

/* ===========================
   MENSAJES
=========================== */

.mensaje {
    padding: 14px;
    border-radius: 7px;
    margin-bottom: 20px;
}

.correcto {
    background: #dcfce7;
    color: #166534;
}

.error {
    background: #fee2e2;
    color: #991b1b;
}

.nota {
    color: #6b7280;
    font-size: 13px;
}

/* ===========================
   TABLAS
=========================== */

/* Listas largas: se desplazan dentro de su cuadro y los títulos se quedan fijos */

.tabla-contenedor {
    overflow: auto;
    max-height: 70vh;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.tabla-contenedor > table > thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #111827;
    color: white;
}

.numero {
    text-align: right;
    white-space: nowrap;
}

.etiqueta {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.etiqueta-verde {
    background: #dcfce7;
    color: #166534;
}

.etiqueta-gris {
    background: #e5e7eb;
    color: #374151;
}

.etiqueta-azul {
    background: #dbeafe;
    color: #1d4ed8;
}

.etiqueta-naranja {
    background: #ffedd5;
    color: #9a3412;
}

.etiqueta-roja {
    background: #fee2e2;
    color: #991b1b;
}

.acciones-tabla {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

/* Fila de edición dentro de una tabla */

.form-editar {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 0;
}

.form-editar input,
.form-editar select {
    margin-top: 0;
    padding: 8px;
    font-size: 14px;
}

/* ===========================
   CELULAR
=========================== */

@media (max-width: 700px) {

    .contenido {
        margin: 15px auto;
        padding: 0 10px;
    }

    .tarjeta {
        padding: 16px;
        border-radius: 8px;
    }
}
