/* NB Analizar Etiqueta — estilos (coherentes con Suplementos) */
.nbe-app {
    max-width: 820px; margin: 0 auto; padding: 0 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #263238;
}

.nb-volver-herramientas {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; margin-bottom: 20px;
    background: #f5f5f5; color: #555; text-decoration: none;
    border-radius: 8px; font-size: 13px; font-weight: 600; transition: all 0.18s;
}
.nb-volver-herramientas:hover { background: #e0e0e0; color: #1b5e20; }

.nbe-header h2 { font-size: 26px; margin: 0 0 8px; color: #1b2a3a; }
.nbe-sub { color: #607d8b; font-size: 15px; margin: 0 0 20px; line-height: 1.5; }

/* Cómo usar (colapsable) */
.nbe-como-usar {
    background: #f5f7fa; border: 1px solid #e0e6ed; border-radius: 12px;
    margin-bottom: 24px; overflow: hidden;
}
.nbe-como-usar summary {
    list-style: none; cursor: pointer; padding: 16px 20px;
    display: flex; align-items: center; gap: 12px; font-weight: 700; color: #1b2a3a;
}
.nbe-como-usar summary::-webkit-details-marker { display: none; }
.nbe-como-icon { font-size: 20px; }
.nbe-como-title { flex: 1; }
.nbe-chevron { transition: transform 0.2s; color: #90a4ae; }
.nbe-como-usar[open] .nbe-chevron { transform: rotate(180deg); }
.nbe-como-body { padding: 0 20px 20px; color: #455a64; line-height: 1.6; font-size: 14px; }
.nbe-como-body ol { margin: 8px 0 0; padding-left: 20px; }
.nbe-como-body li { margin-bottom: 8px; }

/* Formulario */
.nbe-form {
    background: #fff; border: 1px solid #e0e6ed; border-radius: 14px;
    padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.nbe-form-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.nbe-form-row .nbe-field { flex: 1; min-width: 180px; }
.nbe-form-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px;
}
.nbe-field { display: flex; flex-direction: column; gap: 6px; }
.nbe-label { font-size: 13px; font-weight: 600; color: #546e7a; }
.nbe-field input, .nbe-field select {
    padding: 11px 14px; border: 1.5px solid #cfd8dc; border-radius: 9px;
    font-size: 15px; line-height: 1.6; color: #263238; background: #fff;
    transition: border 0.15s; width: 100%;
}
.nbe-field select {
    height: auto; min-height: 46px; padding-top: 10px; padding-bottom: 10px;
    line-height: 1.5; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%204%205%22%3E%3Cpath%20fill%3D%22%2378909c%22%20d%3D%22M2%200L0%202h4zm0%205L0%203h4z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 8px;
    padding-right: 36px;
}
.nbe-field input:focus, .nbe-field select:focus {
    outline: none; border-color: #1565c0;
}

.nbe-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.nbe-btn-primary {
    background: #1b5e20; color: #fff; border: none; padding: 13px 28px;
    border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer;
    box-shadow: 0 3px 10px rgba(27,94,32,0.25); transition: all 0.18s;
}
.nbe-btn-primary:hover { background: #2e7d32; transform: translateY(-1px); }
.nbe-btn-ghost {
    background: #f5f5f5; color: #555; border: none; padding: 13px 24px;
    border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.nbe-btn-ghost:hover { background: #e0e0e0; }

/* Resultado */
.nbe-resultado { margin-bottom: 20px; }
.nbe-error {
    background: #fff3e0; border-left: 4px solid #fb8c00; padding: 16px 20px;
    border-radius: 10px; color: #e65100; font-weight: 600;
}

.nbe-veredicto {
    display: flex; align-items: center; gap: 16px; padding: 20px 24px;
    border-radius: 14px; margin-bottom: 16px;
}
.nbe-veredicto-icon { font-size: 38px; flex-shrink: 0; }
.nbe-veredicto-txt { font-size: 16px; line-height: 1.4; }
.nbe-ok { background: #e8f5e9; color: #1b5e20; }
.nbe-alerta { background: #fff8e1; color: #e65100; }

/* Sellos (octógonos negros como la ley) */
.nbe-sellos { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; justify-content: center; }
.nbe-sello {
    background: #000; color: #fff; font-weight: 800; font-size: 15px;
    padding: 18px 22px; text-align: center; line-height: 1.2;
    border: 3px solid #fff; outline: 3px solid #000;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    min-width: 150px; display: flex; align-items: center; justify-content: center;
    aspect-ratio: 1; max-width: 170px;
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* Tabla de cálculos */
.nbe-tabla-wrap { margin-bottom: 18px; }
.nbe-tabla-wrap h4 { font-size: 15px; color: #1b2a3a; margin: 0 0 10px; }
.nbe-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.nbe-tabla th {
    background: #f5f7fa; padding: 10px 12px; text-align: left; color: #546e7a;
    font-weight: 700; border-bottom: 2px solid #e0e6ed;
}
.nbe-tabla td { padding: 10px 12px; border-bottom: 1px solid #eceff1; }
.nbe-calc { color: #78909c; font-family: monospace; font-size: 12px; }
.nbe-res { font-weight: 700; color: #263238; }
.nbe-corte { color: #90a4ae; font-size: 12px; }
.nbe-check { text-align: center; font-size: 16px; }
.nbe-row-ex { background: #fff8e1; }
.nbe-row-ex .nbe-res { color: #e65100; }

.nbe-aviso {
    background: #e3f2fd; border-left: 4px solid #1565c0; padding: 14px 18px;
    border-radius: 10px; color: #0d47a1; font-size: 13px; line-height: 1.5;
}

.nbe-fuentes {
    margin-top: 24px; padding-top: 16px; border-top: 1px solid #eceff1;
    font-size: 12px; color: #90a4ae; line-height: 1.5;
}

@media (max-width: 600px) {
    .nbe-form-row { flex-direction: column; }
    .nbe-sello { min-width: 120px; font-size: 13px; padding: 14px; }
    .nbe-tabla { font-size: 11px; }
    .nbe-calc { display: none; }
}
