:root {
  --bg: #0b0e14;
  --panel: #131722;
  --border: #232a3a;
  --text: #e6e9f0;
  --muted: #8b93a7;
  --accent: #1d4ed8;
  --accent-2: #059669;
  --error: #f87171;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, sans-serif;
}

h1, h2, h3 {
  font-weight: 600;
}

button {
  font: inherit;
  color: var(--text);
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

button.link {
  background: none;
  color: var(--muted);
  padding: 4px 6px;
  text-decoration: underline;
}

button.small-button {
  padding: 4px 8px;
  font-size: 12px;
}

input {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
}

a {
  color: #7ea2ff;
}

.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

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

.mono {
  font-family: ui-monospace, monospace;
}

.small {
  font-size: 12px;
}

.error {
  color: var(--error);
  margin: 8px 0;
}

/* Auth */
.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

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

.auth-card h1 {
  margin: 0;
}

.auth-card h2 {
  margin: 0;
  font-size: 18px;
}

.auth-card .tagline {
  margin: -8px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.notice {
  color: #51d6a9;
  margin: 8px 0;
}

.divider {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}

.oauth-buttons,
.auth-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

button.oauth {
  background: var(--bg);
  border: 1px solid var(--border);
}

/* App chrome */
.app header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
}

.brand .org {
  color: var(--muted);
  font-weight: 400;
}

nav {
  display: flex;
  gap: 4px;
}

button.tab {
  background: none;
  color: var(--muted);
}

button.tab.active {
  background: var(--border);
  color: var(--text);
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

button.publish {
  background: var(--accent-2);
  font-weight: 600;
}

.publish-status {
  padding: 8px 24px;
  background: #10243a;
  border-bottom: 1px solid var(--border);
}

main {
  padding: 24px;
  max-width: 1180px;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

.badge {
  background: var(--border);
  border-radius: 10px;
  padding: 2px 10px;
  font-size: 12px;
  color: var(--muted);
}

.badge.ok {
  background: #0c3527;
  color: #51d6a9;
}

.badge.warn {
  background: #3a2f10;
  color: #f8d76b;
}

.pairing-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}

.pairing-code {
  font: 700 40px/1.2 ui-monospace, monospace;
  letter-spacing: 8px;
  margin: 12px 0;
}

input.duration {
  width: 70px;
}

.row-actions {
  white-space: nowrap;
}

.email {
  font-size: 13px;
}
