:root {
  --zenith-bg: #0e1117;
  --zenith-card: #1a1f2e;
  --zenith-accent: #00ffcc;
  --zenith-border: rgba(0, 255, 204, 0.2);
  --zenith-muted: #95a1b6;
  --zenith-ink: #f2f7ff;
  --zenith-danger: #ff7c7c;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--zenith-bg);
  color: var(--zenith-ink);
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.login-logo {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--zenith-accent);
  margin-bottom: 20px;
}

.login-title {
  margin: 0 0 20px;
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.18em;
  font-size: 2rem;
  color: var(--zenith-accent);
}

.login-sub {
  margin: 0 0 6px;
  color: #c6d0e0;
}

.login-attempts {
  margin: 0 0 18px;
  color: var(--zenith-muted);
  font-size: 0.95rem;
}

.login-attempts span {
  color: var(--zenith-accent);
  font-weight: 600;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.pin-dot {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 2px solid var(--zenith-border);
  background: var(--zenith-card);
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.pin-dot.filled {
  background: var(--zenith-accent);
  color: #071015;
  border-color: var(--zenith-accent);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.key {
  border: 1px solid var(--zenith-border);
  background: var(--zenith-card);
  color: #fff;
  border-radius: 10px;
  padding: 14px 0;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.key:hover {
  background: var(--zenith-accent);
  color: #000;
}

.backspace-btn {
  width: 100%;
  border: 1px solid var(--zenith-border);
  background: var(--zenith-card);
  color: var(--zenith-accent);
  border-radius: 10px;
  padding: 12px 10px;
  cursor: pointer;
  margin-bottom: 10px;
}

.auth-status {
  color: #f8b959;
  min-height: 22px;
  margin: 4px 0;
}

.auth-error {
  color: var(--zenith-danger);
  min-height: 20px;
  margin: 0;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.hero h1 {
  margin: 0;
  font-size: 1.75rem;
  color: var(--zenith-accent);
}

.hero p {
  margin: 6px 0 0;
  color: var(--zenith-muted);
}

.card {
  background: var(--zenith-card);
  border: 1px solid var(--zenith-border);
  border-radius: 14px;
  padding: 14px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filters,
.mode-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid var(--zenith-border);
  background: #141a25;
  color: #f3f8ff;
  border-radius: 8px;
  padding: 8px 10px;
}

button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 11px;
  cursor: pointer;
  background: var(--zenith-accent);
  color: #000;
  font-weight: 600;
}

button.ghost {
  background: #202838;
  color: #d3deef;
  border-color: var(--zenith-border);
}

.muted {
  color: var(--zenith-muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.grid div {
  border: 1px solid var(--zenith-border);
  background: #121924;
  border-radius: 8px;
  padding: 8px;
}

.alerts {
  margin-top: 8px;
  color: var(--zenith-muted);
  font-size: 0.9rem;
}

.inbox-list {
  display: grid;
  gap: 12px;
}

.item {
  border: 1px solid var(--zenith-border);
  border-radius: 12px;
  background: #111723;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.item.item-op-ready {
  border-color: rgba(0, 255, 204, 0.85);
  box-shadow: 0 0 0 1px rgba(0, 255, 204, 0.32), 0 0 20px rgba(0, 255, 204, 0.18);
}

.item.item-op-awaiting {
  border-color: rgba(248, 185, 89, 0.65);
}

.item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.item-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.item-title {
  margin: 0;
  font-size: 1.05rem;
}

.badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: #202838;
  border: 1px solid var(--zenith-border);
  font-size: 0.8rem;
  color: #d8e1f0;
}

.badge.op-state-ready {
  background: var(--zenith-accent);
  border-color: var(--zenith-accent);
  color: #021014;
  font-weight: 700;
}

.badge.op-state-awaiting {
  background: #f8b959;
  border-color: #f8b959;
  color: #231a09;
  font-weight: 700;
}

.meta,
.parse-line {
  margin: 0;
  color: var(--zenith-muted);
  font-size: 0.9rem;
}

.thread-actions,
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.post-secondary.ready {
  box-shadow: 0 0 0 2px rgba(0, 255, 204, 0.35);
}

.post-link {
  color: var(--zenith-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.draft {
  margin: 8px 0;
  white-space: pre-wrap;
  border: 1px solid var(--zenith-border);
  background: #0f141f;
  color: #ecf3ff;
  padding: 8px;
  border-radius: 8px;
  max-height: 240px;
  overflow: auto;
}

.notes {
  width: 100%;
  min-height: 72px;
}

@media (max-width: 760px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .pin-dot {
    width: 38px;
    height: 38px;
  }
}
