/* Login page — Diginew ERP */
:root { --pr-600:#4f46e5; --pr-700:#4338ca; --ink:#0f172a; --muted:#64748b; --line:#e2e8f0; }
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }

.auth-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }

/* ---- Brand panel ---- */
.auth-aside { position: relative; overflow: hidden; color: #fff; display: flex; align-items: center; padding: 3rem 4rem;
  background: radial-gradient(1200px 600px at 0% 0%, #6366f1 0%, transparent 60%), linear-gradient(145deg, #0b1b33 0%, #1e1b4b 45%, #4338ca 100%); }
.aside-inner { position: relative; z-index: 2; max-width: 520px; }
.aside-logo { display: flex; align-items: center; gap: .75rem; font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; margin-bottom: 3rem; }
.aside-logo img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
.auth-aside h1 { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 800; line-height: 1.12; letter-spacing: -.03em; margin: 0 0 1rem; color: #fff; }
.aside-lead { color: rgba(255,255,255,.78); font-size: 1.05rem; line-height: 1.6; margin: 0 0 2.25rem; }
.aside-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.aside-points li { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(6px); }
.aside-points i { font-size: 1.25rem; width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; flex: none; }
.aside-points strong { display: block; font-size: .95rem; font-weight: 650; }
.aside-points span { display: block; font-size: .84rem; color: rgba(255,255,255,.7); margin-top: 2px; }
.aside-foot { margin-top: 2.5rem; font-size: .8rem; color: rgba(255,255,255,.55); }
.orb { position: absolute; border-radius: 50%; z-index: 1; }
.orb-1 { width: 420px; height: 420px; right: -140px; bottom: -160px; background: radial-gradient(circle at 30% 30%, rgba(129,140,248,.55), rgba(99,102,241,0) 70%); }
.orb-2 { width: 260px; height: 260px; right: 18%; top: -90px; background: radial-gradient(circle at 30% 30%, rgba(56,189,248,.35), rgba(56,189,248,0) 70%); }

/* ---- Form panel ---- */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; background: #f8fafc; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 2.4rem 2.2rem; box-shadow: 0 20px 50px rgba(15,23,42,.08); }
.auth-mobile-brand { display: none; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.2rem; margin-bottom: 1.5rem; }
.auth-mobile-brand img { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; }
.auth-card h2 { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.auth-sub { color: var(--muted); margin: .35rem 0 1.6rem; font-size: .93rem; }

.alert { border-radius: 12px; font-size: .88rem; padding: .75rem 1rem; border: 1px solid transparent; }
.alert-danger { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }

.field-label { display: block; font-size: .8rem; font-weight: 600; color: #334155; margin: 1rem 0 .4rem; }
.field { position: relative; }
.field > i.bi { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 1.05rem; pointer-events: none; }
.field input { width: 100%; height: 48px; border: 1px solid #d5dbe7; border-radius: 12px; padding: 0 44px 0 42px; font: inherit; font-size: .95rem; color: var(--ink); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: #a0aec0; }
.field input:focus { border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,.16); }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; width: 36px; height: 36px; border-radius: 8px; color: #94a3b8; cursor: pointer; }
.password-toggle:hover { color: var(--pr-600); background: #f1f5f9; }
.was-validated .field input:invalid { border-color: #e11d48; }

.btn-submit { width: 100%; height: 50px; margin-top: 1.5rem; border: 0; border-radius: 12px; font: inherit; font-weight: 650; font-size: 1rem; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #4f46e5, #6d28d9); box-shadow: 0 10px 22px rgba(79,70,229,.32); display: flex; align-items: center; justify-content: center; gap: .6rem; transition: transform .15s, box-shadow .15s, opacity .15s; }
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(79,70,229,.4); }
.btn-submit.loading { opacity: .85; pointer-events: none; }
.spinner-border { width: 1rem; height: 1rem; border: .15em solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
.d-none { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-divider { display: flex; align-items: center; gap: .8rem; color: #94a3b8; font-size: .78rem; margin: 1.6rem 0 1rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-ghost { display: flex; align-items: center; justify-content: center; gap: .55rem; height: 46px; border: 1px solid #d5dbe7; border-radius: 12px; color: #334155; font-weight: 600; font-size: .92rem; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
button.btn-ghost, a.btn-ghost { width: 100%; box-sizing: border-box; font-family: inherit; margin: 0 0 .7rem; }
#vToggle { margin-top: 1rem; }
.btn-ghost:hover { background: #eef2ff; border-color: #c7d2fe; color: var(--pr-700); }
.auth-legal { text-align: center; color: #94a3b8; font-size: .75rem; margin: 1.6rem 0 0; }

@media (max-width: 991.98px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 60%); min-height: 100vh; }
  .auth-mobile-brand { display: flex; }
}
@media (max-width: 480px) {
  .auth-main { padding: 1rem; align-items: flex-start; }
  .auth-card { padding: 1.75rem 1.35rem; border-radius: 18px; margin-top: 1rem; }
}

/* ---------- Mobile login: app-style ---------- */
@media (max-width: 991.98px) {
  .auth-main { background: linear-gradient(165deg, #4338ca 0%, #6d28d9 52%, #7c3aed 100%); position: relative; overflow: hidden; align-items: center; padding: 1.25rem 1rem; min-height: 100vh; min-height: 100dvh; }
  .auth-main::before, .auth-main::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.10); pointer-events: none; }
  .auth-main::before { width: 260px; height: 260px; top: -90px; right: -80px; }
  .auth-main::after { width: 200px; height: 200px; bottom: -70px; left: -70px; }
  .auth-card { position: relative; z-index: 1; max-width: 420px; margin: 0 auto; border: 0; border-radius: 26px; padding: 2rem 1.4rem 1.5rem; box-shadow: 0 24px 60px rgba(30,16,90,.35); }
  .auth-mobile-brand { flex-direction: column; justify-content: center; gap: .55rem; margin: -3.4rem auto 1.1rem; font-size: 1.25rem; text-align: center; }
  .auth-mobile-brand img { width: 76px; height: 76px; padding: 8px; background: #fff; border-radius: 22px; box-shadow: 0 10px 26px rgba(30,16,90,.25); }
  .auth-card h2 { text-align: center; font-size: 1.55rem; }
  .auth-sub { text-align: center; margin-bottom: 1.1rem; }
  .field input { height: 52px; font-size: 16px; background: #f8fafc; border-radius: 14px; }
  .field input:focus { background: #fff; }
  .btn-submit { height: 52px; border-radius: 14px; font-size: 1rem; }
  .btn-ghost { height: 48px; font-size: .9rem; }
  .auth-legal { margin-top: 1.1rem; }
}
@media (max-width: 480px) {
  .auth-main { align-items: center; padding: 1.1rem .9rem; }
  .auth-card { margin-top: 3rem; padding: 2rem 1.2rem 1.3rem; }
  .auth-card h2 { font-size: 1.45rem; }
}
