/* ── Lovelace Auth Styles ── */
:root {
  --accent: #B08A93;
  --accent-dim: rgba(176,138,147,.12);
  --bg: #060608;
  --bg-bar: #0b0d11;
  --bg-card: #0a0a0e;
  --bg-input: #0c0d13;
  --border: #1b1b22;
  --border-dim: #17171e;
  --border-footer: #14141b;
  --text: #c7c7d0;
  --text-bright: #e7e7ec;
  --text-muted: #9a9aa4;
  --text-dim: #6a6a76;
  --text-dimmer: #4a4a55;
  --text-bar: #87949c;
  --text-bar-dim: #5a666d;
  --green: #7fdca4;
  --red: #ff7a8a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: #7C93A6; text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: #7C93A6; color: #08090c; }

/* ── ANIMATIONS ── */
@keyframes lcRise {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@keyframes lcScan {
  from { background-position: 0 0; }
  to { background-position: 0 6px; }
}
@keyframes lcBlink {
  0%,49% { opacity: 1; }
  50%,100% { opacity: 0; }
}

/* ── STATUS BAR ── */
.login-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.status-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-size: 12.5px;
  background: var(--bg-bar);
  border-bottom: 1px solid #191d23;
}
.status-left {
  display: flex;
  align-items: center;
  padding: 0 14px;
}
.status-left a { color: var(--text-bar); }
.status-center {
  padding: 10px 0;
  color: #C9C4BD;
  letter-spacing: .03em;
}
.status-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 14px;
  color: var(--accent);
}
.online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

/* ── CENTERED AREA ── */
.login-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  background: radial-gradient(120% 90% at 50% -10%, #101018 0%, #08080b 55%, #060608 100%);
}
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.014) 0 1px, transparent 1px 3px);
  animation: lcScan 1.2s steps(3) infinite;
}

/* ── CARD ── */
.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 40px 120px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.02) inset;
  animation: lcRise .3s ease both;
}
.card-titlebar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #0c0c11;
  border-bottom: 1px solid var(--border-dim);
}
.card-titletext {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-dim);
  letter-spacing: .02em;
}
.card-body {
  padding: 28px 28px 24px;
}
.card-footer {
  padding: 14px 28px 18px;
  border-top: 1px solid var(--border-footer);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-dimmer);
}
.card-footer .key { color: var(--accent); }

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.tab {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dimmer);
  font-family: inherit;
  font-size: 12.5px;
  padding: 7px 16px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--text); border-color: var(--text-dim); }
.tab.active {
  color: var(--text-bright);
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ── FORM ── */
.field { margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 10.5px;
  color: var(--text-dimmer);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.field-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 9px 12px;
  color: var(--text-bright);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}
.field-input:focus { border-color: var(--accent); }
.field-input::placeholder { color: #3a3a44; }

.error-msg {
  font-size: 12px;
  color: var(--red);
  padding: 8px 0 8px 10px;
  border-left: 2px solid var(--red);
  margin-bottom: 10px;
}

.btn-submit {
  width: 100%;
  background: var(--accent);
  color: #08090c;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px;
  border: none;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-submit:hover { opacity: .9; }
.btn-submit:disabled { opacity: .4; cursor: not-allowed; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #1c1d27; }
::-webkit-scrollbar-track { background: transparent; }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .login-wrap { padding: 32px 16px; }
  .card-body { padding: 22px 20px 20px; }
  .card-footer { padding: 12px 20px 16px; gap: 12px; font-size: 11.5px; }
}
