/* ============================================================
   DEPSSTORE — Auth Stylesheet (Login, Register, OTP)
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --navy: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --white: #ffffff;
    --radius: 10px;
    --radius-lg: 24px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--gray-50);
    color: var(--navy);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.auth-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 960px;
    min-height: 560px;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .10);
}

.auth-left {
    background: linear-gradient(160deg, var(--blue-600) 0%, var(--blue-800) 100%);
    color: var(--white);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}

.auth-left-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 3rem;
    text-decoration: none;
    color: inherit;
}

.auth-brand-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .25);
    display: grid; place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}
.auth-brand-icon i { color: #fff; }

.auth-brand-icon img {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .25);
    display: grid; place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}

.auth-brand-text h1 {
    font-size: 15px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
}

.auth-brand-text p {
    font-size: 11px; opacity: .75; font-weight: 500;
}

.auth-left h2 {
    font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -.03em;
    margin-bottom: 1rem; color: var(--white);
}

.auth-left .lead {
    font-size: 14px; opacity: .85; line-height: 1.6; margin-bottom: 2rem; max-width: 340px;
}

/* Tambahan CSS untuk Timer OTP */
.otp-timer-wrap {
    text-align: center;
    margin-bottom: 1.5rem;
    margin-top: -0.5rem;
}
.otp-timer {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0;
}
.otp-timer strong {
    color: var(--blue-600);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 14px;
}
.otp-timer.expired {
    color: #dc2626;
}
.otp-timer.expired strong {
    color: #dc2626;
}

/* PERBAIKAN TOAST: Agar tidak menabrak form di HP */
@media (max-width: 820px) {
    .deps-toast-container {
        top: auto;
        bottom: 1.25rem; /* Pindah ke bawah layar di HP */
        left: 1.25rem;
        right: 1.25rem;
        align-items: center;
    }
    .deps-toast {
        width: 100%;
        max-width: 100%;
        animation: toast-in-bottom .22s cubic-bezier(.4, 0, .2, 1);
    }
    @keyframes toast-in-bottom {
        from { opacity: 0; transform: translateY(24px) scale(.96); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }
}

/* Fitur & Steps (Kiri) */
.auth-features,
.auth-steps {
    list-style: none;
    display: flex; flex-direction: column; gap: .9rem; margin-top: auto;
}

.auth-features li,
.auth-steps li {
    display: flex; align-items: center; gap: .75rem; font-size: 13.5px; opacity: .95;
}

.auth-features li i,
.auth-steps li i {
    width: 32px; height: 32px; border-radius: 8px; background: rgba(255, 255, 255, .15);
    display: grid; place-items: center; font-size: 12px; flex-shrink: 0;
}

.auth-steps li { opacity: .65; }
.auth-steps li.active { opacity: 1; }
.auth-steps li.active i { background: rgba(255, 255, 255, .25); border: 1px solid rgba(255, 255, 255, .3); }
.auth-steps li.done i { background: rgba(34, 197, 94, .25); color: #86efac; }

/* Kanan */
.auth-right {
    padding: 3rem 2.5rem;
    display: flex; flex-direction: column; justify-content: center;
}

.auth-form-inner {
    width: 100%; max-width: 380px; margin: 0 auto;
}

.auth-right h3 {
    font-size: 24px; font-weight: 800; letter-spacing: -.025em; margin-bottom: .35rem; color: var(--navy);
}

.auth-right .sub {
    color: var(--gray-500); font-size: 13.5px; margin-bottom: 2rem;
}

/* Form Elements */
.form-group { margin-bottom: 1.1rem; }

.form-label {
    display: block; font-size: 12.5px; font-weight: 600; margin-bottom: .4rem; color: var(--gray-800);
}

.form-input {
    width: 100%; height: 46px; padding: 0 1rem;
    border: 1.5px solid var(--gray-200); border-radius: var(--radius);
    font-size: 14px; font-family: inherit; color: var(--navy); background: var(--white);
    transition: all .15s; outline: none;
}
.form-input::placeholder { color: var(--gray-400); }
.form-input:hover { border-color: var(--gray-300); }
.form-input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(59, 130, 246, .10); }
.form-input.is-error { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .10); }

/* Email split */
.email-group { display: flex; gap: .5rem; }
.email-group .form-input { flex: 1; }
.email-domain-box {
    display: flex; align-items: center; justify-content: center;
    height: 46px; padding: 0 .875rem;
    border: 1.5px solid var(--gray-200); border-radius: var(--radius);
    background: var(--gray-50); width: 150px; flex-shrink: 0;
    transition: all .15s;
}
.email-domain-box:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(59, 130, 246, .10); }
.email-domain-box input {
    border: none; background: transparent; padding: 0; height: auto; width: 100%;
    text-align: center; font-size: 13.5px; font-weight: 600; color: var(--gray-600); outline: none; font-family: inherit;
}

/* Password toggle */
.input-wrap { position: relative; }
.input-wrap .form-input.has-toggle { padding-right: 3rem; }
.pw-toggle {
    position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: var(--gray-400); cursor: pointer;
    border-radius: 8px; transition: all .15s;
}
.pw-toggle:hover { color: var(--blue-600); background: var(--blue-50); }

/* Password strength */
.pw-strength { display: flex; gap: 4px; margin-top: .5rem; }
.pw-strength-bar { flex: 1; height: 3px; border-radius: 3px; background: var(--gray-200); transition: background .2s; }
.pw-strength-bar.weak { background: #ef4444; }
.pw-strength-bar.medium { background: #f59e0b; }
.pw-strength-bar.strong { background: #22c55e; }
.pw-hint { font-size: 11.5px; color: var(--gray-400); margin-top: .35rem; }
.pw-hint.weak { color: #dc2626; font-weight: 600; }
.pw-hint.medium { color: #d97706; font-weight: 600; }
.pw-hint.strong { color: #16a34a; font-weight: 600; }

/* Row: remember + forgot */
.form-row { display: flex; justify-content: space-between; align-items: center; margin: 1rem 0 1.5rem; font-size: 12.5px; }
.form-check { display: flex; align-items: center; gap: .4rem; color: var(--gray-500); cursor: pointer; }
.form-check input[type="checkbox"] { accent-color: var(--blue-600); width: 16px; height: 16px; cursor: pointer; }
.form-link { color: var(--blue-600); font-weight: 600; text-decoration: none; }
.form-link:hover { text-decoration: underline; }

/* Submit Button (Login/Register) */
.btn-submit {
    width: 100%; height: 46px; border: none; border-radius: var(--radius);
    background: var(--blue-600); color: var(--white); font-size: 14px; font-weight: 700;
    font-family: inherit; cursor: pointer; transition: all .15s;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.btn-submit:hover { background: var(--blue-700); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, .30); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* Spinner */
.spinner { width: 17px; height: 17px; border: 2.5px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.auth-foot { text-align: center; font-size: 12.5px; color: var(--gray-500); margin-top: 1.75rem; }
.auth-foot a { color: var(--blue-600); font-weight: 700; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* ============================================================
   KHUSUS HALAMAN VERIFIKASI OTP
   ============================================================ */

.otp-hero { text-align: center; margin-bottom: 1.5rem; }

.otp-hero-icon {
    width: 72px; height: 72px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    display: inline-grid; place-items: center;
    font-size: 28px;
    border: 1px solid #bfdbfe;
    box-shadow: 0 8px 24px rgba(37, 99, 235, .15);
    position: relative;
}

.otp-hero-icon::after {
    content: '';
    position: absolute; inset: -6px;
    border-radius: 26px;
    border: 1.5px dashed rgba(37, 99, 235, .25);
    animation: pulse-ring 2.5s ease-out infinite;
}

.otp-hero-icon i {
    font-size: 28px !important;
    width: auto; height: auto;
}

@keyframes pulse-ring { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(1.15); opacity: 0; } }

.auth-right h3 { text-align: center; }
.auth-right .sub { text-align: center; margin-bottom: 1rem; }

.otp-email {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .5rem .875rem;
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 100px;
    font-size: 13px; font-weight: 700; color: #1d4ed8;
    margin: 0 auto 1.75rem;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.otp-email i { font-size: 11px; flex-shrink: 0; }
.otp-email-wrap { text-align: center; margin-bottom: 1.75rem; }

.otp-container { display: flex; gap: .625rem; justify-content: center; margin-bottom: 1.75rem; }

.otp-input {
    width: 54px; height: 62px;
    text-align: center; font-size: 24px; font-weight: 700;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    border: 2px solid var(--gray-200); border-radius: 12px;
    background: #fff; color: var(--navy); outline: none;
    transition: all 180ms cubic-bezier(.4, 0, .2, 1);
    caret-color: #2563eb;
}
.otp-input:hover { border-color: var(--gray-300); }
.otp-input:focus { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); transform: translateY(-2px); }
.otp-input.filled { border-color: #2563eb; background: #eff6ff; }
.otp-input.is-error { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .12); animation: shake .4s ease; }

@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

.btn-verify {
    width: 100%; height: 48px; border: none; border-radius: 10px;
    background: #2563eb; color: #fff; font-size: 14px; font-weight: 700;
    font-family: inherit; cursor: pointer; transition: all .15s;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.btn-verify:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37, 99, 235, .3); }
.btn-verify:active { transform: translateY(0); }
.btn-verify:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

.otp-resend { text-align: center; margin-top: 1.5rem; font-size: 13px; color: var(--gray-500); }
.otp-resend button { background: none; border: none; color: #2563eb; font-weight: 700; font-family: inherit; font-size: 13px; cursor: pointer; padding: 0; transition: color .15s; }
.otp-resend button:hover { color: #1d4ed8; text-decoration: underline; }
.otp-resend button:disabled { color: var(--gray-400); cursor: not-allowed; text-decoration: none; }

.otp-back { text-align: center; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--gray-100); font-size: 12.5px; color: var(--gray-500); }
.otp-back a { color: #2563eb; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.otp-back a:hover { text-decoration: underline; }

/* ============================================================
   TOAST (DIPERBARUI ANTI-BENTROK)
   ============================================================ */
.deps-toast-container {
    position: fixed; 
    top: 1.5rem; 
    left: 50%;
    transform: translateX(-50%); /* Posisi di tengah atas */
    z-index: 99999;
    display: flex; flex-direction: column; align-items: center; gap: .5rem; pointer-events: none;
}
.deps-toast {
    background: var(--white); border: 1px solid var(--gray-200); border-left: 4px solid var(--blue-600);
    border-radius: var(--radius); padding: .875rem 1.125rem; box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
    min-width: 260px; max-width: 360px; font-size: 13px; color: var(--navy); pointer-events: auto;
    animation: toast-in-top .22s cubic-bezier(.4, 0, .2, 1); display: flex; align-items: center; gap: .6rem; font-weight: 500;
}
.deps-toast.toast-success { border-left-color: #16a34a; }
.deps-toast.toast-error { border-left-color: #dc2626; }
.deps-toast.toast-warning { border-left-color: #d97706; }
.deps-toast i { font-size: 15px; flex-shrink: 0; }
.deps-toast.toast-success i { color: #16a34a; }
.deps-toast.toast-error i { color: #dc2626; }
.deps-toast.toast-warning i { color: #d97706; }

@keyframes toast-in-top { 
    from { opacity: 0; transform: translateY(-20px) scale(.96); } 
    to { opacity: 1; transform: translateY(0) scale(1); } 
}
/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
    body { align-items: flex-start; }
    .auth-wrap { grid-template-columns: 1fr; max-width: 440px; }
    .auth-left { padding: 2rem 1.75rem; }
    .auth-left h2 { font-size: 20px; }
    .auth-left .lead { font-size: 13px; margin-bottom: 1rem; }
    .auth-features, .auth-steps { display: none; }
    .auth-right { padding: 2rem 1.75rem; }
    .otp-input { width: 48px; height: 56px; font-size: 21px; }
    .otp-container { gap: .5rem; }
}

@media (max-width: 480px) {
    body { padding: 1rem; }
    .email-domain-box { width: 120px; padding: 0 .5rem; }
    .email-domain-box input { font-size: 12.5px; }
    .otp-input { width: 42px; height: 50px; font-size: 18px; border-radius: 10px; }
    .otp-container { gap: 5px; }
    .otp-hero-icon { width: 60px; height: 60px; font-size: 24px; }
}

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