/* FlowApprove design system: one accent (teal) + slate neutrals. No gradients. */
:root {
  --accent: #0f766e;
  --accent-dark: #115e59;
  --accent-soft: #e6f4f2;
  --ink: #1e293b;
  --ink-soft: #475569;
  --muted: #94a3b8;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --ok: #15803d;
  --ok-soft: #e8f5ec;
  --warn: #b45309;
  --warn-soft: #fef3e2;
  --bad: #b91c1c;
  --bad-soft: #fdecec;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; }
.nav { display: flex; gap: 4px; margin-left: 8px; overflow-x: auto; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.nav a:hover { background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; }
.nav a.active { background: var(--accent); color: #fff; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bell { position: relative; display: inline-flex; padding: 8px; border-radius: 8px; color: var(--ink-soft); }
.bell:hover { background: var(--accent-soft); }
.bell .dot { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--bad); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.userchip { font-size: 13px; color: var(--ink-soft); }
.role { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; background: var(--accent-soft); color: var(--accent-dark);
  border-radius: 20px; padding: 2px 9px; margin-left: 6px; vertical-align: 2px; }

main { padding: 28px 0 60px; }
.pagehead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.pagehead h1 { margin: 0; font-size: 26px; letter-spacing: -.01em; }
.pagehead p { margin: 4px 0 0; color: var(--ink-soft); }

/* ---------- cards, grids ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.stat .num { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.stat .lbl { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-soft); background: #f1f5f9; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8fafc; }

/* ---------- badges / pills ---------- */
.pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 20px; padding: 3px 10px; }
.pill.pending { background: #eef2ff; color: #3730a3; }
.pill.approved, .pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.rejected, .pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.escalated, .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--accent-soft); color: var(--accent-dark); }
.sla { font-size: 12px; font-weight: 700; }
.sla.ok { color: var(--ok); } .sla.warning { color: var(--warn); } .sla.breached { color: var(--bad); }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.ferr { color: var(--bad); font-size: 13px; margin-top: 4px; font-weight: 600; }
.form-error { background: var(--bad-soft); border: 1px solid #f3c2c2; color: var(--bad);
  border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
  border-radius: 8px; padding: 10px 18px; font-size: 15px; font-weight: 700; font-family: inherit;
  background: var(--accent); color: #fff; }
.btn:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: #f1f5f9; color: var(--ink); }
.btn.danger { background: var(--bad); } .btn.danger:hover { background: #991b1b; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.block { width: 100%; justify-content: center; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.linkbtn { background: none; border: none; color: var(--bad); cursor: pointer; font-size: 13px; padding: 0; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- flashes ---------- */
.flash { border-radius: 8px; padding: 11px 15px; margin-bottom: 16px; font-weight: 600; }
.flash.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #bfe6cc; }
.flash.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid #f0d9ae; }

/* ---------- slack-style card ---------- */
.slack-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 8px; padding: 16px; max-width: 560px; box-shadow: var(--shadow); }
.slack-card .app { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: 6px; }
.slack-card .title { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.slack-card .kv { display: grid; grid-template-columns: 150px 1fr; gap: 4px 10px; font-size: 14px;
  margin: 10px 0; }
.slack-card .kv dt { color: var(--ink-soft); } .slack-card .kv dd { margin: 0; font-weight: 600; }
.slack-actions { display: flex; gap: 10px; margin-top: 12px; }
.simtag { display: inline-block; background: var(--warn-soft); color: var(--warn); font-size: 11px;
  font-weight: 800; text-transform: uppercase; letter-spacing: .05em; border-radius: 4px;
  padding: 2px 8px; margin-bottom: 10px; }

/* ---------- onboarding wizard ---------- */
.steps { display: flex; gap: 0; margin-bottom: 24px; }
.ostep { flex: 1; text-align: center; padding: 12px 6px; font-size: 13px; font-weight: 700;
  color: var(--muted); border-bottom: 3px solid var(--line); }
.ostep.done { color: var(--accent-dark); border-color: var(--accent); }
.ostep.now { color: var(--ink); border-color: var(--ink); }
.chainrow { display: grid; grid-template-columns: 1fr 1fr 1fr 90px 90px; gap: 10px;
  padding: 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; background: #fff; }
.chainrow .fld label { font-size: 11px; }

/* ---------- pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 28px 0; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 26px;
  display: flex; flex-direction: column; }
.price-card.popular { border: 2px solid var(--accent); position: relative; }
.price-card .flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 800;
  padding: 3px 14px; border-radius: 20px; text-transform: uppercase; letter-spacing: .04em; }
.price-card h3 { margin: 0; font-size: 19px; }
.price-card .amount { font-size: 38px; font-weight: 800; margin: 10px 0 2px; letter-spacing: -.02em; }
.price-card .per { color: var(--ink-soft); font-size: 14px; }
.price-card ul { list-style: none; padding: 0; margin: 16px 0 22px; flex: 1; }
.price-card > .btn { margin-top: auto; }
.price-card li { padding: 6px 0 6px 26px; position: relative; font-size: 14px; }
.price-card li svg { position: absolute; left: 0; top: 9px; }
.testbanner { background: var(--warn-soft); border: 2px dashed var(--warn); color: #7c3f06;
  border-radius: 10px; padding: 16px 20px; font-weight: 700; margin-bottom: 20px; }

/* ---------- misc ---------- */
.kv-table { display: grid; grid-template-columns: 190px 1fr; gap: 8px 14px; font-size: 14px; }
.kv-table dt { color: var(--ink-soft); } .kv-table dd { margin: 0; }
.timeline { border-left: 2px solid var(--line); margin: 8px 0 0 6px; padding-left: 18px; }
.timeline .ev { margin-bottom: 14px; position: relative; }
.timeline .ev::before { content: ""; position: absolute; left: -25px; top: 5px; width: 10px;
  height: 10px; border-radius: 50%; background: var(--accent); }
.comment { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px;
  margin-bottom: 10px; }
.comment .who { font-size: 12px; color: var(--ink-soft); font-weight: 700; margin-bottom: 4px; }
.muted { color: var(--ink-soft); } .small { font-size: 13px; }
.mt { margin-top: 18px; } .mb { margin-bottom: 18px; }
.icon { width: 18px; height: 18px; vertical-align: -3px; }
.empty { text-align: center; padding: 44px 20px; color: var(--ink-soft); }
.hero { text-align: center; padding: 56px 20px 40px; }
.hero h1 { font-size: 40px; letter-spacing: -.02em; margin: 0 0 12px; }
.hero p { font-size: 18px; color: var(--ink-soft); max-width: 640px; margin: 0 auto 24px; }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 36px 0; }
.feat .card .icon { width: 26px; height: 26px; color: var(--accent); }
.footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--ink-soft); font-size: 13px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.audit-action { font-family: ui-monospace, monospace; font-size: 12px; background: #f1f5f9;
  border-radius: 4px; padding: 2px 6px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .price-grid, .feat { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .chainrow { grid-template-columns: 1fr 1fr; }
  .topbar-inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
  .nav { order: 3; width: 100%; margin-left: 0; }
  .hero h1 { font-size: 30px; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 2px solid var(--line); margin-bottom: 4px; }
  .table td { border-bottom: 1px dotted var(--line); padding: 8px 12px; }
  .table td::before { content: attr(data-label); display: block; font-size: 11px;
    text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
  .kv-table { grid-template-columns: 1fr; }
  .slack-card .kv { grid-template-columns: 1fr; }
}
