:root {
    color-scheme: dark;
    --gold: #dfc17e;
    --text: #f3f0e7;
    --muted: #a9b3af;
    --border: rgba(211, 220, 211, 0.15);
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: #071412;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: #071412 url("../../images/index/loginbg.png") center center / cover no-repeat fixed;
}
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}
button:disabled { cursor: wait; }
[hidden] { display: none !important; }
svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 40px;
    gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 46px;
    border: 1px solid rgba(223, 193, 126, 0.6);
    box-shadow: inset 0 0 0 4px #071412, inset 0 0 0 5px rgba(223, 193, 126, 0.2);
    background: rgba(7, 20, 18, 0.75);
    color: var(--gold);
    font: 19px Georgia, "Times New Roman", serif;
    letter-spacing: -2px;
    padding-right: 2px;
}
.brand-name { font-size: 12px; font-weight: 600; letter-spacing: 2.2px; text-transform: uppercase; }
.brand-name span { display: block; margin-top: 6px; font-size: 9px; letter-spacing: 2.1px; color: var(--muted); }
.header-caption { font: italic 14px Georgia, "Times New Roman", serif; color: #c6ccbf; }

.auth-layout {
    width: 50%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 26px 32px 38px;
}
.login-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 34px;
    border: 1px solid rgba(223, 193, 126, 0.24);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(15, 28, 25, 0.95), rgba(5, 14, 13, 0.96));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 239, 187, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: card-arrive 550ms ease-out both;
}
.login-container::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 18%;
    right: 18%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.card-eyebrow { display: flex; align-items: center; gap: 10px; color: var(--gold); font-size: 9px; font-weight: 600; letter-spacing: 2.1px; text-transform: uppercase; }
.eyebrow-line { width: 25px; height: 1px; background: var(--gold); opacity: 0.65; }
.eyebrow-diamond { width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); margin-left: auto; opacity: 0.7; }
.auth-heading { margin: 22px 0 25px; }
.auth-title { font: 38px/1.15 Georgia, "Times New Roman", serif; letter-spacing: -1.1px; margin: 0 0 11px; }
.auth-description { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 0; max-width: 310px; }
.form-tabs { display: flex; padding: 4px; border-radius: 9px; border: 1px solid var(--border); background: rgba(0, 0, 0, 0.18); margin-bottom: 25px; }
.form-tab {
    flex: 1;
    padding: 10px 5px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    transition: color 180ms, background 180ms;
}
.form-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.form-tab.active { color: var(--gold); border-color: rgba(223, 193, 126, 0.16); background: rgba(223, 193, 126, 0.09); box-shadow: 0 2px 7px rgba(0, 0, 0, 0.15); }
.form-tab:disabled, .form-switch:disabled { opacity: 0.55; }
.form-section.active { animation: form-arrive 220ms ease-out; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 9px; color: #dce2db; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.label-row .text-link { font-size: 11px; }
.input-wrap { position: relative; }
.input-icon { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); color: #869a90; width: 18px; height: 18px; pointer-events: none; transition: color 180ms; }
.textbox {
    display: block;
    width: 100%;
    min-width: 0;
    height: 50px;
    border: 1px solid rgba(205, 219, 206, 0.18);
    border-radius: 8px;
    padding: 0 15px 0 44px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.19);
    font-size: 14px;
    transition: border-color 180ms, box-shadow 180ms, background 180ms;
}
.textbox::placeholder { color: #7f9189; opacity: 1; }
.textbox:hover { border-color: rgba(223, 193, 126, 0.4); }
.textbox:focus { outline: none; border-color: #caae71; background: rgba(19, 34, 28, 0.65); box-shadow: 0 0 0 3px rgba(223, 193, 126, 0.1); }
.input-wrap:focus-within .input-icon { color: var(--gold); }
.textbox[aria-invalid="true"] { border-color: #d78c83; }
.textbox:-webkit-autofill, .textbox:-webkit-autofill:hover, .textbox:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px #14211d inset;
    caret-color: var(--text);
}
.has-toggle .textbox { padding-right: 82px; }
.password-toggle { position: absolute; right: 5px; top: 5px; height: 40px; min-width: 68px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 5px; background: transparent; color: #a3b0a8; font-size: 10px; }
.password-toggle svg { width: 16px; height: 16px; }
.password-toggle:hover, .password-toggle[aria-pressed="true"] { color: var(--gold); background: rgba(223, 193, 126, 0.06); }
.text-link { border: 0; background: transparent; padding: 0; color: var(--gold); font-size: inherit; line-height: inherit; font-weight: 500; }
.text-link:hover { color: #f5da9f; text-decoration: underline; text-underline-offset: 3px; }
.remember-choice { margin: -4px 0 18px; }
.remember-label { display: flex; align-items: center; gap: 10px; min-height: 32px; color: #dce2db; font-size: 12px; font-weight: 500; cursor: pointer; }
.remember-label input { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--gold); cursor: pointer; }
.remember-label input:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.remember-choice .field-hint { margin: 2px 0 0 28px; }
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    padding: 13px 18px;
    margin-top: 7px;
    border: 1px solid #e1c27c;
    border-radius: 8px;
    background: linear-gradient(110deg, #e2c683, #c9a45a);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    color: #182016;
    font-size: 13px;
    font-weight: 700;
    transition: filter 180ms, box-shadow 180ms, transform 180ms;
}
.button-arrow { width: 17px; height: 17px; transition: transform 180ms; }
.login-btn:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 5px 20px rgba(205, 166, 89, 0.16); transform: translateY(-1px); }
.login-btn:hover:not(:disabled) .button-arrow { transform: translateX(3px); }
.login-btn:disabled { opacity: 0.75; }
.login-btn.is-loading .button-arrow { display: none; }
.login-btn.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid rgba(24, 32, 22, 0.25); border-top-color: #182016; border-radius: 50%; animation: spin 750ms linear infinite; }
.form-bottom { font-size: 12px; line-height: 1.7; color: var(--muted); text-align: center; margin: 21px 0 0; }
.card-footer { display: flex; justify-content: center; align-items: center; gap: 9px; border-top: 1px solid var(--border); margin-top: 25px; padding-top: 20px; color: #95a59b; font-size: 9px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; }
.card-footer span { color: var(--gold); font-size: 14px; }
.auth-caption { margin: 0; font: italic 13px/1.5 Georgia, "Times New Roman", serif; color: #bcc3b6; text-align: center; text-shadow: 0 1px 6px #000; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 19px 40px 24px; font-size: 10px; color: #a4b1a8; letter-spacing: 0.3px; }
.footer-note { color: #aeb6aa; }

.form-message { font-size: 12px; line-height: 1.65; padding: 12px 14px; margin-bottom: 22px; border: 1px solid; border-radius: 8px; overflow-wrap: anywhere; }
.form-message[data-type="error"] { color: #f2b7ae; background: rgba(186, 77, 66, 0.1); border-color: rgba(228, 132, 120, 0.3); }
.form-message[data-type="success"] { color: #b3dec1; background: rgba(77, 147, 101, 0.12); border-color: rgba(148, 198, 158, 0.3); }
.form-message[data-type="info"] { color: #e6cea0; background: rgba(184, 150, 77, 0.09); border-color: rgba(223, 193, 126, 0.25); }
.field-hint { color: #a2afa6; font-size: 10px; line-height: 1.6; margin: 8px 0 0; }
.password-strength-track { height: 3px; background: rgba(208, 225, 208, 0.12); margin-top: 12px; overflow: hidden; border-radius: 3px; }
.password-strength-bar { display: block; width: 0; height: 100%; background: var(--gold); transition: width 200ms, background 200ms; }
.password-strength-bar[data-strength="weak"] { background: #d78c83; }
.password-strength-bar[data-strength="complete"] { background: #9bc3a6; }
.password-requirements { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; padding: 0; list-style: none; margin: 11px 0 0; font-size: 10px; color: #a2afa6; }
.password-requirements li { display: flex; align-items: center; gap: 6px; }
.password-requirements li::before { content: ""; width: 4px; height: 4px; border: 1px solid currentColor; border-radius: 50%; flex-shrink: 0; }
.password-requirements li.is-met { color: #b3dec1; }
.password-requirements li.is-met::before { background: currentColor; }
.confirmation-hint:empty { display: none; }
.confirmation-hint[data-type="error"] { color: #f2b7ae; }
.confirmation-hint[data-type="success"] { color: #b3dec1; }
.recovery-notice { padding: 5px 0 24px; }
.recovery-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; border: 1px solid rgba(223, 193, 126, 0.2); background: rgba(223, 193, 126, 0.06); color: var(--gold); margin-bottom: 20px; }
.recovery-icon svg { width: 23px; height: 23px; }
.recovery-notice h2 { font-size: 15px; line-height: 1.5; font-weight: 500; margin: 0 0 10px; }
.recovery-notice p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.85; }
.no-script-nav { display: flex; flex-wrap: wrap; gap: 15px; font-size: 12px; color: var(--gold); margin-bottom: 25px; }

@keyframes card-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes form-arrive { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 1600px) {
    .site-header { padding: 36px 54px; }
    .site-footer { padding-left: 54px; padding-right: 54px; }
}
@media (min-width: 1001px) and (max-height: 850px) {
    .site-header { padding-top: 20px; padding-bottom: 20px; }
    .site-footer { padding-top: 12px; padding-bottom: 12px; }
    .auth-layout { padding-top: 8px; padding-bottom: 16px; gap: 14px; }
    .login-container { padding: 26px 30px; }
    .auth-heading { margin: 14px 0 18px; }
    .auth-title { font-size: 34px; margin-bottom: 8px; }
    .form-tabs { margin-bottom: 20px; }
    .form-tab { padding-top: 8px; padding-bottom: 8px; }
    .form-group { margin-bottom: 16px; }
    .form-group label { margin-bottom: 7px; }
    .textbox, .login-btn { height: 46px; min-height: 46px; }
    .password-toggle { height: 36px; }
    .form-bottom { margin-top: 16px; }
    .card-footer { margin-top: 18px; padding-top: 16px; }
}
@media (max-width: 1000px) {
    body { background-image: url("../../images/index/loginbg-mobile.png"); background-position: center top; background-size: 100% auto; }
    .site-header { padding: 22px 26px; }
    .header-caption { display: none; }
    .auth-layout { width: 100%; justify-content: flex-start; padding: clamp(130px, calc(45vw - 46px), 420px) 24px 35px; }
    .login-container { max-width: 440px; }
    .site-footer { padding: 16px 26px 24px; }
    .footer-note { display: none; }
}
@media (max-width: 480px) {
    .site-header { padding: 19px 22px; }
    .brand-mark { width: 34px; height: 38px; font-size: 16px; }
    .brand-name { font-size: 10px; letter-spacing: 1.8px; }
    .brand-name span { font-size: 8px; letter-spacing: 1.6px; }
    .auth-layout { padding-left: 16px; padding-right: 16px; padding-bottom: 28px; gap: 18px; }
    .login-container { padding: 26px 23px; border-radius: 13px; }
    .auth-heading { margin-top: 20px; }
    .auth-title { font-size: 34px; }
    .auth-description { font-size: 12px; }
    .textbox { font-size: 16px; }
    .form-tab { font-size: 10px; padding: 11px 4px; }
    .form-bottom { font-size: 11px; }
    .card-footer { font-size: 8px; letter-spacing: 1.1px; }
    .site-footer { justify-content: center; text-align: center; }
}
@media (max-width: 360px) {
    .login-container { padding: 24px 18px; }
    .auth-title { font-size: 30px; }
    .label-row { gap: 8px; }
    .label-row .text-link { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
