/* GraphNative console concept — Bento Orbs styling.
   Tokens come from bento.css (:root) — GraphNative palette, no new colors. */

/* ---------- header ---------- */

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.back-home {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.back-home:hover { border-color: var(--accent); color: var(--accent-soft); }

.lede {
  max-width: 72ch;
  margin: -12px 0 26px;
  font-size: 13.5px;
}

/* ---------- full-width block tiles (ledger, policy) ---------- */

.t-block { margin-top: 14px; }

.orbs-section { margin-top: 14px; }
.orbs-section + .t-block { margin-top: 44px; }

/* ---------- authority ledger ---------- */

.ledger-wrap { margin-top: 16px; overflow-x: auto; }

.ledger { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ledger th {
  padding: 10px 12px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.ledger td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: top;
}
.ledger tbody tr { cursor: pointer; }
.ledger tbody tr:hover,
.ledger tbody tr.is-selected { background: rgba(139, 124, 246, 0.08); }

.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--muted); }

.tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.tag--ok   { background: rgba(74, 222, 128, 0.14); color: #4ADE80; }
.tag--info { background: rgba(34, 211, 238, 0.12); color: #22D3EE; }
.tag--risk { background: rgba(248, 113, 113, 0.14); color: #F87171; }

.ledger-detail {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.ledger-detail strong { color: var(--ink); }

/* ---------- action policy ---------- */

.policy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.policy {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
}

.policy__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.policy__label { font-size: 13px; font-weight: 620; }
.policy__cap { margin: 6px 0 10px; font-size: 12px; color: var(--muted); line-height: 1.5; }

.cmdline {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--accent-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.toggle {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--tile-2);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--faint);
  transition: left 0.18s ease, background 0.18s ease;
}
.toggle.is-on { background: var(--accent-dim); border-color: var(--accent); }
.toggle.is-on::after { left: 20px; background: var(--accent-soft); }
.toggle:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }

/* ---------- AI command bar ---------- */

.command-spacer { height: 110px; }

.console-command {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 30;
  width: min(640px, calc(100vw - 40px));
}

.cmd-chips {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.cmd-chips .chip {
  cursor: pointer;
  background: rgba(19, 19, 24, 0.92);
  backdrop-filter: blur(8px);
  animation: none;
}

.cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(19, 19, 24, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.45);
}

.cmd-spark { color: var(--accent-soft); font-size: 14px; }

.cmd-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
}
.cmd-input::placeholder { color: var(--faint); }

.cmd-go {
  flex: 0 0 auto;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cmd-go:hover { transform: translateY(-1px); box-shadow: 0 8px 34px rgba(139, 124, 246, 0.5); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .policy-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .page-head { flex-direction: column; align-items: flex-start; }
  .head-actions { flex-wrap: wrap; }
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; }
  .ledger tbody tr {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--tile-2);
  }
  .ledger td { padding: 4px 0; border-bottom: 0; }
  .cmd-chips { position: static; margin-bottom: 10px; }
  .console-command { width: calc(100vw - 28px); }
}
