/* W2S AI web report — Chad-style dark theme (matches the desktop revamp) */
:root {
  --bg: #0A0F0D;
  --panel: #101613;
  --panel2: #161F19;
  --border: #1E2B23;
  --green: #2EE47B;
  --green-hi: #6BF5A6;
  --green-dim: #1f8f52;
  --text: #E9F5EE;
  --dim: #8CA396;
  --red: #F0525F;
  --amber: #E8A83B;
  --blue: #4B8DF8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 500px at 70% -200px, rgba(46,228,123,.055), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 14px/1.45 "Segoe UI", -apple-system, system-ui, sans-serif;
  min-height: 100vh;
}
.hidden { display: none !important; }
.mono { font-family: "Consolas", "SF Mono", monospace; font-size: 12px; }
.dim { color: var(--dim); }

/* ------------------------------------------------------------- branding */
.brand { display: flex; align-items: center; gap: 10px; }
.logo-tile {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; color: #041F10;
  background: linear-gradient(180deg, var(--green-hi), #17A356);
  box-shadow: 0 0 18px rgba(46,228,123,.25);
}
.brand-name { font-weight: 700; font-size: 15px; }
.brand-sub { color: var(--dim); }

/* ----------------------------------------------------------------- auth */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card {
  width: 100%; max-width: 380px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 16px; padding: 28px;
}
.auth-card .brand { margin-bottom: 22px; }
.auth-card label { display: block; color: var(--dim); font-size: 12px; margin: 12px 0 5px; }
.auth-card input {
  width: 100%; background: var(--panel2); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px;
  font-size: 14px; outline: none;
}
.auth-card input:focus { border-color: var(--green-dim); }

/* -------------------------------------------------------------- buttons */
.btn {
  border: 1px solid var(--border); background: var(--panel2); color: var(--text);
  border-radius: 9px; padding: 9px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .12s, border-color .12s;
}
.btn:hover { background: #1D2921; }
.btn.primary {
  background: linear-gradient(180deg, var(--green), #1fbd63);
  border-color: var(--green-dim); color: #04220F;
}
.btn.primary:hover { background: linear-gradient(180deg, var(--green-hi), var(--green)); }
.btn.link { background: none; border: none; color: var(--dim); font-weight: 400; }
.btn.link:hover { color: var(--green); background: none; }
.btn.small { padding: 6px 12px; font-size: 12px; }
.btn.wide { width: 100%; margin-top: 14px; }
.btn.copy { font-family: "Consolas", monospace; font-size: 11px; padding: 4px 10px; }
.err { color: var(--red); font-size: 12px; margin-top: 10px; }
.note { color: var(--green); font-size: 12px; margin-top: 10px; }

/* --------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: rgba(10,15,13,.85);
  border-bottom: 1px solid var(--border); backdrop-filter: blur(10px);
}
.top-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pick {
  background: var(--panel2); color: var(--green); font-weight: 600;
  border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px;
}

/* ---------------------------------------------------------------- cards */
main { max-width: 1060px; margin: 0 auto; padding: 18px 20px 60px; }
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px; margin-top: 14px;
}
.card h2 {
  font-size: 13px; font-weight: 700; letter-spacing: .4px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.card h2 .cdot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.card h2 .tag { color: var(--dim); font-weight: 400; font-size: 11px; }

/* health chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 7px;
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: default;
}
.chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.green { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,.6); }
.dot.yellow { background: var(--amber); }
.dot.red { background: var(--red); box-shadow: 0 0 8px rgba(240,82,95,.6); }
.dot.gray { background: #6b7280; }

/* pacing grid */
.pace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.pace-cell {
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px;
}
.pace-cell .amt { font-size: 17px; font-weight: 700; color: var(--green); }
.pace-cell .lbl { font-size: 11px; color: var(--dim); margin-top: 2px; }
.pace-total .amt { color: var(--green-hi); }

/* account blocks + flag rows */
.acct {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel2); border-radius: 9px; padding: 8px 12px;
  margin: 12px 0 6px; flex-wrap: wrap; gap: 8px;
}
.acct .name { color: var(--green); font-weight: 700; font-size: 12.5px; }
.row {
  display: flex; align-items: baseline; gap: 10px; padding: 7px 6px;
  border-bottom: 1px solid rgba(30,43,35,.55); flex-wrap: wrap;
}
.row:last-child { border-bottom: none; }
.row .adset { font-family: "Consolas", monospace; font-size: 12px; word-break: break-all; }
.row .stats { color: var(--dim); font-size: 11.5px; white-space: nowrap; }
.row .rule { color: var(--amber); font-size: 11px; font-style: italic; }
.new-badge {
  background: rgba(46,228,123,.15); color: var(--green);
  font-size: 10px; font-weight: 700; border-radius: 5px; padding: 1px 6px;
}
.summary-text { color: var(--text); font-size: 13.5px; white-space: pre-wrap; }
.empty { color: var(--dim); font-size: 13px; padding: 6px; }

/* toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--green-dim);
  color: var(--green); border-radius: 999px; padding: 9px 20px;
  font-size: 13px; font-weight: 600; z-index: 20;
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
}
.foot { max-width: 1060px; margin: 0 auto; padding: 0 20px 30px; font-size: 11px; }

/* settings modal */
.modal-wrap {
  position: fixed; inset: 0; z-index: 30; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(4, 8, 6, .72); backdrop-filter: blur(3px);
}
.modal {
  width: 100%; max-width: 440px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 16px; padding: 24px;
}
.modal h2 {
  font-size: 13px; font-weight: 700; letter-spacing: .4px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.modal h2 .cdot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.modal h2 .tag { color: var(--dim); font-weight: 400; font-size: 11px; }
.modal label { display: block; color: var(--dim); font-size: 12px; margin: 12px 0 5px; }
.modal input, .modal select {
  width: 100%; background: var(--panel2); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px;
  font-size: 14px; outline: none;
}
.modal input:focus, .modal select:focus { border-color: var(--green-dim); }
.modal .two { display: flex; gap: 12px; }
.modal .two > div { flex: 1; }
.modal .switch-line {
  display: flex; align-items: center; gap: 9px; color: var(--text);
  font-size: 13px; margin-top: 14px; cursor: pointer;
}
.modal .switch-line input { width: auto; accent-color: var(--green); transform: scale(1.25); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

@media (max-width: 640px) {
  .topbar { padding: 10px 12px; }
  main { padding: 12px 12px 50px; }
  .row .stats { white-space: normal; }
}
