/* ── Login ── */
#login {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  align-items: center;
  justify-content: center
}

#login.on {
  display: flex
}

.login-box {
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: 14px;
  padding: 40px;
  width: 360px;
  max-width: 92vw
}

.login-logo {
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px
}

.login-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 32px
}

.login-err {
  font-size: 12px;
  color: var(--red);
  min-height: 16px;
  margin: 10px 0
}

/* ── Shell ── */
#app {
  display: none
}

#app.on {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 100vh
}

/* ── Sidebar ── */
.sidebar {
  background: var(--s1);
  border-right: 1px solid var(--b1);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh
}

.logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--b1)
}

.logo-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent)
}

.logo-tag {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 2px
}

nav {
  padding: 8px 0;
  flex: 1;
  overflow-y: auto
}

.nl {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--muted2);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all .12s
}

.nl:hover {
  color: var(--text);
  background: var(--s2)
}

.nl.on {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent3)
}

.nl-icon {
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

.lucide {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  vertical-align: middle;
  flex-shrink: 0
}

.nl-icon .lucide {
  width: 15px;
  height: 15px
}

.btn .lucide {
  width: 13px;
  height: 13px
}

.sidebar-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--b1);
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono)
}

/* ── Main ── */
main {
  overflow-y: auto;
  padding: 32px 36px
}

.page {
  display: none
}

.page.on {
  display: block
}

.ph {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px
}

.ph-left h1 {
  font-size: 20px;
  font-weight: 600
}

.ph-left p {
  font-size: 13px;
  color: var(--muted2);
  margin-top: 3px
}

.ph-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0
}

/* ── Summary cards ── */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px
}

.card {
  background: var(--s1);
  border: 1px solid var(--b1);
  border-radius: 10px;
  padding: 18px 20px
}

.card-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase
}

.card-val {
  font-size: 26px;
  font-weight: 600;
  font-family: var(--mono);
  margin-top: 6px
}

.c-green {
  color: var(--accent)
}

.c-red {
  color: var(--red)
}

.c-yellow {
  color: var(--yellow)
}

.c-blue {
  color: var(--blue)
}
