body {
    font-family: Arial;
    background: #f0f0f0;
    font-size: 9px;
}

/* CONTROLES */
.controls {
        display: flex;
    margin: 10px auto;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}
#colorMode{
    
    height: 37px;
    padding: 0px 12px;
    background: #efefef;
    margin-right: 5px;

}
.page {
   width: 210mm;
    height: 297mm;
    background: white;
    margin: 10px auto;
    padding: 10mm;
    box-sizing: border-box;

    display: grid;
    grid-template-columns: repeat(auto-fill, 188px);
    gap: 6px;

    page-break-after: always; /* 👈 salto de hoja */
}
button {
    padding: 8px 12px;
    margin-right: 5px;
    cursor: pointer;
}

/* A4 */
.a4 {
    width: 210mm;
    height: 297mm;
    margin: auto;
    padding: 10mm;
    box-shadow: 0 0 10px rgba(0,0,0,.2);
    box-sizing: border-box;
}

/* GRID DE BLOQUES */
.blocks {
    display: grid;
    grid-template-columns: repeat(auto-fill, 188px);
    gap: 6px;
}
h4{
    text-align: center;
}
.auth{
    text-align: end;
}
/* BLOQUE */
.block {
    width: 188px;
    height: 102px;
    border: 2px solid #000;
    border-radius: 10px;
    padding: 6px;
    box-sizing: border-box;
    position: relative;
}

/* TEXTO */
.block h4,
.block p {
    margin: 2px 0;
    font-size: 9px;
}

.block .code {
    font-weight: bold;
}

/* FLECHA */
.arrow {
    position: absolute;
    right: -21px;
    top: 3px;
    width: 60px;
    height: 90px;
    fill: black;
}

/* EDITABLE */
[contenteditable="true"] {
    outline: none;
    cursor: text;
}
/* 🔁 MODOS DE COLOR */
.bw {
    background: white;
    color: black;

}

.wb{
    background: black;
    color: white;

}
.bw .block{

    border: 2px black solid !important;
}
.wb .block{

    border: 2px white solid !important;
}
.wb svg * {
    fill: white;
}
/* IMPRESIÓN */
@media print {
    body {
        background: none;
    }

    .controls {
        display: none;
    }

    .a4 {
        box-shadow: none;
        margin: 0;
    }
}

.license-screen {
    position: fixed;
    inset: 0;
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.license-screen input {
    padding: 10px;
    margin: 10px 0;
    width: 250px;
    text-align: center;
}

.license-screen button {
    padding: 10px 20px;
}

#licenseError {
    color: red;
    margin-top: 10px;
}
