:root {
  --bg: #0b0f17;
  --card: #131a26;
  --border: #222d40;
  --text: #eef2f7;
  --muted: #8b9bb4;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --danger: #ef4444;
  --ok: #22c55e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom) 16px;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 0 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

h1 {
  margin: 0;
  font-size: 1.25rem;
}

h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

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

.banner {
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.hidden {
  display: none !important;
}

.push-status-row,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.row-form {
  display: flex;
  gap: 8px;
}

input,
textarea,
select {
  width: 100%;
  background: #0d131d;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0d131d;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}

.chip.active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.16);
}

.chip-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
}

.publish-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.publish-actions {
  display: flex;
  gap: 8px;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.msg-item {
  background: #0d131d;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.msg-item.priority-high {
  border-left: 3px solid var(--danger);
}

.msg-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.msg-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.msg-time {
  font-size: 0.75rem;
  color: var(--muted);
}

.msg-body {
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.dialog {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  max-width: 400px;
  width: 90%;
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
