/* ============================================================
   Web Asa - Login page
   ============================================================ */
.auth-body {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg);
    overflow: hidden;
}

/* ---------- Left brand panel ---------- */
.auth-aside {
    position: relative;
    background: linear-gradient(150deg, var(--navy-900), var(--navy));
    color: #fff;
    padding: 54px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.auth-aside::before {
    content: "";
    position: absolute; width: 460px; height: 460px; border-radius: 50%;
    background: radial-gradient(circle, var(--brand-glow), transparent 62%);
    top: -140px; inset-inline-start: -120px;
    animation: breathe 7s ease-in-out infinite;
}
.auth-aside::after {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at 30% 40%, #000, transparent 72%);
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; }
.auth-brand img { width: 46px; height: 46px; }
.auth-aside-visual { display: grid; place-items: center; flex: 1; }
.auth-aside-visual img { max-width: 300px; filter: drop-shadow(0 30px 50px rgba(0,0,0,.45)); animation: floaty 6s ease-in-out infinite; }
.auth-aside-copy h2 { font-size: 27px; font-weight: 800; line-height: 1.5; }
.auth-aside-copy p { color: rgba(255,255,255,.68); margin-top: 12px; font-size: 15px; }
.auth-points { display: flex; gap: 20px; margin-top: 22px; flex-wrap: wrap; }
.auth-points span { display: flex; align-items: center; gap: 7px; font-size: 13px; color: rgba(255,255,255,.85); }
.auth-points svg { width: 17px; height: 17px; color: var(--brand); }

/* ---------- Right form ---------- */
.auth-main { display: grid; place-items: center; padding: 40px 24px; position: relative; }
.auth-card {
    width: 100%; max-width: 420px;
    animation: cardIn .7s var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.auth-card .back-home { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 26px; transition: color .3s; }
.auth-card .back-home:hover { color: var(--brand); }
.auth-card h1 { font-size: 26px; font-weight: 800; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-top: 6px; margin-bottom: 26px; }

/* Tabs */
.auth-tabs { display: flex; background: #eef1f6; border-radius: 14px; padding: 5px; margin-bottom: 24px; position: relative; }
.auth-tabs button { flex: 1; padding: 11px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--muted); z-index: 1; transition: color .35s; }
.auth-tabs button.active { color: var(--brand); }
/* Sliding pill. RTL: default sits on the right (first tab). */
.auth-tabs .tab-pill {
    position: absolute;
    top: 5px;
    bottom: 5px;
    right: 5px;
    left: auto;
    width: calc(50% - 5px);
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform .4s var(--ease);
    z-index: 0;
}
/* When the OTP tab is active, slide the pill to the left half. */
.auth-tabs[data-active="otp"] .tab-pill { transform: translateX(-100%); }

/* LTR fallback (project is RTL, but keep it correct if dir changes). */
html[dir="ltr"] .auth-tabs .tab-pill { right: auto; left: 5px; }
html[dir="ltr"] .auth-tabs[data-active="otp"] .tab-pill { transform: translateX(100%); }

/* Floating-label inputs */
/* ---------- Clean inputs (label on top, icon inside) ---------- */
.field { margin-bottom: 18px; }
.field > label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #3a4658;
    margin-bottom: 8px;
    padding-inline-start: 2px;
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .fi {
    position: absolute;
    inset-inline-start: 15px;
    width: 19px; height: 19px;
    color: #9aa4b4;
    pointer-events: none;
    transition: color .2s var(--ease);
}
.input-wrap input {
    width: 100%;
    height: 52px;
    padding-inline-start: 46px;
    padding-inline-end: 16px;
    border: 1.6px solid var(--line);
    border-radius: 13px;
    background: #f6f7fb;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--ink);
    outline: none;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.input-wrap input::placeholder { color: #aab2c0; font-size: 13.5px; letter-spacing: .5px; }
.input-wrap input:hover { border-color: #d3dae6; }
.input-wrap input:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px var(--brand-soft);
}
.input-wrap:focus-within .fi { color: var(--brand); }
/* password field leaves room for the eye toggle */
.input-wrap:has(.toggle-pass) input { padding-inline-end: 46px; }
.input-wrap .toggle-pass {
    position: absolute;
    inset-inline-end: 10px;
    width: 32px; height: 32px;
    display: grid; place-items: center;
    color: #9aa4b4;
    border-radius: 9px;
    transition: background .2s, color .2s;
}
.input-wrap .toggle-pass:hover { background: #eceff4; color: var(--brand); }
.input-wrap .toggle-pass svg { width: 19px; height: 19px; }

/* Keep autofilled inputs consistent with the design. */
.input-wrap input:-webkit-autofill,
.input-wrap input:-webkit-autofill:hover,
.input-wrap input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 60px #f6f7fb inset;
    caret-color: var(--ink);
}

.auth-form-actions { margin-top: 6px; }
.form-note { text-align: center; font-size: 13px; color: var(--muted); margin-top: 20px; }
.form-note a { color: var(--brand); font-weight: 700; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 9px; animation: cardIn .4s var(--ease) both; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.alert-error { background: #fdecef; color: #c01d3f; }
.alert-success { background: #e7f8ef; color: #1c8a52; }
.alert-info { background: #eaf1ff; color: #2a5bd7; }

/* OTP code inputs */
.otp-inputs { display: flex; gap: 10px; direction: ltr; justify-content: center; margin-bottom: 18px; }
.otp-inputs input {
    width: 52px; height: 60px; text-align: center;
    font-size: 24px; font-weight: 800;
    border: 1.6px solid var(--line); border-radius: 13px;
    outline: none; transition: border-color .25s, box-shadow .25s, transform .2s;
}
.otp-inputs input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); transform: translateY(-2px); }
.otp-inputs input.filled { border-color: var(--brand); }

.otp-meta { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.otp-meta .resend { color: var(--brand); font-weight: 700; }
.otp-meta .resend[disabled] { color: var(--muted); cursor: default; }
.otp-phone-label { font-weight: 700; color: var(--ink); direction: ltr; display: inline-block; }
.otp-edit { color: var(--brand); font-weight: 700; font-size: 12.5px; margin-inline-start: 6px; }

.hidden { display: none !important; }

.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::before {
    content: ""; position: absolute; width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,.5); border-top-color: #fff;
    border-radius: 50%; animation: spin .7s linear infinite;
    top: 50%; left: 50%; margin: -10px 0 0 -10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.dev-hint { background:#fff8e6; color:#8a6d1c; border:1px dashed #e6c760; border-radius:10px; padding:8px 12px; font-size:12.5px; text-align:center; margin-bottom:14px; }

@media (max-width: 900px) {
    .auth-body { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
}
