/* ============================================================
   Fundraise Tap — Phase 2 Lo-Fi Wireframe kit
   Greyscale only. #F5F5F5 bg / #CCC borders / #333 text.
   A restrained muted-red is reserved for annotations only.
   ============================================================ */

:root {
  --wf-bg:            #F5F5F5;
  --wf-surface:       #FFFFFF;
  --wf-surface-2:     #ECECEC;
  --wf-border:        #CCCCCC;
  --wf-border-strong: #999999;
  --wf-text:          #333333;
  --wf-text-dim:      #777777;
  --wf-text-faint:    #AAAAAA;
  --wf-fill-dark:     #333333;
  --wf-fill-mid:      #E2E2E2;
  --wf-placeholder:   #DDDDDD;

  /* annotation accent — the only colour in the kit */
  --note:             #B0473A;
  --note-bg:          #F8EAE7;
  --note-border:      #E0B6AF;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --font: "Hanken Grotesk", "Helvetica Neue", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: var(--font);
  color: var(--wf-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { background: var(--wf-bg); }

/* ---------- generic wireframe primitives ---------- */

.wf-label {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--wf-text-dim);
  font-weight: 600;
}

.wf-h1 { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.wf-h2 { font-size: 19px; font-weight: 700; margin: 0; }
.wf-h3 { font-size: 15px; font-weight: 700; margin: 0; }
.wf-muted { color: var(--wf-text-dim); }
.wf-faint { color: var(--wf-text-faint); }
.wf-tag {
  display: inline-block; font-family: var(--mono);
  font-size: 11px; padding: 2px 7px; border: 1px solid var(--wf-border);
  border-radius: 999px; color: var(--wf-text-dim); background: var(--wf-surface);
}

/* button */
.wf-btn {
  font-family: var(--font);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--wf-border-strong);
  background: var(--wf-surface);
  color: var(--wf-text);
  border-radius: var(--r-md);
  padding: 11px 18px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: transform .04s ease, background .12s ease;
  text-decoration: none;
}
.wf-btn:active { transform: translateY(1px); }
.wf-btn.primary { background: var(--wf-fill-dark); color: #fff; border-color: var(--wf-fill-dark); }
.wf-btn.ghost   { background: transparent; border-style: dashed; }
.wf-btn.block   { width: 100%; }
.wf-btn.lg      { padding: 16px 22px; font-size: 16px; }

/* input */
.wf-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.wf-field > label { font-size: 12px; font-weight: 600; color: var(--wf-text); }
.wf-input {
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  border-radius: var(--r-sm);
  padding: 11px 12px;
  font-size: 14px; font-family: var(--font);
  color: var(--wf-text); width: 100%;
}
.wf-input::placeholder { color: var(--wf-text-faint); }
.wf-input:focus { outline: 2px solid var(--wf-border-strong); outline-offset: -1px; }
textarea.wf-input { resize: none; min-height: 78px; }

/* a generic placeholder box with the classic diagonal cross */
.wf-ph {
  position: relative; background: var(--wf-placeholder);
  border: 1px solid var(--wf-border); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--wf-text-dim); font-size: 11px; letter-spacing: .04em;
  overflow: hidden; text-align: center; padding: 6px;
}
.wf-ph.cross::before, .wf-ph.cross::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top right,
      transparent calc(50% - 0.5px), var(--wf-border) 50%,
      transparent calc(50% + 0.5px));
}
.wf-ph.cross::after { transform: scaleX(-1); }
.wf-ph span { position: relative; z-index: 1; background: var(--wf-placeholder); padding: 2px 6px; border-radius: 3px; }

/* icon chip — square box labelled [icon: name] */
.wf-icon {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px dashed var(--wf-border-strong); border-radius: var(--r-sm);
  font-family: var(--mono); font-size: 9px; color: var(--wf-text-dim);
  background: var(--wf-surface); width: 34px; height: 34px; flex: none; line-height: 1.05; text-align: center;
  overflow: hidden; word-break: break-all; padding: 2px;
}

/* card */
.wf-card { background: var(--wf-surface); border: 1px solid var(--wf-border); border-radius: var(--r-md); }

/* divider */
.wf-hr { height: 1px; background: var(--wf-border); border: 0; margin: 0; }

/* ---------- sticky-note annotation ---------- */
.note {
  position: relative;
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  border-left: 3px solid var(--note);
  color: #5d2620;
  border-radius: var(--r-sm);
  padding: 9px 11px;
  font-size: 12px; line-height: 1.45;
  max-width: 240px;
}
.note b { color: var(--note); }
.note .note-k {
  display: inline-block; font-family: var(--mono); font-size: 10px;
  color: var(--note); border: 1px solid var(--note-border); border-radius: 3px;
  padding: 0 5px; margin-bottom: 5px; letter-spacing: .04em;
}

/* connector line for canvas flows */
.flow-arrow { stroke: var(--wf-border-strong); stroke-width: 1.5; fill: none; }
.flow-arrow-head { fill: var(--wf-border-strong); }

/* ============================================================
   DEVICE BEZELS  (greyscale, clean — not glossy)
   ============================================================ */

/* iPhone 14 — 390x844 content */
.device-phone {
  width: 390px; height: 844px; flex: none;
  background: #2b2b2b;
  border-radius: 52px;
  padding: 13px;
  box-shadow: 0 1px 0 #555 inset, 0 18px 40px rgba(0,0,0,.16);
  position: relative;
}
.device-phone .screen {
  width: 100%; height: 100%; background: var(--wf-surface);
  border-radius: 40px; overflow: hidden; position: relative;
  display: flex; flex-direction: column;
}
.device-phone .notch {
  position: absolute; top: 13px; left: 50%; transform: translateX(-50%);
  width: 132px; height: 30px; background: #2b2b2b; border-radius: 0 0 18px 18px; z-index: 40;
}

/* Android tablet — 1280x800 landscape content */
.device-tablet {
  width: 1280px; height: 800px; flex: none;
  background: #2b2b2b; border-radius: 26px; padding: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.18); position: relative;
}
.device-tablet .screen {
  width: 100%; height: 100%; background: var(--wf-surface);
  border-radius: 10px; overflow: hidden; position: relative;
  display: flex; flex-direction: column;
}
.device-tablet .cam {
  position: absolute; top: 50%; left: 7px; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: #555;
}

/* mobile status bar (lo-fi) */
.statusbar {
  height: 44px; flex: none; display: flex; align-items: center;
  justify-content: space-between; padding: 0 22px 0 26px;
  font-size: 13px; font-weight: 600; color: var(--wf-text);
  padding-top: 8px;
}
.statusbar .sb-right { display: flex; gap: 5px; align-items: center; font-size: 11px; color: var(--wf-text-dim); }

/* mobile screen body */
.m-body { flex: 1; display: flex; flex-direction: column; overflow-y: auto; padding: 8px 22px 22px; }
.m-body::-webkit-scrollbar { width: 0; }
.home-indicator { height: 26px; flex: none; display: flex; align-items: flex-start; justify-content: center; padding-top: 8px; }
.home-indicator::after { content: ""; width: 128px; height: 5px; border-radius: 3px; background: var(--wf-text); opacity: .85; }

/* tablet variant body padding bigger */
.device-tablet .m-body { padding: 26px 60px 30px; }

/* ============================================================
   tickbox (inline-expanding) — James's #1 ask
   ============================================================ */
.tick {
  border: 1px solid var(--wf-border); border-radius: var(--r-md);
  background: var(--wf-surface); margin-bottom: 12px; overflow: hidden;
}
.tick-head {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  cursor: pointer; user-select: none;
}
.tick-box {
  width: 22px; height: 22px; flex: none; border: 1.5px solid var(--wf-border-strong);
  border-radius: 5px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff; background: var(--wf-surface);
}
.tick.on .tick-box { background: var(--wf-fill-dark); border-color: var(--wf-fill-dark); }
.tick-box::after { content: "✓"; opacity: 0; }
.tick.on .tick-box::after { opacity: 1; }
.tick-label { flex: 1; font-size: 14px; font-weight: 600; }
.tick-label .sub { display: block; font-size: 12px; font-weight: 400; color: var(--wf-text-dim); margin-top: 2px; }
.tick-amt { font-family: var(--mono); font-size: 13px; color: var(--wf-text-dim); }
.tick-info {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--wf-border-strong);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  color: var(--wf-text-dim); flex: none; cursor: help;
}
.tick-body { display: none; padding: 0 14px 14px 48px; border-top: 1px dashed var(--wf-border); padding-top: 14px; }
.tick.on .tick-body { display: block; }
.tick-legal {
  display: none; margin: 0 14px 12px 48px; font-size: 11px; line-height: 1.5;
  color: var(--wf-text-dim); background: var(--wf-surface-2); border-radius: var(--r-sm); padding: 8px 10px;
}
.tick.show-info .tick-legal { display: block; }

/* preset amount chips */
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chip {
  border: 1px solid var(--wf-border); background: var(--wf-surface); border-radius: var(--r-md);
  padding: 16px 0; text-align: center; font-size: 18px; font-weight: 700; cursor: pointer;
}
.chip.sel { background: var(--wf-fill-dark); color: #fff; border-color: var(--wf-fill-dark); }

/* once/monthly segmented */
.seg { display: flex; border: 1px solid var(--wf-border); border-radius: 999px; padding: 4px; background: var(--wf-surface-2); }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 9px 0; border-radius: 999px;
  font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--wf-text-dim); cursor: pointer;
}
.seg button.on { background: var(--wf-surface); color: var(--wf-text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* context bar (sponsor / in-memory header) */
.ctx-bar {
  background: var(--wf-surface-2); border: 1px solid var(--wf-border);
  border-radius: var(--r-sm); padding: 10px 12px; font-size: 13px; color: var(--wf-text-dim);
}
.ctx-bar b { color: var(--wf-text); }

/* variant switcher (shows alternative wireframe approaches) */
.variant-switch {
  display: flex; gap: 4px; padding: 3px; border: 1px dashed var(--note-border);
  background: var(--note-bg); border-radius: 999px; align-self: flex-start;
}
.variant-switch button {
  border: 0; background: transparent; font-family: var(--font); font-size: 11px; font-weight: 600;
  color: var(--note); padding: 5px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.variant-switch button.on { background: var(--note); color: #fff; }

/* stepper dots */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wf-border); }
.dot.on { background: var(--wf-text); }

/* NFC pulse zone (static lo-fi) */
.nfc {
  width: 180px; height: 180px; border-radius: 50%; border: 2px dashed var(--wf-border-strong);
  display: flex; align-items: center; justify-content: center; margin: 8px auto;
  position: relative; color: var(--wf-text-dim);
}
.nfc::before { content: ""; position: absolute; inset: 22px; border: 2px dashed var(--wf-border); border-radius: 50%; }

/* spinner (static ring, lo-fi) */
.spin { width: 64px; height: 64px; border-radius: 50%; border: 5px solid var(--wf-border); border-top-color: var(--wf-text); margin: 0 auto; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

/* ============================================================
   DESKTOP ADMIN SHELL  (1440x900 frames)
   ============================================================ */
.admin {
  width: 1440px; height: 900px; flex: none; background: var(--wf-surface);
  display: grid; grid-template-columns: 232px 1fr; grid-template-rows: 58px 1fr;
  grid-template-areas: "brand topbar" "nav main";
  border: 1px solid var(--wf-border); border-radius: 10px; overflow: hidden;
}
.admin-brand {
  grid-area: brand; border-right: 1px solid var(--wf-border); border-bottom: 1px solid var(--wf-border);
  display: flex; align-items: center; gap: 10px; padding: 0 18px; font-weight: 700; font-size: 14px;
}
.admin-top {
  grid-area: topbar; border-bottom: 1px solid var(--wf-border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.admin-nav { grid-area: nav; border-right: 1px solid var(--wf-border); padding: 12px 10px; overflow-y: auto; background: var(--wf-bg); }
.admin-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; color: var(--wf-text-dim); text-decoration: none; margin-bottom: 2px; cursor: pointer;
}
.admin-nav a .wf-icon { width: 24px; height: 24px; font-size: 8px; }
.admin-nav a.on { background: var(--wf-surface); color: var(--wf-text); border: 1px solid var(--wf-border); }
.admin-nav a:hover { color: var(--wf-text); }
.admin-main { grid-area: main; overflow-y: auto; padding: 28px 32px; background: var(--wf-surface); }
.admin-section-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--wf-text-faint); padding: 14px 12px 6px; }

/* KPI cards */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { padding: 18px; }
.kpi .kpi-label { font-size: 12px; color: var(--wf-text-dim); font-weight: 600; margin-bottom: 10px; }
.kpi .kpi-val { font-size: 28px; font-weight: 700; font-family: var(--mono); }
.kpi .kpi-sub { font-size: 11px; color: var(--wf-text-faint); margin-top: 6px; }

/* table */
.wf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wf-table th { text-align: left; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--wf-text-dim); padding: 10px 12px; border-bottom: 1px solid var(--wf-border); font-weight: 700; }
.wf-table td { padding: 12px; border-bottom: 1px solid var(--wf-border); }
.wf-table tr.clickable { cursor: pointer; }
.wf-table tr.clickable:hover td { background: var(--wf-bg); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--wf-border); margin-bottom: 20px; }
.tabs .tab { padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--wf-text-dim); border-bottom: 2px solid transparent; cursor: pointer; }
.tabs .tab.on { color: var(--wf-text); border-bottom-color: var(--wf-text); }

/* status pill */
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--wf-border-strong); color: var(--wf-text-dim); }

/* integration / connection card */
.conn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.conn { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.conn .conn-top { display: flex; align-items: center; gap: 10px; }

/* small util */
.row { display: flex; gap: 14px; }
.col { display: flex; flex-direction: column; }
.between { display: flex; align-items: center; justify-content: space-between; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; } .gap24 { gap: 24px; }
.mt8{margin-top:8px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mt24{margin-top:24px}.mb0{margin-bottom:0}
.grow { flex: 1; }
.center { align-items: center; }
.wrap { flex-wrap: wrap; }
