/* partner.squarekeeper.com — the referral partner's door. The suite's light theme
   (the portals' tokens): green brand, white cards, WHITE text on the #0A8A06 fill. */
:root {
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #475569;
  --border: #E2E8F0;
  --green: #0A7504;          /* text on white: 6.0:1 */
  --fill: #0A8A06;           /* button fill, white text 4.5:1 */
  --fill-hover: #087305;
  --soft: rgba(10, 156, 7, 0.10);
  --warn-bg: #FEF3C7;
  --warn-text: #92400E;
  --b1: #7C8BA1;             /* sign-ups (3.5:1 on white: a chart mark needs 3:1) */
  --b2: #22A51C;             /* confirmed */
  --b3: #075802;             /* paid */
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.5; }
a { color: var(--green); }
[hidden] { display: none !important; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand .sub { font-weight: 500; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 4px 10px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--fill); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; border: 1px solid var(--fill); background: var(--fill); color: #fff; font: inherit; font-weight: 700; padding: 10px 16px; cursor: pointer; }
.btn:hover { background: var(--fill-hover); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.ghost { background: transparent; color: var(--green); border-color: var(--border); padding: 6px 12px; font-size: 13px; }
.btn.ghost:hover { border-color: var(--green); background: var(--soft); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--fill); outline-offset: 2px; }
main { max-width: 1120px; margin: 0 auto; padding: 20px 16px 40px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* login */
.auth-wrap { display: flex; justify-content: center; padding: 40px 16px; }
.auth-card { width: min(420px, 100%); background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 28px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06); }
.auth-card h1 { font-size: 22px; margin: 0 0 6px; }
.auth-card p.sub { margin: 0 0 18px; color: var(--muted); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.field input { width: 100%; padding: 11px 12px; font: inherit; border: 1px solid #CBD5E1; border-radius: 8px; background: #fff; color: var(--text); }
.auth-card .btn { width: 100%; }
.auth-meta { margin: 14px 0 0; text-align: center; font-size: 14px; }
.msg { border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.msg.err { background: #FEE2E2; color: #991B1B; }
.msg.info { background: var(--soft); color: #064E03; }

/* dashboard */
.banner { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.banner.warn { background: var(--warn-bg); color: var(--warn-text); }
.hero-card { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; margin-bottom: 16px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.big-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 34px; font-weight: 800; letter-spacing: 0.06em; color: var(--green); }
.deal-lines { margin: 0; padding-left: 18px; }
.deal-lines li { margin: 4px 0; }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.tile.accent { border-color: var(--fill); background: var(--soft); }
.tile-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.tile-value { font-size: 26px; font-weight: 800; line-height: 1.2; margin: 4px 0; }
.tile-sub { font-size: 12px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.card h2 { font-size: 17px; margin: 0 0 10px; }
.card h3 { font-size: 15px; margin: 16px 0 4px; }
.chart svg { width: 100%; height: 170px; display: block; }
.chart rect.b1 { fill: var(--b1); } .chart rect.b2 { fill: var(--b2); } .chart rect.b3 { fill: var(--b3); }
.chart .axis { stroke: var(--border); }
.chart .tick { font-size: 10px; fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend i.b1 { background: var(--b1); } .legend i.b2 { background: var(--b2); } .legend i.b3 { background: var(--b3); }
.legend .legend-max { margin-left: auto; }
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.deal { border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.deal-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.deal p { margin: 8px 0; }
.deal-meta { font-size: 13px; color: var(--muted); }
.deal-nums { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 14px; }
.pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: var(--soft); color: #064E03; }
.pill.ended { background: #F1F5F9; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); border-bottom: 1px solid var(--border); padding: 8px 10px; }
td { border-bottom: 1px solid var(--border); padding: 8px 10px; }
.st { font-weight: 600; }
.st.paid { color: var(--green); } .st.held { color: var(--warn-text); } .st.lost { color: var(--muted); }
.kit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.kit-line { margin-bottom: 12px; }
.kit-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.kit-row { display: flex; gap: 8px; align-items: flex-start; }
.kit-value { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 13px; overflow-wrap: anywhere; }
.assets { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.assets img { display: block; }
.updated { text-align: center; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px 16px 30px; }
.code-switch { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.code-switch select { font: inherit; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .kit-grid { grid-template-columns: 1fr; }
  .hero-card { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 520px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .big-code { font-size: 28px; }
  .brand .sub { display: none; }
  .tile-value { font-size: 22px; }
}
