/* ============================================================
   NIGHTSTAND ADMIN — login.css
   Login page layout: split-screen with live system panel.
   ============================================================ */

body.login-body {
  height: 100vh;
  overflow: hidden;
}

/* ── Two-column layout ────────────────────────────────────── */
.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
}

/* ── Left panel ───────────────────────────────────────────── */
.login-panel {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}

/* Radar background */
.panel-radar-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  pointer-events: none;
}
.radar-svg {
  width: 480px;
  height: 480px;
  max-width: 100%;
}
@keyframes pulse {
  0%, 100% { opacity: 0.2; }
  50%       { opacity: 0.8; }
}
.rdot {
  animation: pulse 14s ease-in-out infinite;
}
@keyframes sweep {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}
.rsweep {
  transform-origin: 100px 100px;
  animation: sweep 6s linear infinite;
}

/* Brand block */
.panel-brand {
  position: relative;
  text-align: center;
  margin-bottom: 48px;
}
.panel-brand-name {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.12em;
}
.panel-brand-sub {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 4px;
}

/* Live stats grid */
.panel-stats {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  max-width: 340px;
  margin-bottom: 48px;
}
.panel-stat {
  background: rgba(11,15,20,0.6);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  backdrop-filter: blur(4px);
}
.panel-stat-val {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
  margin-bottom: 5px;
}
.panel-stat-lbl {
  display: block;
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.3;
}

/* Footer status */
.panel-footer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.panel-db-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
  transition: background 0.3s ease;
}
.panel-db-txt {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
}

/* ── Right side (login card) ──────────────────────────────── */
.login-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-card-head {
  margin-bottom: 32px;
}
.login-title {
  font-family: 'DM Mono', monospace;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  margin: 16px 0 4px;
  letter-spacing: -0.01em;
}
.login-sub {
  font-size: 13px;
  color: var(--text-faint);
  margin: 0;
}

/* ── Login form ───────────────────────────────────────────── */
.login-form { display: flex; flex-direction: column; gap: 16px; }

.lf-field   { display: flex; flex-direction: column; gap: 6px; }
.lf-label   { font-size: 12px; font-weight: 500; color: var(--text-dim); }
.lf-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.lf-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.14);
}
.lf-input::placeholder { color: var(--text-faint); }

/* Password wrap with toggle */
.lf-pw-wrap { position: relative; }
.lf-pw-wrap .lf-input { padding-right: 42px; }
.lf-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-faint);
  padding: 0;
  line-height: 0;
}
.lf-pw-toggle:hover { color: var(--text-dim); }

/* Error */
.lf-error {
  font-size: 13px;
  color: var(--red);
  margin: 0;
  padding: 10px 12px;
  background: var(--red-dim);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239,91,91,0.2);
}

/* Submit button */
.lf-btn {
  width: 100%;
  padding: 12px;
  background: var(--blue);
  color: #05101F;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.12s, transform 0.1s;
  margin-top: 4px;
}
.lf-btn:hover   { opacity: 0.92; }
.lf-btn:active  { transform: scale(0.99); }
.lf-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-help {
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  margin: 20px 0 0;
}

/* ── Responsive: stack on mobile ─────────────────────────── */
@media (max-width: 800px) {
  .login-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .login-panel {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 32px 24px;
    flex-direction: row;
    justify-content: space-between;
    gap: 24px;
  }
  .panel-radar-wrap { display: none; }
  .panel-brand      { margin-bottom: 0; text-align: left; }
  .panel-stats      {
    grid-template-columns: repeat(4, auto);
    margin-bottom: 0;
    gap: 10px;
  }
  .panel-stat       { padding: 10px 12px; }
  .panel-stat-val   { font-size: 18px; }
  .panel-footer     { display: none; }
  .login-side       { padding: 32px 24px; align-items: flex-start; }
}

@media (max-width: 560px) {
  .login-panel  { flex-direction: column; padding: 24px; }
  .panel-stats  { grid-template-columns: 1fr 1fr; }
}
