.fm-login-modal{
    --fm-login-accent:#0b285e;
    --fm-login-ink:#171717;
    --fm-login-muted:#66707a;
    --fm-login-line:#d8dde3;
    --fm-login-paper:#fff;
    --fm-login-danger:#9d2d2d;
    position:fixed!important;
    inset:0!important;
    z-index:2147483647!important;
    isolation:isolate;
    display:grid;
    place-items:center;
    padding:22px;
    font-family:"Inter Tight",Arial,sans-serif;
    color:var(--fm-login-ink);
    -webkit-font-smoothing:antialiased;
}
.fm-login-modal[hidden],
.fm-login-modal [hidden]{display:none!important}
.fm-login-backdrop{
    position:absolute;
    inset:0;
    background:rgba(20,24,29,.48);
    backdrop-filter:blur(2px);
    -webkit-backdrop-filter:blur(2px);
}
.fm-login-dialog{
    position:relative;
    z-index:1;
    width:min(430px,calc(100vw - 28px));
    max-height:calc(100vh - 36px);
    overflow:auto;
    border:1px solid rgba(0,0,0,.09);
    border-radius:13px;
    background:var(--fm-login-paper);
    box-shadow:0 22px 65px rgba(0,0,0,.18);
}
.fm-login-brand-row{
    position:relative;
    min-height:112px;
    padding:24px 22px 8px;
    display:flex;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
}
.fm-login-brand{
    display:block;
    width:30%;
    height:auto;
    max-height:92px;
    object-fit:contain;
}
.fm-login-close{
    appearance:none;
    position:absolute;
    top:16px;
    right:16px;
    width:32px;
    height:32px;
    display:grid;
    place-items:center;
    margin:0;
    padding:0;
    border:0;
    border-radius:50%;
    background:transparent;
    color:#982833;
    cursor:pointer;
}
.fm-login-close:hover{background:rgba(152,40,51,.06)}
.fm-login-close svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round}
.fm-login-content{
    width:min(350px,calc(100% - 44px));
    margin:0 auto;
    padding:10px 0 26px;
}
.fm-login-form{
    display:grid;
    gap:14px;
    margin:0;
}
.fm-login-field{
    display:grid;
    gap:6px;
    min-width:0;
    margin:0;
}
.fm-login-field label{
    margin:0;
    color:#59636e;
    font-family:"Inter Tight",Arial,sans-serif;
    font-size:13.5px;
    font-weight:600;
    line-height:1.2;
}
.fm-login-field input{
    appearance:none;
    box-sizing:border-box!important;
    width:100%;
    height:44px!important;
    min-height:44px!important;
    margin:0;
    padding:0 13px;
    border:1px solid #cfd5dc;
    border-radius:7px;
    outline:0;
    background:#fff;
    box-shadow:none;
    color:#171717;
    font-family:"Inter Tight",Arial,sans-serif;
    font-size:18px;
    font-weight:500;
    line-height:1;
    letter-spacing:.16em;
    transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.fm-login-field input:focus{
    border-color:var(--fm-login-accent);
    box-shadow:0 0 0 3px rgba(11,40,94,.09);
}
.fm-login-field input:disabled{
    background:#f5f6f7;
    color:#8a929a;
    cursor:not-allowed;
}
.fm-login-code-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) 145px;
    gap:8px;
    align-items:stretch;
}
.fm-login-send-code{
    appearance:none;
    box-sizing:border-box!important;
    height:44px!important;
    min-height:44px!important;
    margin:0;
    padding:0 10px;
    border:1px solid #c9d0d7;
    border-radius:7px;
    background:#fff;
    box-shadow:none;
    color:var(--fm-login-accent);
    font-family:"Inter Tight",Arial,sans-serif;
    font-size:12.5px;
    font-weight:600;
    line-height:1;
    cursor:pointer;
    white-space:nowrap;
}
.fm-login-send-code:hover:not(:disabled){border-color:var(--fm-login-accent);background:#fff}
.fm-login-send-code:disabled{color:#89919a;background:#f7f7f7;cursor:not-allowed}
.fm-login-feedback{
    min-height:16px;
    margin:-2px 0 0;
    color:#5d6670;
    font-family:"Inter Tight",Arial,sans-serif;
    font-size:12px;
    font-weight:400;
    line-height:1.35;
}
.fm-login-feedback.is-error{color:var(--fm-login-danger)}
.fm-login-submit{
    appearance:none;
    width:100%;
    height:44px;
    min-height:44px;
    margin:0;
    padding:0 14px;
    border:1px solid var(--fm-login-accent);
    border-radius:7px;
    background:var(--fm-login-accent);
    box-shadow:none;
    color:#fff;
    font-family:"Roboto Mono",monospace;
    font-size:11px;
    font-weight:700;
    line-height:1;
    letter-spacing:.055em;
    cursor:pointer;
    transition:background .15s ease,border-color .15s ease,opacity .15s ease;
}
.fm-login-submit:hover:not(:disabled){background:#0e3478;border-color:#0e3478;color:#fff}
.fm-login-submit:disabled{opacity:.48;cursor:not-allowed}
.fm-login-change-intro{display:grid;gap:7px;margin:0 0 2px}
.fm-login-change-intro p{
    margin:0;
    color:#65707a;
    font-family:"Inter Tight",Arial,sans-serif;
    font-size:13px;
    line-height:1.4;
}
body.fm-login-modal-open{overflow:hidden!important}
@media (max-width:520px){
    .fm-login-modal{padding:14px}
    .fm-login-dialog{width:min(410px,calc(100vw - 20px));max-height:calc(100vh - 20px);border-radius:11px}
    .fm-login-brand-row{min-height:102px;padding:21px 18px 6px}
    .fm-login-brand{width:30%;max-height:84px}
    .fm-login-close{top:13px;right:13px}
    .fm-login-change-intro h3{font-size:21px}
    .fm-login-content{width:calc(100% - 36px);padding:9px 0 23px}
    .fm-login-code-row{grid-template-columns:minmax(0,1fr) 138px;gap:7px}
    .fm-login-send-code{padding:0 8px;font-size:12px}
}

/* 1.141 · restablecimiento de contraseña */
.fm-login-label-row{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:12px;
    min-width:0;
}
.fm-login-label-row label{flex:0 0 auto}
.fm-login-text-action{
    appearance:none;
    margin:0;
    padding:0;
    border:0;
    background:transparent;
    box-shadow:none;
    color:#66707a;
    font-family:"Inter Tight",Arial,sans-serif;
    font-size:12.5px;
    font-weight:400;
    line-height:1.2;
    text-align:right;
    cursor:pointer;
    white-space:nowrap;
}
.fm-login-text-action:hover{
    color:var(--fm-login-accent);
    text-decoration:underline;
    text-underline-offset:2px;
}
.fm-password-rules{
    display:grid;
    gap:5px;
    margin:0;
    padding:0;
    list-style:none;
    color:var(--fm-login-danger);
    font-family:"Inter Tight",Arial,sans-serif;
    font-size:12.5px;
    font-weight:400;
    line-height:1.25;
}
.fm-password-rules li{
    position:relative;
    margin:0;
    padding:0 0 0 18px;
}
.fm-password-rules li::before{
    content:"×";
    position:absolute;
    left:0;
    top:0;
    width:14px;
    font-family:Arial,sans-serif;
    font-size:15px;
    font-weight:700;
    line-height:1;
    text-align:center;
}
.fm-password-rules li.is-valid{color:#277a45}
.fm-password-rules li.is-valid::before{
    content:"✓";
    font-size:13px;
}
.fm-password-rules li.is-invalid{color:var(--fm-login-danger)}
.fm-login-feedback.is-success{color:#277a45}
@media (max-width:420px){
    .fm-login-label-row{align-items:flex-start;gap:8px}
    .fm-login-text-action{font-size:12px}
}


/* 1.143 · bloqueo global temporal del acceso de grupos. */
.fm-login-disabled-notice{
    margin:2px 0 4px;
    padding:14px 16px;
    border:1px solid #e0e3e7;
    border-radius:7px;
    background:#f7f8f9;
    color:#59636e;
    font-family:"Inter Tight",Arial,sans-serif;
    font-size:13.5px;
    font-weight:400;
    line-height:1.45;
    text-align:center;
}
