/* ────────────────────────────────────────────────────────────
   Solomon — shared theme
   Dark canvas, Geist, single accent (white) + cool gradient ambient
   ──────────────────────────────────────────────────────────── */

@import url("https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap");

:root {
  --bg: #000000;
  --bg-2: #050507;
  --surface: rgba(255,255,255,0.035);
  --surface-2: rgba(255,255,255,0.06);
  --surface-hover: rgba(255,255,255,0.08);

  --ink: #ffffff;
  --ink-muted: rgba(255,255,255,0.62);
  --ink-faint: rgba(255,255,255,0.42);
  --ink-dim: rgba(255,255,255,0.28);

  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --line-3: rgba(255,255,255,0.22);

  --ok: #67f3a4;
  --warn: #ffb86b;
  --err: #ff6b8a;
  --info: #7eb8ff;

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

  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 60px -20px rgba(0,0,0,0.6);

  --nav-w: 256px;
  --header-h: 56px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.mono { font-family: "Geist Mono", ui-monospace, monospace; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ── ambient background (subtler than login) ─────────────── */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
  pointer-events: none;
}
.bg-ambient::before {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(50% 40% at 10% 10%, rgba(40, 80, 180, 0.18), transparent 60%),
    radial-gradient(45% 50% at 95% 95%, rgba(140, 50, 180, 0.16), transparent 65%);
  filter: blur(60px);
}
.bg-ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, black 0%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, black 0%, transparent 90%);
}

/* ── wordmark ─────────────────────────────────────────────── */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.wordmark .logo {
  width: 22px;
  height: 22px;
  color: var(--ink);
}
.wordmark .name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.015em;
}

/* ── app shell layout ─────────────────────────────────────── */
.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100vh;
}

/* ── sidebar ──────────────────────────────────────────────── */
.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.sb-top {
  padding: 16px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 12px 12px 14px;
  background: var(--surface);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}
.workspace:hover { background: var(--surface-2); border-color: var(--line-2); }
.workspace .ws-avatar {
  width: 22px; height: 22px;
  border-radius: 4px;
  background: linear-gradient(135deg, #2b3a6a, #6a2b6a);
  color: #fff;
  display: grid; place-items: center;
  font-family: "Geist Mono", monospace;
  font-weight: 600;
  font-size: 11px;
}
.workspace .ws-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.workspace .ws-name { font-size: 13px; font-weight: 500; }
.workspace .ws-meta { font-size: 11px; color: var(--ink-faint); font-family: "Geist Mono", monospace; }
.workspace .chev { color: var(--ink-faint); }

.sb-search {
  margin: 0 12px 8px;
  position: relative;
}
.sb-search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  padding: 7px 10px 7px 30px;
  font-size: 13px;
  font-family: inherit;
}
.sb-search input::placeholder { color: var(--ink-faint); }
.sb-search input:focus { outline: none; border-color: var(--line-3); background: var(--surface-2); }
.sb-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); }
.sb-search kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
}

.sb-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.sb-nav::-webkit-scrollbar { width: 6px; }
.sb-nav::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

.sb-section {
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.sb-section:last-child { border-bottom: 0; }

.sb-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--ink-faint);
  padding: 8px 10px;
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: color 140ms ease, background 140ms ease;
}
.sb-section-header:hover { color: var(--ink-muted); background: var(--surface); }
.sb-section-header .arrow {
  transition: transform 200ms ease;
  width: 9px; height: 9px;
  color: var(--ink-dim);
}
.sb-section[data-open="true"] .sb-section-header .arrow { transform: rotate(90deg); }
.sb-section-header .arrow svg { width: 9px; height: 9px; }

.sb-items {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms cubic-bezier(.2,.7,.2,1);
}
.sb-section[data-open="true"] .sb-items { grid-template-rows: 1fr; }
.sb-items > div { overflow: hidden; }

.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 30px;
  border-radius: 4px;
  color: var(--ink-muted);
  font-size: 13px;
  transition: background 140ms ease, color 140ms ease;
  position: relative;
}
.sb-item:hover { background: var(--surface); color: var(--ink); }
.sb-item.active {
  background: rgba(255,255,255,0.07);
  color: var(--ink);
}
.sb-item.active::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 14px;
  background: var(--ink);
  border-radius: 1px;
}
.sb-item .count {
  margin-left: auto;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--ink-faint);
}
.sb-item .dot {
  margin-left: auto;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.sb-foot {
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sb-foot .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a3a3a, #1a1a1a);
  display: grid; place-items: center;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line-2);
}
.sb-foot .who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sb-foot .who .nm { font-size: 13px; font-weight: 500; }
.sb-foot .who .em { font-size: 11px; color: var(--ink-faint); font-family: "Geist Mono", monospace; }
.sb-foot .icon-btn {
  background: transparent;
  border: 0;
  color: var(--ink-faint);
  padding: 6px;
  border-radius: 4px;
  display: grid; place-items: center;
}
.sb-foot .icon-btn:hover { background: var(--surface); color: var(--ink); }

/* ── main area ────────────────────────────────────────────── */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-faint);
  font-size: 13px;
}
.breadcrumb a { color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { color: var(--ink-dim); }
.breadcrumb .here { color: var(--ink); font-weight: 500; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-muted);
  padding: 7px;
  border-radius: 5px;
  display: grid; place-items: center;
  transition: all 140ms ease;
}
.icon-btn:hover { background: var(--surface); color: var(--ink); border-color: var(--line); }

/* ── primitives ───────────────────────────────────────────── */
.btn {
  appearance: none;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  padding: 7px 13px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  transition: all 140ms ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  letter-spacing: -0.005em;
}
.btn:hover { background: var(--surface-2); border-color: var(--line-3); }
.btn.primary {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.btn.primary:hover { background: #ececec; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.ghost { background: transparent; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-muted);
  text-transform: uppercase;
}
.pill .dotc {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-dim);
}
.pill.ok    { color: #b7f5d2; border-color: rgba(103,243,164,0.30); background: rgba(103,243,164,0.07); }
.pill.ok .dotc { background: var(--ok); box-shadow: 0 0 0 3px rgba(103,243,164,0.18); }
.pill.warn  { color: #ffd9b3; border-color: rgba(255,184,107,0.30); background: rgba(255,184,107,0.07); }
.pill.warn .dotc { background: var(--warn); }
.pill.err   { color: #ffb3c4; border-color: rgba(255,107,138,0.30); background: rgba(255,107,138,0.07); }
.pill.err .dotc { background: var(--err); }
.pill.info  { color: #bcd6ff; border-color: rgba(126,184,255,0.30); background: rgba(126,184,255,0.07); }
.pill.info .dotc { background: var(--info); }
.pill.neutral .dotc { background: var(--ink-faint); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.card-title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.card-sub {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.card-body { padding: 16px; }

/* tables */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th, .tbl td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.tbl th {
  font-family: "Geist Mono", monospace;
  font-weight: 500;
  font-size: 10.5px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--line-2);
  position: sticky;
  top: 0;
}
.tbl tr:hover td { background: rgba(255,255,255,0.025); }
.tbl tr:last-child td { border-bottom: 0; }

/* misc */
.eyebrow {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.kbd {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
}
hr.line { border: 0; border-top: 1px solid var(--line); margin: 0; }
