* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    padding: 20px;
    color: #333;
}
.container { max-width: 1200px; margin: 0 auto; }
h2 { margin-bottom: 15px; color: #1a1a1a; }
.panel-controles {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.panel-controles label { font-weight: 600; font-size: 14px; }
input[type="number"] {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    width: 90px;
    font-size: 16px;
}
input[type="number"]:focus { border-color: #007bff; outline: none; }
button {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-generar { background-color: #007bff; color: white; }
.btn-generar:hover { background-color: #0056b3; }
.btn-descargar-todo {
    background-color: #28a745;
    color: white;
    margin-left: auto;
}
.btn-descargar-todo:hover { background-color: #1e7e34; }
.btn-descargar-todo:disabled { background-color: #94d3a2; cursor: not-allowed; }
.contador { font-size: 14px; color: #666; margin-left: 10px; }
.grilla-codigos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}
.tarjeta-codigo {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    text-align: center;
    transition: transform 0.2s;
}
.tarjeta-codigo:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.indice { font-size: 11px; color: #888; margin-bottom: 8px; font-weight: 700; }
.imagen-codigo { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.btn-descargar-uno {
    background-color: #17a2b8;
    color: white;
    font-size: 13px;
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    font-weight: 600;
}
.btn-descargar-uno:hover { background-color: #117a8b; }
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}
.toast.show { opacity: 1; transform: translateY(0); }