/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

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

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

.btn:not(.secondary):not(.danger) {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 2px 8px rgba(139,92,246,0.25);
}

.btn:not(.secondary):not(.danger):hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow: 0 4px 14px rgba(139,92,246,0.35);
}

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

.btn.secondary:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}

.btn.danger {
  background: transparent;
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--danger);
}

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

/* ── Actions dropdown ── */
.actions-wrap {
  position: relative;
}

.actions-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 200;
  padding: 4px;
}

.actions-menu.show {
  display: block;
}

.actions-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-xs);
  text-align: left;
}

.actions-menu button:hover {
  background: rgba(255,255,255,0.06);
}

.actions-menu button svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--muted);
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* ── Route count pill ── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.2);
  color: #c4b5fd;
}

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 500;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
}

.badge.ok {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
  color: var(--success);
}

.badge.off {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  color: var(--danger);
}

/* ── Muted text ── */
.muted {
  color: var(--muted);
  font-size: 13px;
}

/* ── Search & filters ── */
.filters-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Icon inline ── */
.icon-inline {
  display: inline-flex;
  align-items: center;
}

.icon-inline svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

/* ── Section spacing ── */
.section-block {
  margin-bottom: 24px;
}

.section-block h3 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.table-wrap table {
  min-width: 600px;
}

/* ── Pagination ── */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.pagination-bar .btn {
  padding: 6px 12px;
  font-size: 12px;
}
