/*
 * Over — Base + layout skeleton
 * Reset, root typography, and the top-level app frame.
 * Resizers are absolutely positioned over panel edges: no layout gap, no double border.
 */

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

svg { display: block; }

/* ── Focus: one consistent keyboard-only ring for every interactive control.
   Mouse/touch focus shows nothing (uses :focus-visible); the ring follows each
   element's own border-radius. Form fields also keep their accent border. ── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── App frame ── */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Main column ── */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Scrollable view area ── */
/* Vertical scroll always; horizontal scroll only kicks in when the content column
   hits its --content-min (very narrow window/panels) — the section scrolls rather
   than clipping. On normal widths nothing scrolls sideways except the table itself. */
.view {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
}

/* ── Centred content column ── */
.page {
  width: 100%;
  min-width: var(--content-min);
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* ── Empty-state placeholder ── */
.placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  color: var(--text-faint);
  text-align: center;
  padding: var(--sp-6);
}

.placeholder__icon { color: var(--text-faint); opacity: 0.5; }
.placeholder__title { font-size: var(--fs-lg); color: var(--text-dim); }
.placeholder__desc { font-size: var(--fs-sm); max-width: 320px; }

/* ── Scrollbars (subtle) ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--r-lg); }
::-webkit-scrollbar-thumb:hover { background: var(--surface-hover); }
