:root { color-scheme: dark; }

* { box-sizing: border-box; }

html { min-height: 100%; }

body.alhani-login-page {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    color: #f5f7fc;
    background:
        radial-gradient(ellipse at 50% 41%, rgba(35, 49, 76, .36), transparent 54%),
        radial-gradient(ellipse at 50% 88%, rgba(31, 39, 61, .24), transparent 43%),
        #080e1a;
    font-family: Poppins, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }

.auth-shell {
    width: min(100%, 480px);
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding: max(34px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.brand-lockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.brand-mark {
    width: 53px;
    height: 53px;
    display: grid;
    place-items: center;
    border: 1px solid #ffe78a;
    border-radius: 50%;
    color: #080c14;
    background: linear-gradient(145deg, #ffdf66 5%, #ffc21d 75%, #e9a913);
    box-shadow: inset 0 1px 0 #fff3b6, 0 9px 25px rgba(255, 192, 27, .1);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.brand-name {
    margin-top: 9px;
    color: #ffcf46;
    background: linear-gradient(180deg, #ffe478, #f2b923);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(22px, 6.5vw, 29px);
    font-weight: 800;
    letter-spacing: .035em;
    line-height: 1.15;
    white-space: nowrap;
}

.login-card {
    margin-top: 20px;
    padding: 18px 16px 19px;
    border: 1.5px solid #f9c63c;
    border-radius: 19px;
    background: linear-gradient(140deg, rgba(29, 39, 60, .82), rgba(11, 18, 32, .94) 65%);
    box-shadow: 0 0 25px rgba(239, 187, 43, .07), inset 0 1px 0 rgba(255, 229, 128, .14);
}

.card-heading { margin-bottom: 15px; text-align: center; }

.card-heading h1 {
    margin: 0;
    color: #ffce4a;
    background: linear-gradient(180deg, #ffe37e 12%, #eeb421 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(27px, 7vw, 34px);
    font-weight: 800;
    line-height: 1.18;
}

.card-heading p {
    margin: 3px 0 0;
    color: #aab7cc;
    font-size: 14px;
    line-height: 1.4;
}

.alert {
    margin-bottom: 12px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 196, 70, .55);
    border-radius: 9px;
    color: #ffe7b0;
    background: rgba(97, 54, 27, .4);
    font-size: 12px;
    text-align: center;
}

.signup-alert:empty { display: none; }

.quick-account-select {
    width: 100%;
    height: 42px;
    margin-bottom: 12px;
    padding: 0 12px;
    border: 1px solid #566278;
    border-radius: 10px;
    color: #d9e1ee;
    background: #131d2d;
    font-size: 12px;
}

.quick-account-select[hidden] { display: none; }

.field-label {
    display: block;
    margin: 0 0 5px 7px;
    color: #bbc8dc;
    font-size: 12px;
    font-weight: 500;
}

.login-field {
    height: 43px;
    margin-bottom: 13px;
    display: flex;
    align-items: center;
    border: 1px solid #586479;
    border-radius: 11px;
    background: rgba(13, 21, 35, .63);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.login-field:focus-within, .quick-account-select:focus-visible {
    border-color: #ffd34c;
    outline: 2px solid rgba(255, 211, 76, .2);
    outline-offset: 1px;
}

.login-field > i {
    width: 43px;
    height: 25px;
    flex: 0 0 43px;
    display: grid;
    place-items: center;
    border-right: 1px solid #6a7890;
    color: #ffcf3e;
    font-size: 18px;
}

.login-field input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 11px;
    border: 0;
    outline: 0;
    color: #f7f8fd;
    background: transparent;
    font-size: 14px;
}

.login-field input::placeholder { color: #8794a9; opacity: 1; }

.password-toggle {
    width: 42px;
    height: 41px;
    flex: 0 0 42px;
    border: 0;
    border-radius: 9px;
    color: #bdd0e8;
    background: transparent;
    cursor: pointer;
    font-size: 17px;
}

.password-toggle:focus-visible, .remember-me input:focus-visible + span, a:focus-visible, .login-btn:focus-visible {
    outline: 2px solid #ffe078;
    outline-offset: 3px;
}

.login-options {
    min-height: 30px;
    margin: 2px 2px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #bbc8dc;
    font-size: 12px;
}

.remember-me { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; white-space: nowrap; }
.remember-me input { position: absolute; opacity: 0; }
.remember-me span { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid #42df99; border-radius: 4px; }
.remember-me input:checked + span::after { content: "✓"; color: #50f4a7; font-size: 16px; font-weight: 700; line-height: 1; }

.forgot-link, .signup-prompt a { color: #ffd34e; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.forgot-link { white-space: nowrap; }

.login-btn {
    position: relative;
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #ffe27d;
    border-radius: 12px;
    color: #090d18;
    background: linear-gradient(155deg, #ffe371, #ffc42b 67%, #f5b315);
    box-shadow: inset 0 1px 0 rgba(255, 250, 202, .85), 0 9px 22px rgba(245, 177, 21, .14);
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .02em;
}

.login-btn:hover { filter: brightness(1.06); }
.signup-btn { font-size: 16px; }
.login-btn:disabled { cursor: wait; }
.login-btn.btn-loading span, .login-btn.btn-loading i { visibility: hidden; }
.login-btn.btn-loading::after { content: ""; position: absolute; width: 19px; height: 19px; border: 2px solid #111827; border-right-color: transparent; border-radius: 50%; animation: login-spin .7s linear infinite; }
@keyframes login-spin { to { transform: rotate(360deg); } }

.signup-prompt {
    margin: 17px 0 22px;
    color: #bbc8dc;
    font-size: 13px;
    text-align: center;
}

.signup-prompt a { margin-left: 3px; }

.support-link {
    min-height: 55px;
    margin-top: auto;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 1px solid #566278;
    border-radius: 17px;
    color: #ffd04b;
    background: linear-gradient(130deg, rgba(29, 39, 60, .73), rgba(15, 22, 37, .96));
    background-clip: padding-box;
    box-shadow: 0 9px 24px rgba(0, 0, 0, .13);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}


.support-link:hover { border-color: #c0a64c; }
.support-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #179659; border-radius: 50%; color: #52ec9e; background: rgba(9, 111, 61, .34); font-size: 21px; }
.support-divider { width: 1px; height: 27px; background: #687488; }

@media (min-height: 680px) {
    .auth-shell { padding-top: max(48px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
    .brand-mark { width: 59px; height: 59px; font-size: 34px; }
    .brand-name { margin-top: 12px; }
    .login-card { margin-top: 26px; padding: 22px 17px 21px; }
    .card-heading { margin-bottom: 20px; }
    .login-field { height: 48px; margin-bottom: 17px; }
    .login-options { margin-bottom: 20px; }
    .login-btn { min-height: 52px; }
    .signup-prompt { margin-top: 22px; }
    .support-link { min-height: 61px; }
}

@media (max-width: 360px) {
    .auth-shell { padding-right: 13px; padding-left: 13px; }
    .login-card { padding-right: 13px; padding-left: 13px; }
    .login-options { font-size: 11px; }
    .signup-prompt { font-size: 12px; }
}
