/* Public SQL data browser — Knesset-style (over.org.il) look, brand-aligned. */
:root {
  --brand: #2c5364;
  --brand-light: #203a43;
  --ink: #1f2d34;
  --muted: #667;
  --line: #e3e8ec;
  --chip: #eef3f6;
  --ok: #1a7f4b;
}

body {
  background: #f0f2f5;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink);
}

.navbar { background: var(--brand) !important; }

/* ── Hero ─────────────────────────────────────────── */
.sql-hero {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  padding: 1.8rem 0 1.4rem;
}
.sql-hero h1 { font-weight: 700; font-size: 1.6rem; margin: 0 0 .4rem; }
.sql-hero p  { margin: 0; opacity: .92; max-width: 60ch; }
.sql-stats {
  margin-top: .9rem; font-size: .9rem;
  display: inline-flex; gap: .35rem 1rem; flex-wrap: wrap;
  background: rgba(255,255,255,.12); padding: .45rem .9rem; border-radius: 8px;
}
.sql-stats b { font-weight: 700; }

/* ── Console ──────────────────────────────────────── */
.console-card { border: 1px solid var(--line); border-radius: 12px; }
.console-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
#sql-editor {
  direction: ltr; text-align: left; font-family: 'Consolas', 'Courier New', monospace;
  font-size: .92rem; min-height: 120px; resize: vertical;
}
.hint { color: var(--muted); font-size: .82rem; }
#run-error {
  direction: ltr; text-align: left; white-space: pre-wrap;
  font-size: .85rem;
}

/* results table */
.results-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
#results-table { margin: 0; font-size: .85rem; white-space: nowrap; }
#results-table thead th {
  position: sticky; top: 0; background: var(--chip);
  font-weight: 700; direction: ltr; text-align: start;
}
#results-table td { max-width: 420px; overflow: hidden; text-overflow: ellipsis; }

/* ── Catalog ──────────────────────────────────────── */
.catalog-group-title {
  font-weight: 700; color: var(--brand); font-size: .95rem;
  margin: 1.1rem 0 .5rem; padding-bottom: .25rem; border-bottom: 2px solid var(--line);
}
.table-card {
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: .7rem .85rem; cursor: pointer; height: 100%;
  transition: box-shadow .12s, border-color .12s, transform .12s;
}
.table-card:hover {
  border-color: var(--brand); box-shadow: 0 4px 14px rgba(44,83,100,.14);
  transform: translateY(-1px);
}
.table-card .fn { font-weight: 700; font-size: .95rem; }
.table-card .dbn {
  direction: ltr; font-family: 'Consolas', monospace; font-size: .78rem; color: var(--muted);
}
.table-card .rc {
  float: left; background: var(--chip); color: var(--brand);
  border-radius: 6px; padding: .05rem .45rem; font-size: .78rem; font-weight: 700;
}
.table-card .desc {
  color: var(--muted); font-size: .8rem; margin-top: .35rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tag-chip {
  display: inline-block; background: var(--chip); color: var(--brand);
  border-radius: 999px; padding: .05rem .5rem; font-size: .72rem; margin: .15rem .15rem 0 0;
}
#catalog-empty { color: var(--muted); }

/* ── Cube (modal) ─────────────────────────────────── */
.cube-meta { color: var(--muted); font-size: .85rem; }
.cube-source a { color: var(--brand); font-weight: 600; }
.cube-cols { font-size: .84rem; }
.cube-cols td, .cube-cols th { padding: .3rem .5rem; }
.cube-cols .cname { direction: ltr; font-family: 'Consolas', monospace; font-weight: 600; }
.cube-cols .ctype { direction: ltr; font-family: 'Consolas', monospace; color: var(--muted); }
.badge-pk { background: #b9860b; }
.sample-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.sample-wrap table { font-size: .8rem; white-space: nowrap; margin: 0; }
.sample-wrap thead th { background: var(--chip); direction: ltr; text-align: start; }
