:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #262b36;
  --text: #e6e8eb;
  --muted: #9aa3b2;
  --accent: #4f8cff;
  --danger: #e0575b;
  --ok: #3ecf8e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.view { min-height: 100vh; }

#login-view {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-card h1 { margin: 0; font-size: 20px; }
.subtitle { margin: 0 0 8px; color: var(--muted); font-size: 13px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }

input {
  background: #0c0e12;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
}

.login-card button[type="submit"] {
  background: var(--accent);
  color: white;
  margin-top: 6px;
}

.error { color: var(--danger); font-size: 13px; min-height: 16px; margin: 0; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}
header h1 { font-size: 18px; margin: 0; }

.link-btn { background: transparent; color: var(--muted); }
.link-btn:hover { color: var(--text); }

.tabs { display: flex; gap: 8px; padding: 16px 28px 0; }
.tab-btn {
  background: transparent;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 8px 4px;
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }

.tab-panel { padding: 20px 28px; }

.list { display: flex; flex-direction: column; gap: 10px; }

.item-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.item-title { font-weight: 600; font-size: 14px; }
.item-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #23283350;
  color: var(--muted);
  white-space: nowrap;
}

.empty { color: var(--muted); font-size: 13px; padding: 20px 0; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: min(640px, 90vw);
  max-height: 80vh;
  overflow: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

pre {
  background: #0c0e12;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.actions { display: flex; gap: 8px; margin-top: 14px; }

.btn-primary { background: var(--accent); color: white; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
