* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f4f5f7;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.5;
}

/* ---------- Login ---------- */

.paginaLogin {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.cajaLogin {
    background: #fff;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 360px;
}

.cajaLogin h1 {
    font-size: 22px;
    margin-bottom: 4px;
}

.subtitulo {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 16px;
}

.cajaLogin label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin: 12px 0 4px;
}

.cajaLogin input {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
}

.cajaLogin button {
    width: 100%;
    margin-top: 18px;
    padding: 10px;
    background: #1d4ed8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.cajaLogin button:hover {
    background: #1e40af;
}

/* ---------- Mensajes ---------- */

.mensajeError {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px 12px;
    border-radius: 6px;
    margin: 12px 0;
}

.mensajeVacio {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    color: #6b7280;
}

/* ---------- Dashboard ---------- */

.barraSuperior {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111827;
    color: #fff;
    padding: 14px 24px;
}

.barraSuperior h1 {
    font-size: 19px;
}

.barraSuperior h1 a {
    color: #fff;
    text-decoration: none;
}

.barraSuperior h1 a:hover {
    text-decoration: underline;
}

.barraSuperior .subtitulo {
    color: #9ca3af;
    margin-bottom: 0;
}

.botonNav {
    color: #111827;
    text-decoration: none;
    background: #fbbf24;
    border: 1px solid #f59e0b;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.botonNav:hover {
    background: #f59e0b;
}

.botonSalir {
    color: #e5e7eb;
    text-decoration: none;
    border: 1px solid #4b5563;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
}

.botonSalir:hover {
    background: #1f2937;
}

.menuSuperior {
    display: flex;
    gap: 8px;
}

/* ---------- Paginación ---------- */

.paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 18px 0;
    font-size: 14px;
    color: #4b5563;
}

.paginacion a {
    color: #1d4ed8;
    text-decoration: none;
    border: 1px solid #d1d5db;
    background: #fff;
    padding: 6px 14px;
    border-radius: 6px;
}

.paginacion a:hover {
    background: #f3f4f6;
}

.contenido {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px;
}

.resumen {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.ventana {
    font-size: 14px;
    color: #4b5563;
}

.contadores {
    display: flex;
    gap: 8px;
}

/* ---------- Badges por fuente ---------- */

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badgeNacion {
    background: #dbeafe;
    color: #1e40af;
}

.badgeCABA {
    background: #fef3c7;
    color: #92400e;
}

.badgePBA {
    background: #dcfce7;
    color: #166534;
}

/* ---------- Tabla ---------- */

.tablaNormas {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.tablaNormas th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    background: #f9fafb;
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
}

.tablaNormas td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

.tablaNormas tr:hover td {
    background: #f9fafb;
}

.tablaNormas a {
    color: #1d4ed8;
    text-decoration: none;
}

.tablaNormas a:hover {
    text-decoration: underline;
}

.celdaKeyword {
    color: #6b7280;
    font-size: 13px;
    white-space: nowrap;
}

.celdaFecha {
    white-space: nowrap;
    color: #4b5563;
}

/* ---------- Pie ---------- */

.pie {
    max-width: 1100px;
    margin: 16px auto 32px;
    padding: 0 16px;
    font-size: 13px;
    color: #6b7280;
}

.pie a {
    color: #1d4ed8;
    text-decoration: none;
}

.pie a:hover {
    text-decoration: underline;
}

/* ---------- Flash message ---------- */

.mensajeExito {
    background: #d1fae5;
    color: #065f46;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

/* ---------- Configuraciones ---------- */

.dosColumnas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 768px) {
    .dosColumnas { grid-template-columns: 1fr; }
}

.columnaConfig {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.tituloColumna {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    margin: 0;
}

.contadorConfig {
    font-weight: 400;
    color: #6b7280;
    font-size: 12px;
}

.filaConfig {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap;
}

.filaInactiva {
    opacity: 0.45;
}

.filaEditando {
    background: #eff6ff;
    padding: 10px 16px;
}

.filaEditando form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.textoConfig {
    flex: 1;
    font-size: 14px;
    color: #1f2937;
    min-width: 0;
    word-break: break-word;
}

.textoFrase {
    font-family: ui-monospace, "SFMono-Regular", monospace;
    font-size: 13px;
}

.acciones {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.badgeRegex {
    background: #ede9fe;
    color: #6d28d9;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.botonToggle {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid;
    cursor: pointer;
    font-weight: 600;
    line-height: 1.6;
}

.botonToggleOn {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.botonToggleOff {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #d1d5db;
}

.botonEditar {
    font-size: 11px;
    padding: 2px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #374151;
    text-decoration: none;
    background: #fff;
    line-height: 1.6;
    display: inline-block;
}

.botonEditar:hover {
    background: #f3f4f6;
}

.botonEliminar {
    font-size: 11px;
    padding: 2px 7px;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    color: #991b1b;
    background: #fee2e2;
    cursor: pointer;
    font-weight: 700;
    line-height: 1.6;
}

.botonEliminar:hover {
    background: #fecaca;
}

.botonGuardar {
    font-size: 12px;
    padding: 4px 12px;
    background: #1d4ed8;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.botonGuardar:hover {
    background: #1e40af;
}

.botonCancelar {
    font-size: 12px;
    padding: 4px 10px;
    color: #6b7280;
    text-decoration: none;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
}

.botonCancelar:hover {
    background: #f3f4f6;
}

.inputConfig {
    font-size: 13px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    width: 200px;
}

.inputConfigWide {
    width: 280px;
}

.checkboxConfig {
    font-size: 12px;
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.formAgregar {
    padding: 12px 16px;
    background: #fafafa;
    border-top: 2px solid #e5e7eb;
}

.formAgregar form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.notaFrase {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
}
