/* FuLeads — plain CSS, no frameworks, no CDNs. Same palette as the skeleton. */
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: grid; place-items: center;
  background: #0f0b1c; color: #f2eefc;
  font-family: system-ui, "Segoe UI", Tahoma, sans-serif;
}
body.wide { display: block; padding: 16px; }
main { width: min(92vw, 420px); padding: 24px; text-align: center; }
body.wide main { width: min(98vw, 1280px); text-align: right; }
.brand h1 { font-size: 40px; margin: 0 0 8px; }
body.wide .brand h1 { font-size: 26px; }
.brand p { color: #b9b0d6; margin: 0 0 24px; }
.brand.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

.card {
  background: #191331; border: 1px solid #2c2350; border-radius: 16px;
  padding: 24px; text-align: right; margin-top: 16px;
}
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab {
  flex: 1; padding: 10px; border: 1px solid #2c2350; border-radius: 10px;
  background: transparent; color: #b9b0d6; font-size: 15px; cursor: pointer;
}
.tab.active { background: #2c2350; color: #f2eefc; }

.form label { display: block; margin-bottom: 12px; font-size: 14px; color: #b9b0d6; }
.form input, .form select, .form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border-radius: 10px; border: 1px solid #2c2350; background: #0f0b1c;
  color: #f2eefc; font-size: 15px; font-family: inherit;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: #7c5cff; }

button.primary, button.ghost {
  width: 100%; padding: 12px; margin-top: 8px; border-radius: 10px;
  font-size: 15px; cursor: pointer; border: 1px solid transparent;
}
button.primary { background: #7c5cff; color: #fff; }
button.ghost { background: transparent; border-color: #2c2350; color: #b9b0d6; }

.note { font-size: 12.5px; color: #8f85b3; margin: 8px 0; }
.note.muted { text-align: center; }
.msg { min-height: 18px; font-size: 13px; margin: 4px 0; }
.msg.ok { color: #4fd1a5; }
.msg.bad, .error { color: #ff8f8f; }
.error.global { text-align: center; margin-top: 16px; min-height: 18px; font-size: 13.5px; }

.credits { margin: 20px 0 4px; }
.coins { display: block; font-size: 44px; font-weight: 700; color: #ffd166; }
.coins-label { color: #b9b0d6; font-size: 13px; }
.hello { font-size: 17px; margin: 0; }
.hidden { display: none !important; }

/* ── tables list ── */
.tables-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tables-head h2 { font-size: 18px; margin: 0; }
button.mini, a.mini {
  display: inline-block; padding: 7px 12px; border-radius: 9px; cursor: pointer;
  background: transparent; border: 1px solid #2c2350; color: #b9b0d6;
  font-size: 13.5px; text-decoration: none;
}
button.mini:hover, a.mini:hover { border-color: #7c5cff; color: #f2eefc; }
.tables-list { list-style: none; padding: 0; margin: 12px 0 0; }
.tables-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 12px; border: 1px solid #2c2350; border-radius: 10px; margin-bottom: 8px;
}
.tables-list a { color: #cfc4f5; text-decoration: none; font-size: 15px; }
.tables-list a:hover { color: #fff; text-decoration: underline; }
.tables-list .count { color: #8f85b3; font-size: 12.5px; }

/* ── table page ── */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.cfg { border: 1px dashed #2c2350; border-radius: 10px; padding: 10px 12px; margin-top: 6px; }
.vars { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: #8f85b3; }
button.chip {
  background: #2c2350; color: #cfc4f5; border: none; border-radius: 6px;
  padding: 3px 8px; font-family: monospace; font-size: 11.5px; cursor: pointer;
}
button.linklike { background: none; border: none; color: #7c5cff; cursor: pointer; font-size: 12.5px; text-decoration: underline; padding: 0; }

.grid-wrap {
  overflow: auto; max-height: 68vh; border: 1px solid #2c2350; border-radius: 12px;
  background: #14102a;
}
table.grid { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 13.5px; }
table.grid th, table.grid td {
  border-left: 1px solid #241c44; border-bottom: 1px solid #241c44;
  padding: 7px 10px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis;
}
table.grid thead th {
  position: sticky; top: 0; background: #191331; color: #b9b0d6; font-size: 12.5px; text-align: right;
}
.th-type {
  margin-right: 6px; background: #2c2350; color: #8f85b3; border-radius: 5px;
  padding: 1px 6px; font-size: 10.5px;
}
.th-del, .td-del { width: 34px; text-align: center; position: sticky; right: 0; background: #14102a; }
.td-plain { cursor: default; color: #e9e4f7; }
.td-plain:hover { background: #1c1638; }
.td-plain input {
  width: 100%; background: #0f0b1c; color: #f2eefc; border: 1px solid #7c5cff;
  border-radius: 6px; padding: 3px 6px; font-size: 13px;
}
.td-action { color: #cfc4f5; }
.cell-text { margin-right: 8px; }
button.del {
  background: none; border: none; color: #4a3f73; font-size: 15px; cursor: pointer; padding: 0 4px;
}
button.del:hover { color: #ff8f8f; }

.badge {
  display: inline-block; min-width: 52px; text-align: center; border-radius: 20px;
  padding: 2px 8px; font-size: 11px; font-weight: 600;
}
.s-idle { background: #241c44; color: #8f85b3; }
.s-pending { background: #3a3358; color: #cfc4f5; }
.s-running { background: #1d3a5f; color: #9ecbff; }
.s-done { background: #1d4638; color: #4fd1a5; }
.s-error { background: #52222c; color: #ff8f8f; }

/* ── run bar + run buttons ── */
.run-btn {
  margin-right: 6px; background: none; border: 1px solid #2c2350; color: #4fd1a5;
  border-radius: 6px; padding: 1px 7px; cursor: pointer; font-size: 11px;
}
.run-btn:hover { border-color: #4fd1a5; }
.runbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid #1d3a5f; background: #131d31; border-radius: 12px;
  padding: 10px 14px; margin: 12px 0; font-size: 13px; color: #9ecbff;
}
.runbar-track { flex: 1; min-width: 160px; height: 6px; background: #1d3a5f; border-radius: 6px; overflow: hidden; }
.runbar-fill { height: 100%; background: #4f9eff; width: 0; transition: width .25s; }
