/* ============================================================
   SIGA — Estilo partilhado para páginas de autenticação/registo
   (cartão centrado, fundo personalizável, suporte a modo escuro)
   Modelo: Pages/Login.razor.css
   ============================================================ */
.auth__bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(110% 90% at 12% 12%, rgba(0, 157, 158, .55), transparent 52%),
        radial-gradient(120% 100% at 88% 88%, rgba(7, 98, 127, .65), transparent 55%),
        linear-gradient(150deg, #06303d, #073545 55%, #052733);
}

.auth__veil {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(120% 120% at 50% 30%, rgba(4, 22, 29, .30), rgba(4, 22, 29, .62));
}

.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth__card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border: 1px solid #dde3e7;
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(16, 37, 46, .22);
    padding: 38px 38px 30px;
}

.auth__card--wide {
    max-width: 720px;
}

.auth__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.auth__brand img {
    height: 56px;
    width: auto;
    display: block;
}

.auth__title {
    text-align: center;
    margin-bottom: 24px;
}

.auth__title h1,
.auth__title h4 {
    font-weight: 600;
    font-size: 22px;
    margin: 0 0 4px;
    letter-spacing: -.3px;
    color: #16252e;
}

.auth__title p {
    margin: 0;
    color: #5d6f7a;
    font-size: 14px;
}

.auth__body {
    font-size: 14px;
    color: #16252e;
    line-height: 1.55;
}

.auth__body p {
    margin: 0 0 12px;
}

.auth__body ul {
    margin: 0 0 12px;
    padding-left: 20px;
}

.auth__body strong,
.auth__body b {
    color: #16252e;
}

.auth__card hr {
    border-color: #dde3e7;
    margin: 22px 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #16252e;
    margin-bottom: 7px;
}

.input-wrap {
    display: flex;
    align-items: stretch;
}

.auth-icon {
    flex-shrink: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f8f9;
    border: 1px solid #cbd4d9;
    border-right: none;
    border-radius: 7px 0 0 7px;
    color: #5d6f7a;
}

.auth-input2,
.auth-select {
    min-width: 0;
    width: 100%;
    font-family: inherit;
    font-size: 14.5px;
    padding: 10px 12px;
    border: 1px solid #cbd4d9;
    border-radius: 0 7px 7px 0;
    background: #ffffff;
    color: #16252e;
}

.auth-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6f7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
}

.auth-input2::placeholder {
    color: #8a98a1;
}

.auth-input2:focus,
.auth-select:focus {
    outline: none;
    border-color: var(--login-color, #07627f);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--login-color, #07627f) 18%, transparent);
}

.auth__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.auth__actions--row {
    flex-direction: row;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s, opacity .15s;
    text-decoration: none;
    padding: 11px 18px;
}

.btn--primary {
    background: var(--login-color, #07627f);
    border-color: var(--login-color, #07627f);
    color: #fff;
}

.btn--primary:hover {
    opacity: .9;
    color: #fff;
}

.btn--secondary {
    background: transparent;
    border-color: #cbd4d9;
    color: #16252e;
}

.btn--secondary:hover {
    background: #f6f8f9;
    color: #16252e;
}

.btn-block {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
}

.auth__foot {
    text-align: center;
    font-size: 12.5px;
    color: #5d6f7a;
    margin: 10px 0 0;
}

.auth__foot a {
    color: var(--login-color, #07627f);
    font-weight: 600;
    text-decoration: none;
}

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

.auth__foot--danger {
    color: #c0392b;
    font-weight: 600;
}

@media (max-width: 460px) {
    .auth {
        padding: 14px;
    }

    .auth__card {
        padding: 30px 24px 24px;
    }

    .auth__actions--row {
        flex-direction: column;
    }
}

/* ============================================================
   Modo escuro — segue a preferência do SO/browser.
   ============================================================ */
@media (prefers-color-scheme: dark) {
    .auth__card {
        background: #131e24;
        border-color: #233138;
        box-shadow: 0 12px 34px rgba(0, 0, 0, .55);
    }

    .auth__title h1,
    .auth__title h4 {
        color: #e7eef1;
    }

    .auth__title p {
        color: #98abb4;
    }

    .auth__body {
        color: #e7eef1;
    }

    .auth__body strong,
    .auth__body b {
        color: #e7eef1;
    }

    .auth__card hr {
        border-color: #2e3f47;
    }

    .form-group label {
        color: #e7eef1;
    }

    .auth-icon {
        background: #1a282f;
        border-color: #2e3f47;
        color: #98abb4;
    }

    .auth-input2,
    .auth-select {
        background: #0f1a20;
        border-color: #2e3f47;
        color: #e7eef1;
    }

    .auth-input2:-webkit-autofill,
    .auth-input2:-webkit-autofill:hover,
    .auth-input2:-webkit-autofill:focus {
        -webkit-text-fill-color: #e7eef1;
        -webkit-box-shadow: 0 0 0 1000px #0f1a20 inset;
        box-shadow: 0 0 0 1000px #0f1a20 inset;
        caret-color: #e7eef1;
    }

    .auth-input2::placeholder {
        color: #6c818b;
    }

    .btn--secondary {
        border-color: #2e3f47;
        color: #e7eef1;
    }

    .btn--secondary:hover {
        background: #1a282f;
        color: #e7eef1;
    }

    .auth__foot {
        color: #98abb4;
    }

    .auth__foot--danger {
        color: #ff6b6b;
    }
}
