/* ==========================================================================
   DYSHORT — LOGIN PAGE (login.css)
   ========================================================================== */

:root{
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --ease: cubic-bezier(.22,.8,.28,1);
}

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

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

html, body{ height:100%; }
body{
  font-family:var(--font-display);
  background:var(--surface);
  color:var(--body-text);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}

a{ color:inherit; text-decoration:none; -webkit-tap-highlight-color:transparent; }
button{ font:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
img, svg{ display:block; }
.brand-word{ white-space:nowrap; }
:focus-visible{ outline:2px solid var(--primary); outline-offset:3px; border-radius:4px; }

h1,h2{ color:var(--ink); font-weight:800; letter-spacing:-0.01em; }

/* ==========================================================================
   NAV (struktur dasar — warna diatur theme.css)
   ========================================================================== */
.nav{
  position:sticky; top:0; z-index:600; border-bottom:1px solid transparent;
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  transition:border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.nav.is-scrolled{ border-color:var(--border); box-shadow:0 6px 20px -14px rgba(14,26,21,.3); }
.nav-inner{
  max-width:1200px; margin:0 auto; width:100%;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 24px; height:74px;
}
.nav-brand{ display:flex; align-items:center; gap:10px; font-weight:800; font-size:20px; color:var(--ink); flex-shrink:0; }
.nav-brand .brand-mark{ width:34px; height:34px; border-radius:10px; background:var(--ink); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.nav-brand .brand-mark svg{ width:18px; height:18px; color:var(--primary); }
.nav-brand b{ color:var(--primary); font-weight:800; }

/* ==========================================================================
   FOOTER (struktur dasar — warna diatur theme.css)
   ========================================================================== */
.footer-bottom{
  padding:24px; text-align:center; font-size:13px; color:var(--muted);
  border-top:1px solid var(--border);
}
.footer-bottom a{ color:var(--muted); font-weight:600; }
.footer-bottom a:hover{ color:var(--primary); }

/* ==========================================================================
   PAGE SHELL — split screen
   ========================================================================== */
.auth-shell{ min-height:calc(100vh - 74px); display:grid; grid-template-columns:1fr 1fr; }

/* ---- Left: brand panel ---- */
.auth-aside{
  background:#0e1a15; color:#cdd6d0; position:relative; overflow:hidden;
  display:flex; flex-direction:column; justify-content:space-between;
  padding:44px 48px;
}
.auth-aside::before{
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(560px 420px at 15% 15%, rgba(15,122,82,.35), transparent 60%),
    radial-gradient(420px 360px at 90% 85%, rgba(15,122,82,.18), transparent 60%);
  pointer-events:none;
}

.auth-back{ display:inline-flex; align-items:center; gap:8px; font-size:13.5px; font-weight:600; color:#a9b6ae; position:relative; z-index:1; width:fit-content; }
.auth-back:hover{ color:#fff; }
.auth-back svg{ width:15px; height:15px; }

.auth-brand{ display:flex; align-items:center; gap:10px; font-weight:800; font-size:20px; color:#fff; position:relative; z-index:1; }
.auth-brand .brand-mark{ width:34px; height:34px; border-radius:10px; background:rgba(255,255,255,.08); display:flex; align-items:center; justify-content:center; }
.auth-brand .brand-mark svg{ width:18px; height:18px; color:var(--primary); }
.auth-brand b{ color:var(--primary); }

.auth-pitch{ position:relative; z-index:1; max-width:400px; }
.auth-pitch h2{ color:#fff; font-size:clamp(24px,2.6vw,30px); line-height:1.25; margin-bottom:16px; }
.auth-pitch p{ color:#a9b6ae; font-size:15px; line-height:1.7; margin-bottom:28px; }

.auth-points{ display:flex; flex-direction:column; gap:14px; }
.auth-points li{ list-style:none; display:flex; align-items:flex-start; gap:12px; font-size:14px; color:#dbe3de; }
.auth-points svg{ width:18px; height:18px; color:var(--primary); flex-shrink:0; margin-top:1px; }

.auth-mono-line{
  position:relative; z-index:1; font-family:var(--font-mono); font-size:12.5px; color:#7f8c85;
  border-top:1px solid rgba(255,255,255,.1); padding-top:18px;
}

/* ---- Right: form ---- */
.auth-main{ display:flex; align-items:center; justify-content:center; padding:40px 24px; }

/* DIPERBAIKI: Rata tengah untuk wrapper form login */
.login-wrapper{ 
  width:100%; max-width:400px; position:relative; 
  display: flex; flex-direction: column; align-items: center; text-align: center; 
}

/* DIPERBAIKI: Rata tengah pada logo di mode mobile */
.auth-mobile-brand{ 
  display:none; align-items:center; justify-content: center; gap:10px; 
  font-weight:800; font-size:19px; color:var(--ink); margin-bottom:28px; 
}
.auth-mobile-brand .brand-mark{ width:32px; height:32px; border-radius:9px; background:#0e1a15; display:flex; align-items:center; justify-content:center; }
.auth-mobile-brand .brand-mark svg{ width:16px; height:16px; color:var(--primary); }
.auth-mobile-brand b{ color:var(--primary); }

.login-wrapper h1{ font-size:26px; margin-bottom:8px; }
.login-wrapper .subtitle{ color:var(--muted); font-size:14.5px; margin-bottom:30px; }

/* DIPERBAIKI: Label tetap di sebelah kiri agar mudah dibaca */
.formGroup{ margin-bottom:18px; text-align:left; width: 100%; }
.label{ display:block; margin-bottom:7px; color:var(--ink); font-size:12.5px; font-weight:700; letter-spacing:.03em; }

.input-container{ position:relative; display:flex; align-items:center; }
.input{
  width:100%; height:46px; background:var(--surface); border:1.5px solid var(--border);
  outline:none; color:var(--ink); border-radius:var(--radius-sm); padding:0 14px; font-size:14.5px;
  transition:border-color .18s, box-shadow .18s;
}
.input::placeholder{ color:#9aa39c; }
.input:focus{ border-color:var(--primary); box-shadow:0 0 0 4px var(--primary-tint); }

/* DIPERBAIKI: Batasan kotak klik (bundar) agar efek fokus tidak melebihi ikon */
.toggle-password{
  position:absolute; right:8px; background:transparent; border:none;
  width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  color:var(--muted); transition:color .18s, background .18s; overflow:hidden;
}
.toggle-password:hover{ color:var(--ink); background: var(--surface-alt); }
.toggle-password:focus-visible{ outline: 2px solid var(--primary); }
.toggle-password svg{ width:18px; height:18px; }

.forgot-link{ display:block; text-align:right; margin-top:8px; color:var(--primary); font-size:13px; font-weight:700; }
.forgot-link:hover{ text-decoration:underline; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  height:46px; padding:0 20px; border-radius:var(--radius-sm); font-weight:700; font-size:14.5px;
  border:1.5px solid transparent; width:100%; transition:transform .16s, box-shadow .16s, background .16s, border-color .16s;
}
.btn:active{ transform:scale(.98); }
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(.22,.8,.28,1), 
              box-shadow 0.25s cubic-bezier(.22,.8,.28,1), 
              background 0.25s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -10px rgba(15,122,82,.7);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

/* Status Loading dengan Teks */
.btn-primary.is-loading {pointer-events: none;opacity: 0.85;display: inline-flex;
align-items: center;justify-content:center;gap: 10px;}

.btn-primary.is-loading::after {
  content: "";width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff; border-radius: 50%;animation: button-loading-spinner 0.6s linear infinite;
}

@keyframes button-loading-spinner {
  to {
    transform: rotate(360deg);
  }
}
.btn-secondary{ background:var(--surface); color:var(--ink); border-color:var(--border-strong); }
.btn-secondary:hover{ border-color:var(--ink); }
.btn-secondary img{ width:18px; height:18px; margin-right:6px; }

.divider{ width: 100%; display:flex; align-items:center; gap:14px; margin:22px 0; color:var(--muted); font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.divider::before, .divider::after{ content:""; flex:1; height:1px; background:var(--border); }

.register{ margin-top:26px; text-align:center; color:var(--muted); font-size:14px; }
.register a{ color:var(--primary); font-weight:700; }
.register a:hover{ text-decoration:underline; }

/* ==========================================================================
   MODALS (Register / 2FA)
   ========================================================================== */
.modal-overlay{
  display:none; position:fixed; inset:0; background:rgba(14,26,21,.55);
  backdrop-filter:blur(4px); z-index:9999; align-items:center; justify-content:center; padding:20px;
}
.modal-content{
  width:100%; max-width:400px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:30px; box-shadow:var(--shadow-lg); position:relative;
}
.modal-content h3{ color:var(--ink); }

#toast{
  position:fixed; left:50%; bottom:28px; transform:translateX(-50%) translateY(20px);
  background:#16211c; color:#fff; padding:12px 20px; border-radius:var(--radius-pill);
  font-size:13.5px; font-weight:600; box-shadow:var(--shadow-lg); z-index:99999;
  opacity:0; pointer-events:none; transition:opacity .25s, transform .25s;
}
#toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
#toast.error{ background:#e5484d; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width:960px){
  .auth-shell{ grid-template-columns:1fr; }
  .auth-aside{ display:none; }
  .auth-mobile-brand{ display:flex; }
  .auth-main{ padding:48px 20px; }
}
@media (max-width:380px){
  .login-wrapper h1{ font-size:23px; }
}