/* ============================================================
   Sistema interno de monitoreo — Hosting Montevideo
   Tema claro y corporativo: azul marino + naranja de marca.
   Responsive (escritorio y móvil).
   ============================================================ */

:root {
    /* Marca */
    --navy:       #06246b;
    --navy-2:     #0a1f4d;
    --navy-soft:  #eaf0fb;
    --accent:     #fc6f06;   /* naranja Hosting Montevideo */
    --accent-2:   #e85f00;   /* hover */
    --accent-3:   #fb9b53;   /* ámbar del degradado */
    --accent-soft:rgba(252, 111, 6, .14);

    /* Superficies */
    --bg:         #eef2f9;
    --card:       #ffffff;
    --line:       #e3e9f3;
    --line-2:     #ccd7ea;
    --field:      #f6f8fc;

    /* Texto */
    --text:       #12244d;
    --muted:      #5c6b86;
    --muted-2:    #8b99b2;

    /* Estados */
    --ok:         #0f8a5f;
    --ok-bg:      #e7f6ef;
    --ok-line:    #b7e2cf;
    --danger:     #cf3d3d;
    --danger-bg:  #fdecec;
    --danger-line:#f3c6c6;
    --info:       #06246b;
    --info-bg:    #eaf0fb;
    --info-line:  #cdddf6;

    --radius:     16px;
    --radius-sm:  10px;
    --shadow:     0 24px 60px -28px rgba(6, 36, 107, .35), 0 1px 0 rgba(255, 255, 255, .6) inset;
    --font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono:       ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(1200px 640px at 50% -12%, #e2ebfa 0%, transparent 60%),
        radial-gradient(760px 520px at 100% 108%, rgba(252, 111, 6, .10) 0%, transparent 55%),
        var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---------- Layout ---------- */

.shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.card {
    width: 100%;
    max-width: 424px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 34px 32px 22px;
}

body.dashboard .card { max-width: 660px; }

/* ---------- Marca / logo ---------- */

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.brand__logo {
    height: 44px;
    width: auto;
    max-width: 100%;
    display: block;
}

.brand__tag {
    font-size: 11px;
    color: var(--muted-2);
    letter-spacing: 1.4px;
    text-transform: uppercase;
    font-weight: 600;
}

/* ---------- Encabezado de paso ---------- */

.step { margin-bottom: 22px; }
.step__eyebrow {
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin: 0 0 8px;
}
.step__title { font-size: 22px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.3px; color: var(--navy); }
.step__desc  { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.5; }

/* ---------- Formularios ---------- */

.field { margin-bottom: 16px; }
.field__label {
    display: block;
    font-size: 12.5px;
    color: var(--navy);
    margin-bottom: 7px;
    font-weight: 600;
}

.input {
    width: 100%;
    background: var(--field);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14.5px;
    padding: 12px 13px;
    transition: border-color .15s, box-shadow .15s, background .15s;
    font-family: var(--font);
}
.input::placeholder { color: var(--muted-2); }
.input:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
    width: 100%;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    font-size: 14.5px;
    font-weight: 650;
    font-family: var(--font);
    color: #fff;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
    cursor: pointer;
    transition: filter .15s, transform .05s, box-shadow .15s;
    letter-spacing: .2px;
    box-shadow: 0 8px 18px -8px rgba(252, 111, 6, .55);
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn--ghost {
    background: #fff;
    border: 1px solid var(--line-2);
    color: var(--navy);
    box-shadow: none;
}
.btn--ghost:hover { background: var(--navy-soft); filter: none; }

.form-actions { margin-top: 20px; }

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

.alert {
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 18px;
    display: flex;
    gap: 9px;
    align-items: flex-start;
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert--error  { background: var(--danger-bg); color: #a12a2a; border: 1px solid var(--danger-line); }
.alert--ok     { background: var(--ok-bg); color: #0b6b49; border: 1px solid var(--ok-line); }
.alert--info   { background: var(--info-bg); color: var(--navy); border: 1px solid var(--info-line); }

/* ---------- Código OTP ---------- */

.otp {
    display: flex;
    gap: 9px;
    justify-content: space-between;
    margin: 6px 0 4px;
}
.otp__digit {
    width: 100%;
    aspect-ratio: 1 / 1.15;
    text-align: center;
    font-size: 25px;
    font-weight: 650;
    font-family: var(--mono);
    background: var(--field);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    color: var(--navy);
    transition: border-color .15s, box-shadow .15s, background .15s;
    padding: 0;
}
.otp__digit:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.otp__digit.is-filled { border-color: var(--accent); background: #fff; }

/* ---------- Setup 2FA / QR ---------- */

.qr {
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin: 4px auto 16px;
    width: fit-content;
    box-shadow: 0 10px 26px -16px rgba(6, 36, 107, .35);
}
.qr svg { display: block; width: 190px; height: 190px; }

.secret { text-align: center; margin-bottom: 18px; }
.secret__label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.secret__code {
    font-family: var(--mono);
    font-size: 15px;
    letter-spacing: 2px;
    color: var(--navy);
    background: var(--field);
    border: 1px dashed var(--line-2);
    border-radius: 8px;
    padding: 9px 12px;
    display: inline-block;
    word-break: break-all;
}
.secret__code--block {
    display: block;
    margin-top: 8px;
    letter-spacing: 1px;
    font-size: 13px;
}

.steps-list {
    list-style: none;
    counter-reset: s;
    padding: 0;
    margin: 0 0 20px;
}
.steps-list li {
    counter-increment: s;
    position: relative;
    padding: 0 0 12px 34px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}
.steps-list li::before {
    content: counter(s);
    position: absolute;
    left: 0; top: -2px;
    width: 23px; height: 23px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-2);
    font-size: 12px;
    font-weight: 700;
    display: grid;
    place-items: center;
}

/* ---------- Códigos de recuperación ---------- */

.recovery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: var(--field);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin: 4px 0 18px;
}
.recovery code {
    font-family: var(--mono);
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--navy);
    text-align: center;
    padding: 5px 0;
}

/* ---------- Divisor / enlaces ---------- */

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--muted-2);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.divider::before, .divider::after {
    content: "";
    height: 1px;
    background: var(--line);
    flex: 1;
}

.link-row { text-align: center; margin-top: 16px; }
.link {
    color: var(--accent-2);
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .15s, border-color .15s;
    font-weight: 500;
}
.link:hover { color: var(--accent); border-color: var(--accent); }

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

.foot {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--muted-2);
    font-size: 11.5px;
    letter-spacing: .2px;
}
.foot__lock { color: var(--ok); display: inline-flex; }

/* ---------- Panel privado ---------- */

.dash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.dash-head__user { font-size: 13px; color: var(--muted); }
.dash-head__user strong { color: var(--navy); font-weight: 650; }

.panel {
    background: linear-gradient(180deg, #f8faff 0%, var(--field) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 32px 26px;
    text-align: center;
}
.panel__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--ok-bg);
    color: #0b6b49;
    border: 1px solid var(--ok-line);
    border-radius: 999px;
    padding: 6px 13px;
    font-size: 12.5px;
    font-weight: 650;
    margin-bottom: 16px;
}
.panel__title { font-size: 19px; font-weight: 700; margin: 0 0 8px; color: var(--navy); }
.panel__text { font-size: 13.5px; color: var(--muted); margin: 0 auto; max-width: 440px; line-height: 1.6; }

.logout-form { width: auto; }
.logout-form .btn { width: auto; padding: 9px 16px; font-size: 13px; }

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
    .card { padding: 26px 20px 18px; border-radius: 14px; }
    .shell { padding: 14px; }
    .brand__logo { height: 38px; }
    .step__title { font-size: 20px; }
    .otp { gap: 6px; }
    .otp__digit { font-size: 21px; }
    .recovery { grid-template-columns: 1fr; }
    .qr svg { width: 168px; height: 168px; }
}
