/* zjstatus — unified UI: calm, technical, minimal */

:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;

  --bg-page: #f1f5f9;
  --bg-elevated: #ffffff;
  --bg-muted: #f8fafc;
  --bg-subtle: #f1f5f9;

  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-ring: rgba(37, 99, 235, 0.35);

  --ok-bg: #ecfdf5;
  --ok-fg: #047857;
  --ok-border: #a7f3d0;

  --err-bg: #fef2f2;
  --err-fg: #b91c1c;
  --err-border: #fecaca;

  --warn-bg: #fffbeb;
  --warn-fg: #b45309;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.1);

  --space-page: clamp(16px, 3vw, 28px);
  --content-max: 1280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-page);
  background-image:
    radial-gradient(ellipse 120% 80% at 100% -20%, rgba(37, 99, 235, 0.06), transparent 50%),
    radial-gradient(ellipse 80% 60% at 0% 100%, rgba(14, 165, 233, 0.05), transparent 45%);
}

::selection {
  background: rgba(37, 99, 235, 0.18);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}

/* —— Page shell (public pages) —— */
.page-shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-page);
  padding-bottom: calc(var(--space-page) + 12px);
}

.page-shell--detail .card:first-child {
  margin-top: 0;
}

/* 运行情况页：概览 / 探测日志 / 告警 分页 */
.status-dashboard-card .status-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.status-view-tab {
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.status-view-tab:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.status-view-tab.active {
  background: var(--accent-soft);
  border-color: rgba(37, 99, 235, 0.25);
  color: var(--accent);
}

.status-view-panel {
  display: none;
}

.status-view-panel.active {
  display: block;
}

.probe-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.probe-toolbar .form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.probe-toolbar .form-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.probe-toolbar input[type="date"],
.probe-toolbar select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  min-width: 160px;
  background: var(--bg-elevated);
}

.probe-toolbar .probe-toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.log-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* —— Cards —— */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(18px, 2.5vw, 24px);
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.card-header h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.45rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}

.lead {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.hint {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.caption {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.5;
}

/* —— Navigation row —— */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.nav a:not(.btn-ghost):not(.btn-primary) {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.nav a:not(.btn-ghost):not(.btn-primary):hover {
  background: var(--border);
  color: var(--text);
  text-decoration: none;
}

/* —— Buttons —— */
button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

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

.btn-ghost:hover:not(:disabled) {
  background: var(--border);
  color: var(--text);
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

/* —— Tables —— */
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

thead th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: linear-gradient(to bottom, var(--bg-muted), var(--bg-elevated));
  border-bottom: 1px solid var(--border-strong);
}

tbody tr:hover {
  background: rgba(241, 245, 249, 0.65);
}

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

.table-scroll {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
  -webkit-overflow-scrolling: touch;
}

/* 运行概览：整表铺满容器宽度；列按比例分配（合计 100%） */
.table-scroll--status-overview {
  overflow-x: auto;
  width: 100%;
  box-sizing: border-box;
}

.status-overview-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

/* 列宽合计 100%；名称/地址为指定比例，其余列按余量分配 */
.status-overview-table th.col-status {
  width: 7%;
}

/* 页脚徽章列加宽 + 最小宽度，避免按钮与名称列重叠；右侧留白与名称拉开 */
.status-overview-table th.col-embed,
.status-overview-table td.col-embed {
  width: 15%;
  min-width: 12.5rem;
  box-sizing: border-box;
  padding-right: 14px;
  white-space: nowrap;
  font-size: 12px;
}

/* 站点名称：加宽列 + 最小宽度，换行完整显示（不省略） */
.status-overview-table th.col-name,
.status-overview-table td.col-name {
  width: 15%;
  min-width: 8.5rem;
  padding-left: 14px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: middle;
  line-height: 1.45;
}

.status-overview-table td.col-name .site-link {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.status-overview-table th.col-url {
  width: 18%;
}

.status-overview-table th.col-dns,
.status-overview-table td.col-dns {
  width: 20%;
}

.status-overview-table th.col-time {
  width: 9%;
}

.status-overview-table th.col-code {
  width: 4%;
}

.status-overview-table th.col-rt {
  width: 7%;
}

.status-overview-table th.col-cert {
  width: 5%;
}

.status-overview-table td.cell-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  max-width: 0;
}

.status-overview-table td.col-url.cell-ellipsis a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-table {
  font-size: 13px;
}

.log-table th,
.log-table td {
  padding: 8px 10px;
}

.log-table thead th {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}

/* —— Badges —— */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.badge-normal,
.badge-on {
  background: var(--ok-bg);
  color: var(--ok-fg);
  border: 1px solid var(--ok-border);
}

.badge-abnormal,
.badge-off {
  background: var(--err-bg);
  color: var(--err-fg);
  border: 1px solid var(--err-border);
}

.badge-unknown {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* —— Status dots —— */
.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.status-dot.normal {
  background: #10b981;
}

.status-dot.abnormal {
  background: #ef4444;
}

.status-dot.unknown {
  background: #94a3b8;
}

/* 运行情况：按响应时间分档的状态图标（条形 + 文案） */
.status-rt-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.status-rt-cell .rt-lbl {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-rt-cell--excellent .rt-lbl {
  color: #047857;
}

.status-rt-cell--good .rt-lbl {
  color: #15803d;
}

.status-rt-cell--moderate .rt-lbl {
  color: #a16207;
}

.status-rt-cell--ok .rt-lbl {
  color: #c2410c;
}

.status-rt-cell--slow .rt-lbl {
  color: #b91c1c;
}

.rt-bars-svg {
  display: block;
  flex-shrink: 0;
}

.status-rt-na {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.rt-icon-na {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border-strong);
  box-shadow: inset 0 0 0 2px var(--bg-elevated);
}

.status-rt-fallback {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 运行情况：页脚徽章嵌入 */
.status-embed-cell {
  white-space: nowrap;
  vertical-align: middle;
}

.status-embed-cell .btn-embed {
  padding: 4px 10px;
  font-size: 12px;
  margin-right: 8px;
}

.status-embed-cell .embed-preview {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.status-embed-cell .embed-preview:hover {
  color: var(--accent);
  text-decoration: underline;
}

a.site-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

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

/* —— Messages —— */
.msg {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid transparent;
}

.msg.ok {
  background: var(--ok-bg);
  color: var(--ok-fg);
  border-color: var(--ok-border);
}

.msg.err {
  background: var(--err-bg);
  color: var(--err-fg);
  border-color: var(--err-border);
}

.msg.muted {
  background: var(--bg-muted);
  color: var(--text-secondary);
  border-color: var(--border);
}

/* —— Collapse (status log) —— */
.collapse-header {
  padding: 12px 16px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  margin-bottom: 4px;
  color: var(--text-secondary);
  transition: background 0.15s, border-color 0.15s;
}

.collapse-header:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.collapse-header .arrow {
  transition: transform 0.2s ease;
  color: var(--text-faint);
  font-size: 12px;
}

.collapse-header.open .arrow {
  transform: rotate(90deg);
}

.collapse-body-inner {
  padding: 14px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--bg-elevated);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.log-table th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.log-table th.sortable:hover {
  color: var(--accent);
}

.log-table th .sort-icon {
  margin-left: 4px;
  opacity: 0.55;
}

.log-empty {
  color: var(--text-muted);
  padding: 12px;
  font-size: 14px;
}

/* —— Detail page: metrics grid —— */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.metric {
  background: var(--bg-muted);
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid var(--border);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.metric:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.metric .label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.metric .value {
  font-size: 1.28rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.metric .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.45;
}

.path {
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-subtle);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

#portsWrap {
  overflow-x: auto;
}

#appInfoBox table {
  margin-top: 4px;
}

#appInfoBox td.path {
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 12px;
}

.metric table thead th {
  background: var(--bg-muted);
  font-size: 12px;
  letter-spacing: 0;
}

.speedtest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.speedtest-row input[type="url"] {
  flex: 1;
  min-width: 220px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-elevated);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.speedtest-row input[type="url"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

#speedtestResult strong {
  color: var(--text);
}

/* —— Login —— */
body.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-page);
}

.page-login .card {
  width: 100%;
  max-width: 380px;
  padding: clamp(28px, 5vw, 36px);
  box-shadow: var(--shadow-lg);
}

.page-login h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 650;
  text-align: center;
  letter-spacing: -0.02em;
  color: var(--text);
}

.page-login .subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.page-login .form-group {
  margin-bottom: 16px;
}

.page-login .form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.page-login .form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--bg-elevated);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.page-login .form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.page-login button[type="submit"] {
  width: 100%;
  margin-top: 8px;
  padding: 11px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3);
}

.page-login button[type="submit"]:hover:not(:disabled) {
  background: var(--accent-hover);
}

.page-login .back {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.page-login .back:hover {
  color: var(--accent);
}

.page-login .msg {
  margin-bottom: 18px;
}

/* —— Admin layout —— */
body.layout-admin {
  padding: 24px 24px 40px 240px;
  min-height: 100vh;
}

.sidebar-brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 8px 12px 16px;
  margin: 0 -4px 4px;
  border-bottom: 1px solid var(--border);
}

.tabs {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 216px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 20px 14px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.04);
  overflow: auto;
  z-index: 50;
}

.tabs a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  background: transparent;
  display: block;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tabs a:hover {
  background: var(--bg-muted);
  color: var(--text);
  text-decoration: none;
}

.tabs a.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.2);
  text-decoration: none;
}

.layout-admin .nav {
  margin-bottom: 0;
}

.layout-admin h1 {
  margin: 0 0 20px;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}

.layout-admin .sub-section {
  margin-bottom: 24px;
}

.layout-admin .sub-section h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.layout-admin .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.layout-admin .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.layout-admin .form-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.layout-admin .form-group input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 140px;
  font-size: 14px;
  background: var(--bg-elevated);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.layout-admin .form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.layout-admin .form-group.wide {
  min-width: 100%;
}

.layout-admin .form-group.wide input {
  width: 100%;
  max-width: 440px;
}

.layout-admin .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

#editModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

#editModal.show {
  display: flex;
}

.modal-box {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 26px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box h3 {
  margin: 0 0 18px;
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--text);
}

.modal-box .form-group {
  margin-bottom: 12px;
}

.modal-box .form-group input {
  width: 100%;
  min-width: 0;
}

.modal-actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.token-mask {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: default;
}

.layout-admin .panel {
  display: none;
}

.layout-admin .panel.active {
  display: block;
}

.layout-admin .save-row {
  margin-top: 12px;
}

/* —— Empty / helper text —— */
.empty-tip {
  color: var(--text-muted);
  margin: 12px 0 0;
  font-size: 14px;
}

/* —— Responsive —— */
@media (max-width: 900px) {
  body.layout-admin {
    padding: 16px 16px 32px 16px;
  }

  .tabs {
    position: relative;
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    bottom: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    box-shadow: none;
    margin: -8px -8px 20px;
    padding: 12px;
    gap: 8px;
  }

  .sidebar-brand {
    width: 100%;
    border-bottom: none;
    padding-bottom: 8px;
  }

  .tabs a {
    flex: 1 1 auto;
    min-width: calc(50% - 6px);
    text-align: center;
  }
}

@media (max-width: 640px) {
  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
  }
}
