/* ─── dashboard.css ──────────────────────────────────────────────────────────
   Builder/tester dashboard styles. Requires css/shared.css loaded first.
   ─────────────────────────────────────────────────────────────────────────── */

body { min-height: 100vh; }
a { color: var(--teal); }

/* ─── Shell ─── */
header {
  border-bottom: 1px solid var(--line);
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0;
  background: rgba(10,14,15,0.92);
  backdrop-filter: blur(10px);
  z-index: 10;
}
.header-right { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--dim); }
#whoami strong { color: var(--text); }
.layout { max-width: 1100px; margin: 0 auto; padding: 32px; }

/* ─── Typography ─── */
h1 { font-family: var(--display); font-weight: 500; font-size: 1.8rem; margin-bottom: 6px; }
h2 { font-family: var(--display); font-weight: 500; font-size: 1.3rem; margin: 32px 0 14px; }
.section-sub { color: var(--dim); font-size: 14px; margin-bottom: 18px; }

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 20px;
}

/* ─── Form overrides (dashboard uses full-width inputs) ─── */
input, textarea, select { width: 100%; padding: 10px 12px; }
textarea { resize: vertical; min-height: 80px; font-family: var(--mono); font-size: 12.5px; }

label {
  display: block;
  font-size: 13px;
  color: var(--dim);
  margin-bottom: 6px;
  margin-top: 14px;
}
label:first-child { margin-top: 0; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }

.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; color: var(--text); }

/* ─── Buttons (dashboard variants) ─── */
button {
  font-family: var(--body); font-size: 14px; font-weight: 500;
  border: 1px solid var(--line); background: transparent; color: var(--text);
  padding: 9px 18px; border-radius: 4px; transition: all .15s;
}
button:hover { border-color: var(--teal); color: var(--teal); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary { background: var(--teal); color: var(--bg); border-color: var(--teal); }
button.primary:hover { background: #7cd4fb; color: var(--bg); }
button.danger { border-color: var(--flagged); color: var(--flagged); }
.btn-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.status-msg { font-size: 13px; margin-top: 10px; min-height: 18px; }
.status-msg.ok  { color: var(--teal); }
.status-msg.err { color: var(--flagged); }

/* ─── List items ─── */
.list-item {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 16px;
  margin-bottom: 10px;
  background: var(--surface-2);
}
.list-item-head {
  display: flex; justify-content: space-between;
  align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.list-item-head h3 { font-family: var(--display); font-weight: 500; font-size: 1.05rem; }
.list-item p { font-size: 13.5px; color: var(--dim); margin-top: 6px; }
.list-item .actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.empty-state {
  color: var(--dimmer); font-size: 14px; padding: 20px; text-align: center;
  border: 1px dashed var(--line); border-radius: 6px;
}

/* ─── Message thread ─── */
.thread {
  max-height: 300px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 5px;
  padding: 14px; margin-bottom: 12px;
  background: var(--bg);
}
.message { margin-bottom: 12px; font-size: 13.5px; }
.message .meta { color: var(--dimmer); font-family: var(--mono); font-size: 11px; margin-bottom: 2px; }
.message img { max-width: 200px; border-radius: 4px; display: block; margin-top: 4px; }

/* ─── Tabs ─── */
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab {
  padding: 10px 4px; color: var(--dim); cursor: pointer;
  border-bottom: 2px solid transparent; font-size: 14px;
}
.tab.active { color: var(--teal); border-bottom-color: var(--teal); }

/* ─── Migration tool output ─── */
pre.json-output {
  background: var(--bg); border: 1px solid var(--line); border-radius: 5px;
  padding: 12px; font-family: var(--mono); font-size: 11.5px;
  color: var(--dim); overflow-x: auto; max-height: 300px; white-space: pre-wrap;
}
.warning-list { font-size: 12.5px; color: var(--conditional); margin-top: 8px; }
.warning-list li { margin-left: 18px; margin-bottom: 4px; }
