*, *::before, *::after {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif !important;
    margin: 0; padding: 0;
}

/* ═══ Light (default) ═══ */
:root {
    --brand:       #F97316;
    --brand-dark:  #EA580C;
    --brand-25:    #FFF7ED;
    --surface:     #FFFFFF;
    --border:      #E2E3E7;
    --text:        #18181B;
    --text-muted:  #6B7280;
    --text-dim:    #A1A1AA;
}

/* ═══ Dark (opt-in) ═══ */
:root[data-theme="dark"] {
    --brand:       #F97316;
    --brand-dark:  #EA580C;
    --brand-25:    #2A1D12;
    --surface:     #161616;
    --border:      #2C2C2C;
    --text:        #F0F0F0;
    --text-muted:  #909090;
    --text-dim:    #4C4C4C;
}

html, body { height: 100%; }
body {
    display: flex;
    min-height: 100vh;
    background: var(--surface);
    color: var(--text);
}

/* ── Left: form ── */
.login-side {
    width: 100%;
    max-width: 460px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 64px;
    animation: login-in 0.5s ease-out;
    transition: opacity 0.4s ease;
}
.login-side.is-leaving { opacity: 0; }

@keyframes login-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}
.login-brand img { width: 26px; height: 26px; object-fit: contain; }
.login-brand span {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.login-heading { margin-bottom: 28px; }
.login-heading h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}
.login-heading p { font-size: 13.5px; color: var(--text-muted); }

.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
}
.form-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 10px 13px;
    font-size: 13.5px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input::placeholder { color: var(--text-dim); }
.form-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-25);
}

.pw-wrap { position: relative; }
.pw-wrap .form-input { padding-right: 42px; }
.pw-toggle {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-dim);
    cursor: pointer;
    display: flex; align-items: center;
    padding: 2px;
    transition: color 0.15s;
}
.pw-toggle:hover { color: var(--text-muted); }

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 13px;
}
.form-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}
.form-remember input {
    width: 15px; height: 15px;
    accent-color: var(--brand);
    cursor: pointer;
}

.btn-submit {
    width: 100%;
    padding: 11px;
    border-radius: 9px;
    border: none;
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: -0.1px;
    transition: background 0.15s, opacity 0.15s, transform 0.15s;
}
.btn-submit:hover { background: var(--brand-dark); }
.btn-submit:active { transform: scale(0.97); }
.btn-submit.is-loading { opacity: 0.65; cursor: default; }
.btn-submit.is-success { background: #16A34A; opacity: 1; }

.login-note {
    text-align: center;
    margin-top: 24px;
    font-size: 11.5px;
    color: var(--text-dim);
}

/* ── Right: visual panel ── */
.login-visual {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--brand-25) 0%, var(--surface) 60%);
    display: none;
}
.visual-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 25% 20%, rgba(249,115,22,0.16) 0%, transparent 45%),
        radial-gradient(circle at 80% 75%, rgba(234,88,12,0.12) 0%, transparent 50%);
    pointer-events: none;
}
/* Illustration (public/assets/images/login-bg/lelang.svg) — square art with a transparent
   background, so it is centered and scaled to fit rather than stretched edge to edge. */
.visual-art {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 48px;
    animation: login-in 0.6s ease-out;
}
.visual-art img {
    width: min(78%, 560px);
    max-height: 68vh;
    object-fit: contain;
}
.visual-art figcaption { text-align: center; max-width: 420px; }
.visual-art figcaption b {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}
.visual-art figcaption span { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }

/* Error shake */
@keyframes shake {
    0%,100% { transform: translateX(0); }
    20%,60%  { transform: translateX(-6px); }
    40%,80%  { transform: translateX(6px); }
}
.shake { animation: shake 0.4s ease; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (min-width: 900px) {
    .login-visual { display: block; }
}

@media (max-width: 480px) {
    .login-side { padding: 36px 24px; }
}

/* ═══ Alea additions ═══ */
.login-brand img.brand-logo { width: auto; height: 46px; }
:root[data-theme="dark"] .login-brand img.brand-logo { background: #fff; border-radius: 8px; padding: 4px 8px; }

.form-link {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
}
.form-link:hover { color: var(--brand-dark); text-decoration: underline; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
}
.back-link:hover { color: var(--brand); }

.form-alert {
    display: none;
    border-radius: 9px;
    padding: 11px 13px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
    border: 1px solid;
}
.form-alert.is-visible { display: block; }
.form-alert.is-success { background: rgba(22,163,74,0.08); border-color: rgba(22,163,74,0.25); color: #15803D; }
.form-alert.is-error   { background: rgba(220,38,38,0.08); border-color: rgba(220,38,38,0.25); color: #B91C1C; }
:root[data-theme="dark"] .form-alert.is-success { color: #4ADE80; }
:root[data-theme="dark"] .form-alert.is-error   { color: #F87171; }

.form-hint { font-size: 11.5px; color: var(--text-dim); margin-top: 6px; }
