/* ─── Google Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&family=Andada+Pro:wght@700&family=Inter:wght@400;500;600;700&display=swap');

/* ─── Dark-only CSS custom properties ──────────────────────────────── */
:root,
[data-theme="dark"] {
  --bg-color:           #1a1a1a;
  --text-color:         #ffffff;
  --text-primary:       #ffffff;
  --text-secondary:     #b3b3b3;
  --text-tertiary:      #888;
  --text-tab:           #000;
  --border-color:       #333;
  --border-light:       #444;
  --border-lighter:     #2a2a2a;
  --input-bg:           #2a2a2a;
  --card-bg:            #222;
  --card-border:        none;
  --surface-1:          #2a2a2a;
  --surface-2:          #333;
  --surface-3:          #3a3a3a;
  --surface-bg:         #1a1a1a;
  --hover-bg:           #3a3a3a;
  --tab-bg:             #2a2a2a;
  --tab-hover-bg:       #3a3a3a;
  --primary-color:      #d1d5db;
  --primary-hover:      #f3f4f6;
  --primary-light-bg:   rgba(209,213,219,0.1);
  --primary-rgb:        209,213,219;
  --accent-color:       #10b981;
  --positive-bg:        #1a3d1a;
  --positive-color:     #4caf50;
  --negative-bg:        #3d1a1a;
  --negative-color:     #f44336;
  --warning-bg:         #3d3a1a;
  --warning-color:      #ffc107;
  --warning-border:     #8b7c00;
  --spinner-bg:         #333;
  --overlay-background: rgba(0,0,0,0.7);
}

/* ─── Reset & base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

* { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-color);
  color: var(--text-color);
}

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.9rem;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-color); }

img { display: block; max-width: 100%; }

/* ─── Page wrapper ──────────────────────────────────────────────────── */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

@media (max-width: 768px)  { .page-wrapper { padding: 20px 16px 40px; } }
@media (max-width: 480px)  { .page-wrapper { padding: 16px 12px 32px; } }

/* ─── Navbar ────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10000;
  height: 60px;
  background: rgba(14,13,12,0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 20px;
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  pointer-events: none;
}

.nav-brand { flex-shrink: 0; margin-right: 24px; }

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-color);
  border-radius: 50%;
  flex-shrink: 0;
}

.brand-text {
  font-family: 'Andada Pro', Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.nav-items {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  flex: 1;
}

.nav-items li { display: block; }

.nav-item {
  display: inline-block;
  position: relative;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 10px 14px;
  text-decoration: none;
  transition: color 0.18s ease;
  white-space: nowrap;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 5px; left: 14px; right: 14px;
  height: 1.5px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1), opacity 0.22s ease;
  opacity: 0;
}

.nav-item:hover { color: var(--text-color); }
.nav-item:hover::after { transform: scaleX(1); opacity: 0.35; }

.nav-item.active {
  color: var(--text-color);
  font-weight: 600;
}

.nav-item.active::after {
  transform: scaleX(1);
  opacity: 1;
  height: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ─── Section header (R2) ────────────────────────────────────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-block { margin-bottom: 48px; }

/* Subsection eyebrow — for grouped settings, etc. */
.subsection-eyebrow {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-lighter);
}

/* ─── Editorial card (post/content card pattern, R3) ─────────────────── */
.card {
  background: var(--card-bg);
  border-left: 3px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  transition:
    transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94),
    box-shadow 0.35s cubic-bezier(0.25,0.46,0.45,0.94),
    border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  border-left-color: var(--accent-color);
}

/* Flat card — no hover lift, used for queue items */
.card-flat {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--border-color);
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color 0.3s ease;
}

.card-flat:hover { border-left-color: var(--accent-color); }

/* Stat card for home page */
.stat-card {
  background: var(--card-bg);
  border-left: 3px solid var(--border-color);
  border-radius: 4px;
  padding: 20px;
  transition:
    transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94),
    box-shadow 0.35s cubic-bezier(0.25,0.46,0.45,0.94),
    border-color 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  border-left-color: var(--accent-color);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'Inter', sans-serif;
}

/* ─── Account card (connect page) ───────────────────────────────────── */
.account-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--border-color);
  border-radius: 4px;
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.3s ease;
}

.account-card:hover { border-left-color: var(--accent-color); }

.account-platform {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-family: 'Inter', sans-serif;
}

.account-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.account-status {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.account-status.active { color: var(--positive-color); }
.account-status.inactive { color: var(--negative-color); }

/* ─── Queue item card ────────────────────────────────────────────────── */
.queue-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--border-color);
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color 0.3s ease;
}

.queue-item:hover { border-left-color: var(--accent-color); }

.queue-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: 'Be Vietnam Pro', sans-serif;
  letter-spacing: 0.02em;
}

.queue-meta a { color: var(--accent-color); }
.queue-meta a:hover { text-decoration: underline; }

.meta-sep { color: var(--text-tertiary); }

.comment-quote {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
  padding: 10px 14px;
  border-left: 2px solid var(--border-color);
  margin: 0 0 16px 0;
  background: var(--surface-1);
  border-radius: 0 4px 4px 0;
}

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

/* ─── Buttons (R10) ──────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--text-color);
  color: var(--bg-color);
  border: 1px solid var(--text-color);
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.2s ease, color 0.2s ease;
  font-family: 'Be Vietnam Pro', sans-serif;
  line-height: 1;
}

.btn-primary:hover {
  background: var(--bg-color);
  color: var(--text-color);
}

.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  font-family: 'Be Vietnam Pro', sans-serif;
  line-height: 1;
}

.btn-secondary:hover {
  background: var(--input-bg);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.08);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  background: transparent;
  color: var(--negative-color);
  border: 1px solid var(--negative-color);
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.18s ease;
  font-family: 'Be Vietnam Pro', sans-serif;
  line-height: 1;
}

.btn-danger:hover { background: rgba(239,68,68,0.06); }

/* Small variant */
.btn-sm {
  padding: 6px 12px;
  font-size: 0.7rem;
  min-height: 32px;
}

/* Pill chip (see-all / export) */
.btn-pill {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'Be Vietnam Pro', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  text-decoration: none;
}

.btn-pill:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* "outline" alias (used in nav actions) */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 0;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 32px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}

.btn-outline:hover {
  background: var(--input-bg);
  color: var(--text-color);
  border-color: var(--primary-color);
}

/* ─── Form fields (R9) ───────────────────────────────────────────────── */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'Inter', sans-serif;
}

.form-input,
.form-textarea,
.form-select {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-color);
  font-size: 0.875rem;
  font-family: 'Be Vietnam Pro', sans-serif;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  width: 100%;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-tertiary); }

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-select option { background: var(--card-bg); color: var(--text-color); }

.form-textarea { min-height: 96px; resize: vertical; }

.form-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  line-height: 1.4;
  margin: 0;
}

.form-error { font-size: 0.75rem; color: var(--negative-color); margin: 0; }

/* ─── Tags / badges (R11 adapted) ───────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.5;
  font-family: 'Inter', sans-serif;
}

.badge-positive {
  background: rgba(76,175,80,0.1);
  color: var(--positive-color);
  border: 1px solid rgba(76,175,80,0.25);
}

.badge-negative {
  background: rgba(244,67,54,0.1);
  color: var(--negative-color);
  border: 1px solid rgba(244,67,54,0.25);
}

.badge-neutral {
  background: rgba(156,163,175,0.1);
  color: #9ca3af;
  border: 1px solid rgba(156,163,175,0.25);
}

.badge-info {
  background: rgba(59,130,246,0.1);
  color: #60a5fa;
  border: 1px solid rgba(59,130,246,0.25);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-color);
  border: 1px solid var(--warning-border);
}

/* ─── Data tables ────────────────────────────────────────────────────── */
.data-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.data-table thead th {
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-lighter);
  transition: background 0.15s ease;
}

.data-table tbody tr:nth-child(even) { background: var(--surface-2); }
.data-table tbody tr:hover { background: var(--hover-bg); }

.data-table tbody td {
  padding: 10px 14px;
  color: var(--text-secondary);
  vertical-align: middle;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table tbody td.td-overflow { white-space: normal; word-break: break-word; }

/* ─── Stats grid ─────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 0;
}

@media (max-width: 768px) { .stats-grid { grid-template-columns: 1fr; gap: 12px; } }

/* ─── Chart grid ─────────────────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--border-color);
  border-radius: 4px;
  padding: 20px;
  transition: border-color 0.3s ease;
}

.chart-card:hover { border-left-color: var(--accent-color); }

.chart-title {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 16px 0;
}

@media (max-width: 768px) { .charts-grid { grid-template-columns: 1fr; } }

/* ─── Modal (R8) ─────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-background);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10005;
  padding: 20px;
}

.modal-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 4px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* ─── Empty state (R14) ──────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  gap: 8px;
  color: var(--text-secondary);
}

.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.empty-title {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.empty-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 12px 0;
  max-width: 320px;
}

/* ─── Alert / error banner (R15) ─────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 16px 0;
}

.alert-icon { flex-shrink: 0; margin-top: 1px; }

.alert-error {
  background: var(--negative-bg);
  color: var(--negative-color);
  border: 1px solid var(--negative-color);
}

.alert-warning {
  background: var(--warning-bg);
  color: var(--warning-color);
  border: 1px solid var(--warning-border);
}

.alert-success {
  background: var(--positive-bg);
  color: var(--positive-color);
  border: 1px solid var(--positive-color);
}

.alert-info {
  background: var(--input-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

/* ─── Spinner + skeleton (R16) ───────────────────────────────────────── */
.loading-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
}

.spinner,
.spinner-sm {
  border-radius: 50%;
  border-style: solid;
  border-color: var(--spinner-bg);
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

.spinner    { width: 32px; height: 32px; border-width: 3px; }
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }

.skeleton {
  background: linear-gradient(
    90deg,
    var(--border-color) 25%,
    var(--hover-bg) 50%,
    var(--border-color) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-line  { height: 14px; width: 100%; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 70%; margin-bottom: 12px; }
.skeleton-card  { height: 80px; width: 100%; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Avatar (R18) ───────────────────────────────────────────────────── */
.avatar {
  border-radius: 0;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.avatar-fallback {
  font-size: 0.7rem;
  font-weight: 600;
  color: black; /* dark theme: primary-color is light, text is black */
}

/* ─── Meta row (R19) ─────────────────────────────────────────────────── */
.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: 'Be Vietnam Pro', sans-serif;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.meta-author { font-weight: 500; color: var(--accent-color); }
.meta-date   { color: var(--text-tertiary); }
.meta-sep    { color: var(--text-tertiary); }

/* ─── Login page ─────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-color);
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-top: 2px solid var(--accent-color);
  border-radius: 4px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}

.auth-brand-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent-color);
  border-radius: 50%;
  margin-bottom: 12px;
}

.auth-brand-name {
  display: block;
  font-family: 'Andada Pro', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.2;
  margin-bottom: 6px;
}

.auth-brand-sub {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

/* ─── Pagination ─────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
}

.page-indicator {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
}

/* ─── Settings form groups ───────────────────────────────────────────── */
.settings-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--border-color);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 20px;
  transition: border-color 0.3s ease;
}

.settings-section:hover { border-left-color: var(--accent-color); }

.settings-section-title {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-lighter);
}

/* ─── Dropdown (R7) ──────────────────────────────────────────────────── */
.dropdown-container { position: relative; display: inline-flex; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 2px solid var(--primary-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25), 0 12px 40px rgba(0,0,0,0.6);
  min-width: 180px;
  z-index: 10001;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16,1,0.3,1);
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 16px 10px 14px;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.dropdown-item:hover {
  background: var(--input-bg);
  color: var(--text-color);
  border-left-color: var(--primary-color);
}

/* ─── Muted text helper ──────────────────────────────────────────────── */
.muted { color: var(--text-tertiary); font-size: 0.82rem; }
code {
  font-size: 0.82em;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text-secondary);
}

/* ─── Connect page action buttons row ───────────────────────────────── */
.connect-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ─── Quick actions strip (home) ─────────────────────────────────────── */
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .spinner, .spinner-sm { animation: none; border-top-color: var(--primary-color); }
  .skeleton { animation: none; background: var(--border-color); }
  .nav-item::after { transition: none; }
  .card, .stat-card, .card-flat, .queue-item, .account-card { transition: none; }
}

/* ─── Mobile ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { height: 52px; padding: 0 16px; }
  .nav-items { display: none; }
  .nav-brand { margin-right: auto; }
  .data-table thead th,
  .data-table tbody td { padding: 8px 10px; font-size: 0.75rem; }
  .stat-value { font-size: 2rem; }
  .charts-grid { grid-template-columns: 1fr; }
  .queue-actions { flex-direction: column; }
  .queue-actions .btn-primary,
  .queue-actions .btn-secondary,
  .queue-actions .btn-danger { width: 100%; }
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .settings-section { padding: 16px; }
  .btn-primary, .btn-secondary { font-size: 0.72rem; padding: 8px 14px; }
}
