:root {
  --bg: #0f1419;
  --surface: #192734;
  --border: #38444d;
  --text: #e7e9ea;
  --muted: #8b98a5;
  --accent: #1d9bf0;
  --accent-hover: #1a8cd8;
  --danger: #f4212e;
  --success: #00ba7c;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.layout {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.brand {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.brand span {
  color: var(--accent);
}

.tagline {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 1rem;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(29, 155, 240, 0.1);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
}

.btn-danger:hover {
  background: rgba(244, 33, 46, 0.15);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.user-pill {
  color: var(--muted);
  font-size: 0.9rem;
}

.user-pill strong {
  color: var(--text);
}

.msg {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.msg-error {
  background: rgba(244, 33, 46, 0.15);
  color: #f7777a;
  border: 1px solid rgba(244, 33, 46, 0.35);
}

.msg-success {
  background: rgba(0, 186, 124, 0.12);
  color: var(--success);
  border: 1px solid rgba(0, 186, 124, 0.35);
}

.tweet {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.tweet:last-child {
  border-bottom: none;
}

.tweet-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.tweet-author {
  font-weight: 700;
}

.tweet-handle {
  color: var(--muted);
  font-size: 0.9rem;
}

.tweet-time {
  color: var(--muted);
  font-size: 0.8rem;
  margin-left: auto;
}

.tweet-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.tweet-actions {
  margin-top: 0.5rem;
}

.admin-badge {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(244, 33, 46, 0.2);
  color: #f7777a;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 600;
}

.footer-links {
  margin-top: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

h2.section-title {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.auth-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.auth-stack {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.auth-stack hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: -0.5rem;
  margin-bottom: 0.75rem;
}

code {
  font-size: 0.85em;
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}
