body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,'Helvetica Neue',Arial; margin:0; background:#f6f7fb; color:#111;}
.container{max-width:980px; margin:0 auto; padding:24px;}
.card{background:#fff; border-radius:14px; padding:20px; box-shadow:0 6px 24px rgba(0,0,0,.07); margin-bottom:18px;}
h1,h2{margin:0 0 12px 0;}
label{display:block; font-weight:600; margin-top:12px;}
input,select{width:100%; padding:10px 1px; border:1px solid #d8dbe6; border-radius:10px; font-size:14px;}
button{border:0; border-radius:12px; padding:12px 16px; font-weight:700; cursor:pointer;}
.btn{background:#111; color:#fff;}
.btn-secondary{background:#e8eaf3;}
.row{display:flex; gap:14px; flex-wrap:wrap;}
.col{flex:1; min-width:240px;}
.small{font-size:12px; color:#666;}
.error{background:#ffe8e8; border:1px solid #ffb3b3; padding:12px; border-radius:12px; margin-bottom:12px;}
.success{background:#e9ffe8; border:1px solid #b7ffb3; padding:12px; border-radius:12px; margin-bottom:12px;}
.banner-test{background:#ffcc00; color:#111; padding:8px 12px; text-align:center; font-weight:900; letter-spacing:.4px;}
table{width:100%; border-collapse:collapse;}
th,td{padding:10px 8px; border-bottom:1px solid #eef0f6; text-align:left;}
.actions{display:flex; gap:10px; flex-wrap:wrap;}
a.link{color:#0b57d0; text-decoration:none; font-weight:700;}
a.link:hover{text-decoration:underline;}
/* General */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa; /* Un gris muy claro para que el card blanco resalte */
}

/* Banner de Pruebas */
.banner-test {
    background-color: #ffcc00;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Header y Logo */
.main-header {
    padding: 20px 0; /* Espacio arriba y abajo del logo */
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Sombra sutil */
    margin-bottom: 40px;
}

.header-container {
    max-width: 1000px; /* Alineado con el ancho de tu formulario */
    margin: 0 auto;    /* Centra el contenedor del header */
    padding: 0 20px;   /* Evita que el logo toque los bordes en móviles */
}

.logo {
    height: 80px;      /* Un tamaño un poco más contenido suele verse más elegante */
    display: block;
}

/* Contenedor Principal (El card de Autofactura) */
.container {
    max-width: 600px;  /* Ajusta segn necesites */
    margin: 0 auto 50px auto; /* Centrado horizontal */
    padding: 30px;
    background: white;
    border-radius: 12px; /* Bordes más redondeados */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); /* Sombra suave para dar profundidad */
}

/* Footer y Modal Instrucciones */
.footer-links {
    text-align: center;
    color: #666;
}

.footer-links a {
    color: #0b57d0;
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.modal-open {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 14px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
}

.modal-close:hover {
    color: #111;
}

.modal-body {
    padding: 24px;
}

.modal-body h3 {
    margin: 20px 0 12px 0;
    font-size: 1rem;
}

.modal-body p, .modal-body ul {
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.modal-body ul {
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 10px;
}