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

:root {
  --bg:        #060c18;
  --surface:   #0d1526;
  --surface2:  #111d33;
  --border:    #1e2d47;
  --border2:   #253552;
  --text:      #e2e8f0;
  --muted:     #64748b;
  --subtle:    #94a3b8;
  --accent:    #22d3ee;
  --accent2:   #0891b2;
  --danger:    #f87171;
  --warn:      #fbbf24;
  --green:     #34d399;
  --radius:    12px;
  --mono:      'JetBrains Mono', monospace;
  --sans:      'DM Sans', sans-serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Backgrounds ── */
.noise {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 180px;
  opacity: .6;
}
.glow-orb {
  pointer-events: none;
  position: fixed; z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .12;
}
.glow-orb.top    { width: 500px; height: 500px; background: #0891b2; top: -180px; left: -100px; }
.glow-orb.bottom { width: 400px; height: 400px; background: #1d4ed8; bottom: -150px; right: -80px; }

/* ── Layout ── */
.layout {
  position: relative; z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 20px 24px;
  gap: 28px;
}

.sidebar-brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -.3px; color: var(--text); }
.brand-name span { color: var(--accent); }
.brand-ver { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 1px; }

.sidebar-stats { display: flex; flex-direction: column; gap: 14px; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.stat-bar { height: 4px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
.stat-fill { height: 100%; background: var(--accent); border-radius: 99px; }
.stat-fill.cpu { background: #818cf8; }
.stat-fill.ram { background: #34d399; }
.stat-val { font-family: var(--mono); font-size: 11px; color: var(--subtle); margin-top: 5px; }

.sidebar-status { display: flex; flex-direction: column; gap: 8px; }
.status-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--subtle); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot.green  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot.yellow { background: var(--warn);  box-shadow: 0 0 6px var(--warn); }
.dot.red    { background: var(--danger);box-shadow: 0 0 6px var(--danger); }

.sidebar-footer { margin-top: auto; font-size: 11px; color: var(--muted); }

/* ── Main ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 24px;
}

/* ── Card ── */
.card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px 28px;
  box-shadow: 0 24px 64px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.03) inset;
}

.card-top { text-align: center; margin-bottom: 28px; }
.card-icon {
  width: 52px; height: 52px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  color: var(--accent);
}
.card-icon svg { width: 26px; height: 26px; }
.card-top h1 { font-size: 19px; font-weight: 600; letter-spacing: -.4px; }
.card-top p  { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── Fields ── */
.field-group { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 12px; font-weight: 500; color: var(--subtle); letter-spacing: .03em; text-transform: uppercase; }

.input-wrap { position: relative; }
.input-wrap .ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
input {
  width: 100%;
  padding: 10px 40px 10px 38px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
input::placeholder { color: var(--muted); }
input:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(34,211,238,.12);
}
input.shake { animation: shake .35s ease; }

#eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 4px;
  display: flex; align-items: center;
  transition: color .15s;
}
#eye:hover { color: var(--subtle); }
#eye svg { width: 16px; height: 16px; }

/* ── Error box ── */
.error-box {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px;
  padding: 10px 12px;
  background: rgba(248,113,113,.08);
  border: 1px solid rgba(248,113,113,.25);
  border-radius: 8px;
  color: var(--danger);
  font-size: 13px;
  animation: fadein .2s ease;
}
.error-box svg { width: 16px; height: 16px; flex-shrink: 0; }
.error-box.hidden { display: none; }

/* ── Button ── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  margin-top: 20px;
  padding: 11px;
  background: var(--accent2);
  color: #fff;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: .01em;
  transition: background .18s, transform .1s, box-shadow .18s;
  box-shadow: 0 4px 16px rgba(8,145,178,.3);
}
.btn:hover  { background: #0e7490; box-shadow: 0 6px 20px rgba(8,145,178,.4); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.spin { animation: rotate .7s linear infinite; }

/* ── Footer note ── */
.foot-note {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.page-foot {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .04em;
  text-align: center;
}

/* ── Utilities ── */
.hidden { display: none !important; }

/* ── Animations ── */
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes rotate  { to { transform: rotate(360deg); } }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .sidebar { display: none; }
  .card { padding: 28px 20px 22px; }
}
