* {
  box-sizing: border-box;
}

:root {
  --bg: #0b1220;
  --surface: #0f172a;
  --surface-2: #111827;
  --card: #121a2f;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #6366f1;
  --border: rgba(148, 163, 184, 0.2);
  --shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
}

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

header {
  color: #fff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.app-header {
  padding: 18px 24px;
  background: linear-gradient(120deg, #0f172a 0%, #0b1220 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo-text {
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  color: #e2e8f0;
}

header h1 {
  margin: 0 0 6px;
  font-size: 30px;
}

nav.tabs {
  display: flex;
  gap: 10px;
  padding: 0;
  background: transparent;
  flex-wrap: wrap;
  border-bottom: none;
}

.tab-button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.tab-button.active {
  background: linear-gradient(120deg, #38bdf8 0%, #6366f1 100%);
  color: #0b1220;
  border-color: transparent;
  font-weight: 600;
}

main {
  display: grid;
  gap: 20px;
  padding: 20px 24px 32px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.page {
  display: none;
  grid-column: 1 / -1;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.page.active {
  display: grid;
}

.panel {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

form {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

input,
textarea,
select {
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 14px;
  background: #0b1220;
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

button {
  padding: 10px 16px;
  border: none;
  background: linear-gradient(120deg, #38bdf8 0%, #6366f1 100%);
  color: #0b1220;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.3);
}

button:hover {
  transform: translateY(-1px);
}

button.danger {
  background: linear-gradient(120deg, #f97316 0%, #dc2626 100%);
  color: #fff;
}

button.danger:hover {
  background: #b91c1c;
}

.list {
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.35);
}

.status {
  font-size: 14px;
  color: #22c55e;
  min-height: 20px;
}

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

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

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

.stats-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--accent);
}

.inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preview img {
  max-width: 100%;
  border-radius: 16px;
  margin-top: 8px;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.4);
}

.dashboard-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.4);
}

.fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, #38bdf8 0%, #6366f1 100%);
  color: #0b1220;
  font-size: 24px;
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.55);
  cursor: pointer;
  border: none;
}

.fab:hover {
  transform: translateY(-2px);
}

@media (max-width: 720px) {
  header {
    padding: 22px 16px;
  }
  nav.tabs {
    padding: 10px 16px;
  }
  main {
    padding: 16px;
  }
  .tab-button {
    font-size: 13px;
  }
}

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

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dashboard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

.secondary:hover {
  border-color: rgba(56, 189, 248, 0.8);
}

.badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent);
}

.queue-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.queue-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

.queue-actions {
  margin-top: 10px;
}

.settings-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.35);
}

.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.inline-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
