/* Auth - white centered with minimal employee motif */
:root{
  --bg:#ffffff;
  --card:#ffffff;
  --fg:#0f172a;
  --muted:#6b7280;
  --brand:#e21b2f;
  --shadow:0 12px 28px rgba(0,0,0,.08);
  --border:#e5e7eb;
}

*{box-sizing:border-box}
html,body{height:100%}

body.auth-body{
  margin:0;
  color:var(--fg);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background-color: var(--bg);
  background-image:
    url('bg-employee.svg'),
    radial-gradient(circle at 1px 1px, rgba(15,23,42,.06) 1px, transparent 0);
  background-repeat: repeat, repeat;
  background-size: 220px auto, 20px 20px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:100vh;
  padding:clamp(16px,4vw,32px);
}

.auth-main{
  width:100%;
  max-width:420px;
}

.auth-card{
  background:var(--card);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:clamp(24px,4vw,32px);
  border:1px solid rgba(148,163,184,.16);
}

/* header & brand */

.auth-header .brand{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  flex-direction:column;
  gap:10px;
  margin-bottom:8px;
}

.brand-logo{
  width:60px;
  height:60px;
  border-radius:14px;
  border:2px solid var(--brand);
  background:#fff;
  object-fit:cover;
}

.brand-text h1{
  margin:6px 0 0;
  font-size:clamp(22px,2.6vw,28px);
}

.brand-text p{
  margin:0;
  color:var(--muted);
}

.muted{color:var(--muted)}
.small{font-size:12px}

/* alert */

.alert{
  background:#fef3f2;
  color:#b42318;
  border:1px solid #fecaca;
  padding:10px 12px;
  border-radius:12px;
  margin:10px 0 12px;
  font-size:13px;
}

/* form layout */

.auth-form{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.field{
  display:flex;
  flex-direction:column;
}

/* label */

label{
  display:block;
  margin:6px 0 6px 2px;
  font-weight:600;
  font-size:13px;
}

/* label row password */

.field-label-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

/* prefix & input */

.field-control{position:relative}

.field-prefix{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  font-size:14px;
  color:#9ca3af;
  pointer-events:none;
}

.field-control .input{
  padding-left:32px;
}

.input{
  width:100%;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:#111827;
  font-size:15px;
  outline:none;
  transition:box-shadow .2s, border-color .2s, background-color .2s;
}

.input::placeholder{
  color:#9ca3af;
}

.input:focus{
  box-shadow:0 0 0 4px rgba(226,27,47,.15);
  border-color:rgba(226,27,47,.6);
}

.input-error{
  border-color:#ef4444;
  box-shadow:0 0 0 4px rgba(239,68,68,.15);
}

/* password toggle & hint */

.pw-toggle{
  background:transparent;
  border:none;
  font-size:16px;
  cursor:pointer;
  color:#9ca3af;
  margin-top:0;
  padding:0;
}

.pw-toggle.is-on{
  color:#f97316;
}

.hint{
  font-size:12px;
  color:#b45309;
  margin:6px 0 0 2px;
}

/* buttons */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:none;
  border-radius:12px;
  padding:12px 16px;
  cursor:pointer;
  font-weight:700;
}

.btn-primary{
  background:var(--brand);
  color:#fff;
  width:100%;
  margin-top:12px;
  font-size:16px;
  transition:background-color .18s, box-shadow .18s, transform .1s;
}

.btn-primary:hover{
  background:#c71628;
  box-shadow:0 10px 24px rgba(226,27,47,.35);
  transform:translateY(-1px);
}

.btn-primary:active{
  transform:translateY(0);
  box-shadow:0 4px 10px rgba(0,0,0,.18);
}

/* ghost style (popup) */

.btn-ghost{
  background:#fff;
  color:var(--fg);
  border-radius:999px;
  padding:10px 18px;
  border:1px solid #e5e7eb;
  font-size:14px;
}

.btn-ghost:hover{
  background:#f9fafb;
}

/* options (ingat saya + device) */

.options{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:12px;
  font-size:13px;
  gap:8px;
}

.opt{
  display:flex;
  align-items:center;
  gap:8px;
}

.opt input[type="checkbox"]{
  width:14px;
  height:14px;
  border-radius:4px;
  border:1px solid #d1d5db;
  appearance:none;
  background:#fff;
  position:relative;
  cursor:pointer;
}

.opt input[type="checkbox"]:checked{
  background:var(--brand);
  border-color:var(--brand);
}

.opt input[type="checkbox"]:checked::after{
  content:"";
  position:absolute;
  inset:3px 2px 2px 3px;
  border-bottom:2px solid #fff;
  border-right:2px solid #fff;
  transform:rotate(45deg);
}

.opt-badge{
  padding:2px 6px;
  border-radius:999px;
  background:#f3f4f6;
  font-size:11px;
  color:#4b5563;
}

.device{
  white-space:nowrap;
}

/* helper row */

.helper-row{
  margin-top:8px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}

/* link */

.link{
  border:none;
  background:transparent;
  padding:0;
  font-size:13px;
  cursor:pointer;
  color:var(--muted);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:4px;
  transition:color .16s, text-decoration-color .16s, opacity .16s;
}

.link:hover{
  color:var(--brand);
  text-decoration:underline;
  text-underline-offset:3px;
}

.link-muted{
  color:var(--muted);
}

/* footer */

.auth-footer{
  margin-top:14px;
  padding-top:10px;
  border-top:1px solid #f3f4f6;
  text-align:center;
}

/* popup reset password */

.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index:40;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}

.modal-backdrop.show{
  opacity:1;
  pointer-events:auto;
}

.modal-reset{
  width:100%;
  max-width:360px;
  background:#ffffff;
  border-radius:18px;
  box-shadow:0 18px 40px rgba(15,23,42,.25);
  padding:20px 20px 18px;
  position:relative;
}

.modal-header h2{
  margin:0 0 4px;
  font-size:18px;
}

.modal-header p{
  margin:0;
  font-size:13px;
  color:var(--muted);
}

.modal-close{
  position:absolute;
  top:10px;
  right:12px;
  border:none;
  background:transparent;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  color:#9ca3af;
}

.modal-close:hover{
  color:#4b5563;
}

.modal-actions{
  margin-top:14px;
  display:flex;
  justify-content:flex-end;
  gap:8px;
}

.modal-actions-center{
  justify-content:center;
}

/* small screens */

@media (max-width:360px){
  .brand-logo{
    width:50px;
    height:50px;
  }
  .options{
    flex-direction:column;
    align-items:flex-start;
  }
  .device{
    margin-top:2px;
  }
}
