/* Jeffway AI Digital Worker — shared theme */
:root {
  --ink: #0f172a;
  --ink-soft: #475569;
  --line: #e2e8f0;
  --bg: #f1f5f9;
  --panel: #ffffff;
  --brand: #1d4ed8;
  --brand-dark: #1e3a8a;
  --accent: #f59e0b;
  --good: #16a34a;
  --good-bg: #dcfce7;
  --warn: #d97706;
  --warn-bg: #fef3c7;
  --bad: #dc2626;
  --bad-bg: #fee2e2;
  --info-bg: #dbeafe;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--brand); text-decoration: none; }
h1,h2,h3 { margin: 0 0 .4em; line-height: 1.25; }
code, .mono { font-family: var(--mono); }

/* Header */
.appbar {
  background: linear-gradient(120deg, var(--brand-dark), var(--brand));
  color: #fff; padding: 14px 22px; display: flex; align-items: center; gap: 18px;
  box-shadow: var(--shadow); position: sticky; top: 0; z-index: 20;
}
.appbar .logo {
  width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.15);
  display: grid; place-items: center; font-weight: 800; font-size: 18px;
}
.appbar h1 { font-size: 17px; margin: 0; }
.appbar .sub { font-size: 12.5px; opacity: .85; }
.appbar .spacer { flex: 1; }
.appbar .badge {
  font-size: 11px; background: rgba(255,255,255,.16); padding: 4px 10px;
  border-radius: 999px; letter-spacing: .3px;
}

/* Module nav */
.modnav { display: flex; gap: 6px; background: var(--brand-dark); padding: 8px 18px;
  overflow-x: auto; position: sticky; top: 68px; z-index: 19; }
.modnav a {
  color: #cbd5e1; font-size: 13px; padding: 6px 12px; border-radius: 8px;
  white-space: nowrap; display: flex; align-items: center; gap: 7px;
}
.modnav a .n {
  width: 20px; height: 20px; border-radius: 6px; background: rgba(255,255,255,.12);
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.modnav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.modnav a.active { background: #fff; color: var(--brand-dark); font-weight: 600; }
.modnav a.active .n { background: var(--brand); color: #fff; }
.modnav a.soon { opacity: .6; }
.modnav a.soon .n::after { content: ""; }

/* Layout */
.wrap { max-width: 1200px; margin: 22px auto; padding: 0 20px 60px;
  display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.wrap.single { grid-template-columns: 1fr; }
.col { display: flex; flex-direction: column; gap: 18px; }

.card { background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card > header { padding: 13px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; }
.card > header h2 { font-size: 15px; margin: 0; }
.card > header .step { font-size: 11px; color: var(--ink-soft);
  background: var(--bg); padding: 3px 8px; border-radius: 6px; }
.card .body { padding: 16px; }
.card .body.tight { padding: 0; }

/* Buttons */
button, .btn {
  font: inherit; cursor: pointer; text-decoration: none; display: inline-block; border: 1px solid var(--brand);
  background: var(--brand); color: #fff; padding: 9px 15px; border-radius: 9px;
  font-weight: 600; font-size: 14px; transition: filter .12s, background .12s;
}
button:hover, .btn:hover { filter: brightness(1.07); }
button:disabled { opacity: .5; cursor: not-allowed; filter: none; }
button.ghost, .btn.ghost { background: #fff; color: var(--brand); }
button.soft, .btn.soft { background: var(--bg); color: var(--ink); border-color: var(--line); }
button.good, .btn.good { background: var(--good); border-color: var(--good); }
button.small, .btn.small { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Fields */
label.field { display: block; font-size: 12px; color: var(--ink-soft);
  margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
input, select, textarea {
  font: inherit; width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--info-bg); border-color: var(--brand); }

/* Tables */
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .3px;
  color: var(--ink-soft); background: #fafbfc; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #f8fafc; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px;
  font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.grey { background: var(--bg); color: var(--ink-soft); }
.pill.blue { background: var(--info-bg); color: var(--brand-dark); }
.pill.amber { background: var(--warn-bg); color: var(--warn); }
.pill.green { background: var(--good-bg); color: var(--good); }
.pill.red { background: var(--bad-bg); color: var(--bad); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Key/value */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; font-weight: 500; }

/* Notices */
.note { padding: 11px 13px; border-radius: 9px; font-size: 13px; border: 1px solid transparent; }
.note.info { background: var(--info-bg); border-color: #bfdbfe; color: var(--brand-dark); }
.note.good { background: var(--good-bg); border-color: #bbf7d0; color: #15803d; }
.note.warn { background: var(--warn-bg); border-color: #fde68a; color: #92400e; }
.note.bad  { background: var(--bad-bg); border-color: #fecaca; color: #991b1b; }

.muted { color: var(--ink-soft); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }
.center { text-align: center; }

/* Tracker strip / outbox side cards */
.tracker-item, .outbox-item { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tracker-item:last-child, .outbox-item:last-child { border-bottom: 0; }
.tracker-item .addr { font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.timeline li { padding: 6px 0 6px 16px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 10px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.timeline .t { color: var(--ink-soft); font-size: 11px; }

/* Stepper */
.stepper { display: flex; gap: 4px; margin: 0 0 6px; flex-wrap: wrap; }
.stepper .s { font-size: 11px; padding: 4px 9px; border-radius: 999px;
  background: var(--bg); color: var(--ink-soft); }
.stepper .s.done { background: var(--good-bg); color: var(--good); }
.stepper .s.active { background: var(--brand); color: #fff; }

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid #fff;
  border-top-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

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