:root {
  --paper: #f3f5f7;
  --surface: #ffffff;
  --ink: #17232e;
  --muted: #5b6b78;
  --line: #d8e0e6;
  --accent: #0d6b78;
  --accent-ink: #ffffff;
  --good: #1a7f4b;
  --bad: #b3261e;
  --bad-bg: #fdecea;
  --good-bg: #e8f5ee;
  --side: #17232e;
  --side-ink: #c9d4dc;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Noto Sans Bengali", Roboto, Arial, sans-serif;
  line-height: 1.5;
}

a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #f2b705;
  outline-offset: 2px;
}

code, .data td { font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .875rem; }

h1 { font-size: 1.5rem; margin: 0 0 1rem; line-height: 1.25; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 1.25rem;
  background: var(--side);
  color: #fff;
}
.topbar .brand { color: #fff; font-weight: 600; letter-spacing: .01em; text-decoration: none; }
.topbar .quiet { color: var(--side-ink); font-size: .9rem; }

.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 48px); }
.shell-solo { grid-template-columns: minmax(0, 1fr); }

.side { background: #1f2e3b; padding: 1rem .75rem 2rem; overflow-y: auto; }
.side a { display: block; padding: .35rem .6rem; border-radius: 4px; color: var(--side-ink); text-decoration: none; font-size: .92rem; overflow-wrap: anywhere; }
.side a:hover { background: #2a3d4d; color: #fff; }
.side a.on { background: var(--accent); color: var(--accent-ink); }
.side ul { list-style: none; margin: 0; padding: 0; }
.side-home { font-weight: 600; }
.side-label { margin: 1.1rem .6rem .4rem; color: #8fa2b1; font-size: .8rem; }

.main { padding: 1.5rem; min-width: 0; }

.status {
  display: flex; gap: .8rem; align-items: center;
  padding: .9rem 1.1rem; margin-bottom: 1.5rem;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
}
.status div { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: baseline; }
.status .dot { width: .8rem; height: .8rem; border-radius: 50%; flex: none; }
.status.good { border-color: #b7dcc8; background: var(--good-bg); }
.status.good .dot { background: var(--good); }
.status.bad { border-color: #f0b8b3; background: var(--bad-bg); }
.status.bad .dot { background: var(--bad); }

.muted { color: var(--muted); }
.small { font-size: .875rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1.25rem; max-width: 46rem; }
.plain { padding-left: 1.2rem; }
.plain li { margin-bottom: .5rem; }

.alert { background: var(--bad-bg); color: var(--bad); border-left: 4px solid var(--bad); padding: .6rem .8rem; border-radius: 3px; overflow-wrap: anywhere; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 6px; }
.null { color: #8a97a2; font-style: italic; }

.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { padding: .5rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid th { background: #eaf0f4; font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
.grid th a { color: var(--ink); text-decoration: none; }
.grid th a:hover { text-decoration: underline; }
.grid tbody tr:nth-child(even) { background: #f8fafb; }
.grid tbody tr:hover { background: #e9f3f5; }
.grid tr:last-child td { border-bottom: 0; }
.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.data td { max-width: 26rem; overflow-wrap: anywhere; }

.head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.head h1 { margin: 0; overflow-wrap: anywhere; }
.tabs { display: flex; gap: .25rem; }
.tabs a { padding: .35rem .9rem; border-radius: 4px; text-decoration: none; color: var(--muted); border: 1px solid transparent; }
.tabs a.on { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 600; }

.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; align-items: center; }
.toolbar .push { margin-left: auto; }

input[type="search"], input[type="password"], select {
  padding: .5rem .7rem; border: 1px solid #b9c5ce; border-radius: 4px; background: #fff; font: inherit; color: inherit;
}
.toolbar input[type="search"] { flex: 1 1 16rem; min-width: 0; max-width: 28rem; }

button {
  padding: .5rem 1rem; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600;
}
button:hover { background: #0a5560; }
.btn-quiet { padding: .5rem .8rem; color: var(--accent); text-decoration: none; border-radius: 4px; }
.btn-quiet:hover { background: #e2eef0; }

.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1.25rem 0 .5rem; flex-wrap: wrap; }
.pager a { padding: .35rem .8rem; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; text-decoration: none; }
.pager a:hover { border-color: var(--accent); }

.login { max-width: 22rem; margin: 4rem auto; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.stack { display: grid; gap: .6rem; }
.stack label { font-weight: 600; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { max-height: 11rem; }
  .main { padding: 1rem; }
  .toolbar .push { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
