/* Base reset & typography */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-layout);
  color: var(--t-body);
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; color: var(--t-body); }
h1 { font-size: 20px; line-height: 26px; }
h2 { font-size: 18px; line-height: 24px; }
h3 { font-size: 16px; line-height: 22px; font-weight: 600; }
h4 { font-size: 14px; line-height: 20px; font-weight: 600; }
p { margin: 0 0 12px; }
a { color: var(--t-link); text-decoration: none; }
a:hover { color: var(--t-link-hover); text-decoration: underline; cursor: pointer; }
code, pre, .mono { font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
svg { display: block; }
button { font-family: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(9, 114, 211, 0.25); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--b-focus); outline-offset: 2px; border-radius: 2px; }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* utility */
.ellipsis-cell { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; }
.ellipsis-cell > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secondary-text { color: var(--t-secondary); }
.muted-text { color: var(--t-muted); font-size: 12px; }
.nowrap { white-space: nowrap; }

/* spinner */
.spinner {
  display: inline-block; width: 16px; height: 16px; flex: none;
  border: 2px solid rgba(9, 114, 211, 0.25);
  border-top-color: var(--b-focus);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner.spinner-light { border-color: rgba(255,255,255,0.3); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* skeleton loading */
.skel {
  position: relative; overflow: hidden;
  background: #e9ebed; border-radius: 4px;
  animation: skel-pulse 1.5s ease-in-out 0.5s infinite;
}
.skel.skel-line { height: 12px; margin: 8px 0; }
@keyframes skel-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.skel-rows { padding: 16px; }
.skel-row { display: flex; gap: 18px; padding: 14px 8px; border-bottom: 1px solid var(--b-divider); }
.skel-row .skel { height: 12px; border-radius: 3px; }
.page-header-skel { padding: 20px 24px; }

/* fade in for page content */
.fade-in { animation: fadein 0.18s ease-out; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* scrollbars (webkit) — console-like thin */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: #c3cbd5; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #8d9aa7; background-clip: content-box; border: 3px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }
