/* HV 411 · Editor claro, compacto y sobrio de políticas económicas. */
.hv411-wallet-head-buttons{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.hv411-rules-dialog{width:min(94vw,530px);max-height:calc(100dvh - 30px);overflow:auto;border:1px solid rgba(115,138,53,.2);border-radius:22px;padding:0;background:#fdfef9;box-shadow:0 28px 88px rgba(23,35,54,.27);color:#303768;overscroll-behavior:contain}
.hv411-rules-dialog::backdrop{background:rgba(21,28,49,.58)}
.hv411-rules-form{padding:22px;display:grid;gap:14px}
.hv411-rules-top{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.hv411-rules-top small{font-size:.68rem;font-weight:850;letter-spacing:.08em;color:#718528}
.hv411-rules-top h3{font-size:1.35rem;line-height:1.18;letter-spacing:-.025em;margin:5px 0}
.hv411-rules-top p{margin:0;font-size:.8rem;color:#687282;line-height:1.45}
.hv411-rules-close{appearance:none;flex:0 0 32px;width:32px;height:32px;border:1px solid #e5eadb;border-radius:50%;background:white;color:#3f4c69;font-size:1.2rem}
.hv411-rules-mode{border-radius:999px;background:#eff4dc;padding:7px 12px;width:fit-content;font-size:.72rem;font-weight:750;color:#647920}
.hv411-rules-mode[data-custom="1"]{background:#e9eefb;color:#303768}
.hv411-rules-enabled{display:flex;justify-content:space-between;align-items:center;gap:14px;border:1px solid #e6ebd9;border-radius:15px;padding:12px 14px;background:#fff}
.hv411-rules-enabled span{display:grid;gap:3px}.hv411-rules-enabled strong{font-size:.88rem}.hv411-rules-enabled small{font-size:.73rem;line-height:1.4;color:#6d7786}
.hv411-rules-enabled input{width:22px;height:22px;flex:none;accent-color:#8daa31}
.hv411-rules-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.hv411-rules-fields label{font-size:.79rem;font-weight:780;color:#313c67;display:grid;gap:5px;align-content:start}
.hv411-rules-fields label span{font-size:.7rem;font-weight:450;color:#79818a;line-height:1.3;min-height:26px}
.hv411-rules-prefix{display:flex;align-items:center;gap:4px;background:white;border:1px solid #dce4ce;border-radius:12px;padding:0 10px;min-width:0}
.hv411-rules-prefix:focus-within{outline:2px solid #91ac42;outline-offset:1px}
.hv411-rules-prefix input{width:100%;min-width:0;border:none;background:transparent;outline:none;height:39px;padding:0;font:inherit;color:#303768}
.hv411-rules-prefix b{color:#7a852c;font-weight:750;font-size:.8rem}
.hv411-rules-preview{padding:12px 13px;background:#f3f7e9;border-radius:13px;color:#586d27}
.hv411-rules-preview small{display:block;font-weight:800;font-size:.64rem;letter-spacing:.07em}
.hv411-rules-preview p{font-size:.77rem;line-height:1.45;margin:6px 0 0}
.hv411-rules-fixed{font-size:.73rem;color:#6d7685;line-height:1.5;margin:0}
.hv411-rules-reason{display:grid;gap:6px;font-size:.79rem;font-weight:760}
.hv411-rules-reason input{width:100%;box-sizing:border-box;border:1px solid #dce4ce;padding:11px 12px;border-radius:11px;background:white;color:#303768;font:inherit;font-size:.79rem}
.hv411-rules-status{font-size:.74rem;color:#667d23;min-height:18px;line-height:1.3;margin:0}
.hv411-rules-status[data-bad="1"]{color:#a63b41}
.hv411-rules-actions{display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.hv411-rules-actions button{border:1px solid #d4dcc4;background:white;border-radius:999px;padding:9px 13px;font-size:.76rem;font-weight:760;color:#33406b;cursor:pointer}
.hv411-rules-actions .hv411-rules-save{border-color:#a6bb44;background:#aec641;color:#263456}
.hv411-rules-actions .hv411-rules-reset{margin-right:auto;color:#8d422d;border-color:#e2d1c9}
.hv411-rules-actions button:disabled{cursor:wait;opacity:.55}
.hv411-rules-audit{border-top:1px solid #e8ecdf;padding-top:8px}
.hv411-rules-audit summary{cursor:pointer;color:#697780;font-size:.73rem;font-weight:750}
.hv411-rules-audit p,.hv411-rules-audit #hv411-rules-audit{font-size:.7rem;line-height:1.45;color:#77838a}
.hv411-rules-audit p{margin:7px 0}
@media(max-width:540px){.hv411-rules-form{padding:16px;gap:12px}.hv411-rules-fields{gap:10px}.hv411-rules-fields label span{min-height:34px}.hv411-rules-top h3{font-size:1.22rem}.hv411-wallet-head-buttons{justify-content:flex-start}.hv411-rules-actions{gap:5px}.hv411-rules-actions button{font-size:.7rem;padding:8px 10px}}
@media(max-width:360px){.hv411-rules-fields{grid-template-columns:1fr}.hv411-rules-fields label span{min-height:0}}

/* HV449: vigencia puntual por crédito, independiente de la excepción futura. */
.hv449-one-off[hidden]{display:none!important}
.hv449-one-off{border:1px solid #dce5c7;border-radius:14px;background:#fafcf4;padding:11px 13px}
.hv449-one-off summary{font-size:.82rem;font-weight:800;color:#334268;cursor:pointer}
.hv449-one-off details{display:grid;gap:10px}
.hv449-one-off p{font-size:.75rem;line-height:1.45;color:#657287;margin:10px 0}
.hv449-one-off label{display:grid;gap:5px;font-size:.77rem;font-weight:750;margin:10px 0}
.hv449-one-off input,.hv449-one-off select{box-sizing:border-box;width:100%;max-width:100%;min-height:41px;padding:8px 11px;border:1px solid #dce4ce;border-radius:11px;background:#fff;color:#303768;font:inherit}
.hv449-one-off button{background:#aec641;border:1px solid #9eb339;color:#283450;border-radius:999px;padding:10px 13px;font-size:.77rem;font-weight:800;cursor:pointer}
.hv449-one-off button:disabled{opacity:.55;cursor:default}
#hv449-one-off-status{color:#536e24;font-weight:650}

/* HV449: herencia de reglas globales cuando solo se personaliza la vigencia. */
.hv449-inherit[hidden]{display:none!important}
.hv449-inherit{display:flex;align-items:flex-start;gap:10px;background:#f4f7e9;border:1px solid #e0e8ce;padding:12px;border-radius:13px}
.hv449-inherit input{accent-color:#8daa31;min-width:20px;width:20px;height:20px;margin-top:1px}
.hv449-inherit span{display:grid;gap:4px}.hv449-inherit strong{font-size:.8rem}.hv449-inherit small{font-size:.73rem;color:#647282;line-height:1.4}
.hv411-rules-dialog[data-days-only="1"] .hv411-rules-enabled,.hv411-rules-dialog[data-days-only="1"] .hv411-rules-fields>label:not(:last-child){display:none}
.hv411-rules-dialog[data-days-only="1"] .hv411-rules-fields{grid-template-columns:1fr}
