/* =========================================
   Radar Login Styles
   File: /radar/assets/login.css
   Scope: only login view on index.html
   ========================================= */

.login-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  position:relative;
}

.login-card{
  width:100%;
  max-width:420px;
  padding:24px;
  border-radius:16px;
  display:flex;
  flex-direction:column;
  gap:10px;
  box-sizing:border-box;
}

html[data-theme="dark"] .login-card{
  background:linear-gradient(180deg, rgba(13,23,43,.98), rgba(10,18,35,.98));
  border:1px solid rgba(255,255,255,.06);
  box-shadow:0 20px 60px rgba(0,0,0,.45);
}

html[data-theme="light"] .login-card{
  background:#ffffff;
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 20px 40px rgba(15,23,42,.08);
}

.login-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}

.login-brand-badge{
  background:#EEF2FF;
  border-color:#E0E7FF;
  color:#1D4ED8;
}

.login-title{
  margin:0;
  font-size:18px;
  font-weight:700;
  line-height:1.25;
}

.login-sub{
  margin:2px 0 0;
  font-size:13px;
  color:var(--muted);
  line-height:1.4;
}

.login-label{
  font-size:12px;
  color:var(--muted);
  font-weight:750;
}

.login-card .form-row{
  display:flex;
  flex-direction:column;
  gap:6px;
  width:100%;
  box-sizing:border-box;
}

.login-input,
.login-btn-primary,
.login-btn-ghost{
  width:100%;
  box-sizing:border-box;
}

.login-input{
  height:44px;
  padding:0 14px;
  border-radius:12px;
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
  -webkit-appearance:none;
  appearance:none;
  display:block;
}

html[data-theme="dark"] .login-input{
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  color:#F8FAFC;
}

html[data-theme="light"] .login-input{
  background:#F8FAFC;
  border:1px solid rgba(15,23,42,.10);
  color:#0F172A;
}

.login-input::placeholder{
  color:var(--muted);
  opacity:1;
}

.login-input:focus,
.login-input:focus-visible{
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(59,130,246,.22);
  outline:none;
}

html[data-theme="dark"] .login-input:-webkit-autofill,
html[data-theme="dark"] .login-input:-webkit-autofill:hover,
html[data-theme="dark"] .login-input:-webkit-autofill:focus{
  -webkit-text-fill-color:#F8FAFC;
  box-shadow:0 0 0 1000px rgba(17,24,39,1) inset;
  transition:background-color 9999s ease-in-out 0s;
  caret-color:#F8FAFC;
}

html[data-theme="light"] .login-input:-webkit-autofill,
html[data-theme="light"] .login-input:-webkit-autofill:hover,
html[data-theme="light"] .login-input:-webkit-autofill:focus{
  -webkit-text-fill-color:#0F172A;
  box-shadow:0 0 0 1000px #F8FAFC inset;
  transition:background-color 9999s ease-in-out 0s;
  caret-color:#0F172A;
}

.login-check{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:2px;
}

.login-checkbox{
  width:16px;
  height:16px;
  margin:0;
  cursor:pointer;
  accent-color:var(--primary);
  flex:0 0 auto;
}

.login-check-label{
  margin:0;
  font-size:13px;
  color:var(--muted);
  font-weight:650;
  cursor:pointer;
  user-select:none;
}

.login-actions-row{
  width:100%;
  box-sizing:border-box;
}

.login-actions-row--primary{
  margin-top:8px;
}

.login-actions-row--secondary{
  margin-top:4px;
}

.login-btn-primary,
.login-btn-ghost{
  justify-content:center;
  min-height:44px;
  text-decoration:none;
}

.login-btn-ghost{
  opacity:.82;
}

.login-btn-ghost:hover{
  opacity:1;
}

.login-hint{
  margin:4px 0 0;
  font-size:12px;
  line-height:1.45;
  color:var(--muted);
}

.login-theme-toggle{
  position:fixed;
  left:20px;
  bottom:20px;
  width:44px;
  height:44px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:40;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease;
  color:var(--text);
}

html[data-theme="dark"] .login-theme-toggle{
  background:rgba(13,23,43,.92);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 10px 24px rgba(0,0,0,.28);
}

html[data-theme="light"] .login-theme-toggle{
  background:rgba(255,255,255,.96);
  border:1px solid rgba(15,23,42,.10);
  box-shadow:0 10px 24px rgba(15,23,42,.10);
}

.login-theme-toggle:hover{
  transform:translateY(-1px);
}

.login-theme-toggle:focus,
.login-theme-toggle:focus-visible{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(59,130,246,.18);
}

.login-theme-toggle-ico{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:0;
}

@media (max-width: 640px){
  .login-wrap{
    padding:16px;
    align-items:flex-start;
  }

  .login-card{
    margin-top:24px;
    max-width:none;
    padding:20px;
    border-radius:14px;
  }

  .login-theme-toggle{
    left:16px;
    bottom:16px;
  }
}