/* =========================
   SECURA AUTH (login / register)
========================== */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #0f1c2e;
    color: #ffffff;
    overflow: auto;
}

.navbar-secura {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background: rgba(15, 28, 46, 0.85);
    backdrop-filter: blur(8px);
    padding: 20px 60px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-sizing: border-box;
}

.brand {
    font-size: 2rem;
    font-weight: 700;
    color: #4ea3ff;
    letter-spacing: 1px;
}

.login-hero,
.register-hero {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    background-image: url('../images/splash.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-y: auto;
    padding: 6.5rem 1rem 4rem;
    box-sizing: border-box;
}

.login-hero::before,
.register-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(10,25,50,0.9), rgba(10,25,50,0.75));
}

.login-card,
.register-card {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 50px 40px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
    max-height: none;
}

.login-card {
    max-width: 420px;
}

.register-card {
    max-width: 480px;
}

.login-card h2 {
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 1px;
}

.register-card h2 {
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: 1px;
}

.register-card p {
    text-align: center;
    opacity: 1;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.92);
}

.form-control {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.35);
    color: #ffffff;
    border-radius: 12px;
    padding: 12px 15px;
    caret-color: #ffffff;
}

.form-control:focus {
    background: rgba(255,255,255,0.16);
    border-color: #7ec8ff;
    box-shadow: none;
    color: #ffffff;
}

/* Password field: black text on a light field (demo creds stay white below) */
.form-control[type="password"],
input[type="password"].form-control,
.password-field .form-control {
    color: #121a24 !important;
    -webkit-text-fill-color: #121a24;
    caret-color: #121a24;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(255, 255, 255, 0.55);
}

.form-control[type="password"]:focus,
input[type="password"].form-control:focus,
.password-field .form-control:focus {
    color: #121a24 !important;
    -webkit-text-fill-color: #121a24;
    background: #ffffff;
    border-color: #7ec8ff;
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 2.75rem;
}

.password-eye {
    position: absolute;
    right: 0.55rem;
    top: 0.55rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: #121a24;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.password-eye:focus {
    outline: none;
}

.form-control[type="password"]::placeholder,
input[type="password"].form-control::placeholder {
    color: rgba(18, 26, 36, 0.45);
    -webkit-text-fill-color: rgba(18, 26, 36, 0.45);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.88);
    opacity: 1;
}

.form-control:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.88);
}

.form-control::-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.88);
}

.btn-secura {
    width: 100%;
    border-radius: 30px;
    padding: 12px;
    font-weight: 600;
    margin-top: 15px;
}

.back-link {
    text-align: center;
    margin-top: 20px;
    opacity: 0.8;
}

.back-link a {
    color: #4ea3ff;
    text-decoration: none;
}

.login-notify {
    color: yellow;
    font-size: 1.1rem;
}

.login-notify.login-error {
    display: block;
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #f5c2c7;
    border-radius: 0.4rem;
    background: #f8d7da;
    color: #842029;
    font-weight: 700;
}

footer {
    position: static;
    padding: 0.75rem 1rem 1.25rem;
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

@media (max-height: 700px) {
    .login-hero,
    .register-hero {
        align-items: flex-start;
        padding-top: 5.5rem;
        padding-bottom: 2rem;
    }

    .login-card,
    .register-card {
        padding: 1.5rem 1.25rem;
    }

    .navbar-secura {
        padding: 12px 24px;
    }
}

footer a {
    color: #4ea3ff;
    text-decoration: none;
}

.caps-alert {
    animation: capsFlash 0.6s infinite alternate;
}

@keyframes capsFlash {
    from { box-shadow: 0 0 10px rgba(255,80,80,.3); }
    to { box-shadow: 0 0 20px rgba(255,80,80,.9); }
}

.demo-creds {
    margin-top: 1.25rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    text-align: left;
}

.demo-creds-title {
    margin: 0 0 0.45rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.demo-creds p {
    margin: 0.3rem 0 0;
    font-size: 0.95rem;
    color: #ffffff;
}

.demo-creds span {
    display: inline-block;
    min-width: 3.4rem;
    font-weight: 600;
    color: #c5f0f2;
}

.demo-creds code {
    font-family: ui-monospace, Consolas, monospace;
    padding: 0.15em 0.45em;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 600;
}

.demo-creds-note {
    margin-top: 0.65rem !important;
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Custom CAPTCHA (login / register) */
.secura-captcha-input {
    margin-bottom: 0.35rem;
}

.secura-captcha-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
}

.secura-captcha-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.secura-captcha-img {
    display: block;
    width: 180px;
    height: 56px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: #122030;
}

.secura-captcha-refresh {
    min-width: 2.4rem;
    font-size: 1.15rem;
    line-height: 1;
}

/* Force captcha entry to display as uppercase (value also uppercased in JS) */
#txtCaptcha,
.secura-captcha input.form-control {
    text-transform: uppercase !important;
    letter-spacing: 0.14em;
    font-weight: 600;
}

/* Modal wait banner (login / register postback) */
.auth-wait {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
}

.auth-wait.is-visible {
    display: flex;
}

.auth-wait-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 260px;
    max-width: 90vw;
    padding: 1.35rem 1.75rem;
    border-radius: 14px;
    background: rgba(13, 110, 253, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
    color: #fff;
}

.auth-wait-spinner {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: auth-wait-spin 0.75s linear infinite;
    flex-shrink: 0;
}

.auth-wait-msg {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.login-forgot.hidden {
    display: none;
}

.login-forgot {
    margin-top: 0.75rem;
    text-align: left;
}

.login-forgot-link {
    color: #cfe2ff;
    text-decoration: underline;
    background: none;
    border: none;
}

.login-forgot-hint {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

@keyframes auth-wait-spin {
    to { transform: rotate(360deg); }
}

.caps-warning {
    display: none;
    margin-top: 6px;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    background: rgba(255, 196, 0, 0.2);
    color: #ffe566;
    font-size: 0.9rem;
    font-weight: 700;
}

.caps-warning.is-on {
    display: block;
}

.register-dialog {
    display: none;
}

.register-hint {
    font-size: 0.85rem;
    opacity: 0.85;
}

.email-sent-title {
    font-size: 25px !important;
}

.dev-error-box {
    font-size: 14px;
    color: red;
    border: 1px solid gray;
    padding: 10px;
    background: #f8d7da;
}

.dev-error-k {
    color: black;
    font-weight: bold;
}

.dev-error-note {
    color: #5c2b00;
    font-weight: bold;
}

.prod-error-box {
    font-size: 14px;
}

.prod-error-copy {
    padding: 10px;
}
