/* ============================
   RESETEO BÁSICO
============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================
   ESTILOS GENERALES
============================ */
body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    padding: 20px;
    font-size:calc(1em + 0.5vw);
}

h1, h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

/* ============================
   FORMULARIO
============================ */
form {
        text-align:center;
    font-size:calc(1em + 0.5vw);
    margin:auto;
    width: 80%;
    margin: 0 auto;
    background: #ffffff;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Filas del formulario */
form table {
    text-align: center;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

/* Inputs y selects */
form input[type="text"],
form input[type="number"],
form input[type="password"],
form input[type="date"],
form select {
     font-size:calc(1em + 0.5vw);
    width: 100%;
    padding: 8px;
    border: 1px solid #bbb;
    border-radius: 4px;
    /* font-size:calc(1em + 0.5vw); */
}

/* Botones */
form input[type="submit"] {
    padding: 10px 20px;
     width: 100%;
    font-size:calc(1em + 0.5vw);
    background: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

form input[type="submit"]:hover {
    background: #0056b3;
}
form input[type="submit"][name="facturaalta"],
form input[type="submit"][name="empresaalta"],
form input[type="submit"][name="empresabusca"],
form input[type="submit"][name="categoriaalta"]{
    width: 50%;
    text-align:center;
    margin:auto;
    background: #3a393d;
}

/* ============================
   TABLAS GENERALES
============================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    table-layout: fixed; /* CLAVE para que funcionen los porcentajes */
    background: white;
}

th, td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
    word-wrap: break-word;
    /* font-size: calc(1em + 0.5vw); */
}

th {
    background: #007BFF;
    color: white;
}

/* ============================
   COLUMNAS ESPECIALES
============================ */
.col-estrecha {
    width: 20%;
}

.col-iva,
.col-ret,
.col-rec {
    width: 20%;
}

/* Inputs dentro de tablas */
table input,
table select {
    width: 90%;
    padding: 5px;
    font-size: calc(1em + 0.5vw);
}
