:root {
    --ink: #2F4F4F;
    --muted: #A9A9A9;
    --line: #e2e8f0;
    --brand: #B22222;
    --brand-dark: #8B0000;
    --danger: #B22222;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(135deg, rgba(47, 79, 79, 0.9), rgba(26, 43, 43, 0.8)),
        url("fondo.jpg") center / cover no-repeat;
    color: #ffffff;
    font-family: 'Outfit', 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

#dv_login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    width: min(430px, 100%);
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.login-brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.login-brand span {
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.login-brand h1 {
    margin: 4px 0 0;
    font-size: 24px;
    line-height: 1.2;
}

.login-field {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
}

.login-field label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.txt_box {
    width: 100%;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--ink);
    background: #ffffff;
}

.txt_box:focus {
    outline: 2px solid rgba(15, 118, 110, 0.25);
    border-color: var(--brand);
}

.login-message {
    margin: 4px 0 16px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef2f2;
    color: var(--danger);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.login-message.is-ok {
    background: #ecfdf5;
    color: #047857;
}

.login-hint {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.login-link-btn,
#btn_login,
#btn_setup {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    background: linear-gradient(180deg, #5a6575 0%, #3a4554 48%, #2a3340 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    text-shadow: 0 1px 0 rgba(0,0,0,.25);
    box-shadow:
        0 1px 0 rgba(255,255,255,.22) inset,
        0 -2px 0 rgba(0,0,0,.18) inset,
        0 3px 0 #1a222d,
        0 10px 18px rgba(15, 23, 42, .28);
    transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.login-link-btn::before,
#btn_login::before,
#btn_setup::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,.26) 0%, rgba(255,255,255,.05) 40%, rgba(0,0,0,.12) 100%);
    pointer-events: none;
}

#btn_login:hover,
#btn_setup:hover,
.login-link-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255,255,255,.28) inset,
        0 -2px 0 rgba(0,0,0,.16) inset,
        0 4px 0 #151c26,
        0 14px 24px rgba(15, 23, 42, .32);
}

#btn_login:active,
#btn_setup:active,
.login-link-btn:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 0 rgba(255,255,255,.1) inset,
        0 1px 0 rgba(0,0,0,.25) inset,
        0 1px 0 #1a222d,
        0 4px 10px rgba(15, 23, 42, .25);
}

.login-recover {
    margin: 16px 0 0;
    text-align: center;
}

.login-recover a {
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.login-recover a:hover {
    color: var(--brand-dark);
    text-decoration: underline;
}
