/* Campus Ambassador — shares the palette of public-referrals/styles.css so the
   two funnels feel like one product. */

:root {
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #0f4c81;
    --brand-soft: #eff6ff;
    --sky: #6cb4ee;
    --amber: #f59e0b;
    --amber-soft: #fef3c7;
    --green: #047857;
    --green-soft: #ecfdf5;
    --danger: #dc2626;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
    background:
        radial-gradient(1200px 600px at 80% -10%, #e0f2fe 0%, transparent 60%),
        #eef2f7;
    color: var(--ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.shell { max-width: 1080px; margin: 0 auto; padding: 20px 18px 64px; }

/* ── top bar ── */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 6px 0 22px;
}
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.brand span:first-child { color: var(--brand); }
.brand span:last-child { color: var(--sky); }
.pill {
    background: var(--amber-soft); color: #92400e;
    font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    padding: 6px 12px; border-radius: 999px;
}
.who { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); }
.who img { width: 30px; height: 30px; border-radius: 50%; }
.linkish {
    background: none; border: 0; color: var(--muted); font: inherit;
    font-size: .82rem; cursor: pointer; text-decoration: underline;
}

/* ── cards ── */
.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card h2 { font-size: 1.05rem; letter-spacing: -.01em; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: .86rem; line-height: 1.5; }

.center-card { max-width: 460px; margin: 6vh auto 0; text-align: center; }
.center-card .card-icon { font-size: 2.4rem; margin-bottom: 10px; }
.center-card h1 { font-size: 1.5rem; letter-spacing: -.02em; margin-bottom: 8px; }
.center-card p { color: var(--muted); font-size: .92rem; line-height: 1.6; }

/* ── buttons ── */
button.primary, a.primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 13px 18px; border: 0; border-radius: 12px;
    background: var(--brand); color: #fff; font: inherit; font-weight: 700;
    font-size: .95rem; cursor: pointer; text-decoration: none;
    transition: transform .12s ease, opacity .12s ease;
}
button.primary:hover:not(:disabled) { transform: translateY(-1px); }
button.primary:disabled { opacity: .55; cursor: not-allowed; }
button.ghost {
    width: 100%; padding: 12px 18px; border: 1px solid var(--line); border-radius: 12px;
    background: #fff; color: var(--ink); font: inherit; font-weight: 700;
    font-size: .9rem; cursor: pointer;
}
button.ghost:disabled { opacity: .55; cursor: not-allowed; }

input[type="text"], input[type="tel"] {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line);
    border-radius: 12px; font: inherit; font-size: .95rem; background: #fff;
}
input:focus { outline: 2px solid var(--sky); outline-offset: 1px; border-color: var(--sky); }
label { display: block; font-size: .82rem; font-weight: 700; margin: 0 0 6px; }
.field + .field { margin-top: 14px; }

.status { font-size: .85rem; color: var(--muted); min-height: 1.2em; margin-top: 12px; line-height: 1.5; }
.status.error { color: var(--danger); }

/* ── wallet ── */
.wallet {
    background: linear-gradient(135deg, #0f4c81 0%, #14639f 55%, #1d7fc4 100%);
    color: #fff; border: 0;
}
.wallet .sub, .wallet .who { color: rgba(255, 255, 255, .78); }
.wallet-top { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; justify-content: space-between; }
.wallet-amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.wallet-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; opacity: .8; margin-bottom: 6px; }
.wallet-split { display: flex; gap: 22px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .18); }
.wallet-split div span { display: block; font-size: .72rem; opacity: .8; text-transform: uppercase; letter-spacing: .05em; }
.wallet-split div strong { font-size: 1.05rem; font-weight: 700; }
.wallet button.primary { background: #fff; color: var(--brand); width: auto; padding: 11px 20px; }

/* ── stats ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat {
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 16px; box-shadow: var(--shadow);
}
.stat strong { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: .78rem; color: var(--muted); font-weight: 600; }

/* ── share link ── */
.linkbox {
    display: flex; gap: 8px; align-items: stretch; margin-top: 12px;
    background: var(--brand-soft); border: 1px solid #dbeafe; border-radius: 12px; padding: 8px;
}
.linkbox code {
    flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap;
    font-size: .84rem; padding: 8px 10px; color: var(--brand); font-weight: 600;
}
.linkbox button {
    flex: 0 0 auto; border: 0; border-radius: 9px; background: var(--brand); color: #fff;
    font: inherit; font-weight: 700; font-size: .82rem; padding: 8px 16px; cursor: pointer;
}
.code-chip {
    display: inline-block; font-size: 1.5rem; font-weight: 800; letter-spacing: .1em;
    background: var(--amber-soft); color: #92400e; padding: 8px 18px; border-radius: 12px;
    margin-top: 10px;
}

/* ── tables / lists ── */
.rows { margin-top: 14px; }
.row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 0; border-top: 1px solid var(--line); font-size: .88rem;
}
.row:first-child { border-top: 0; }
.row .meta { color: var(--muted); font-size: .78rem; }
.row strong { font-weight: 700; }
.tag {
    font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
    padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.tag.pending { background: var(--amber-soft); color: #92400e; }
.tag.available { background: var(--green-soft); color: var(--green); }
.tag.paid { background: #e2e8f0; color: #475569; }
.tag.reversed { background: #fee2e2; color: var(--danger); }
.tag.signup { background: #e2e8f0; color: #475569; }
.tag.onboarded { background: #e0f2fe; color: #075985; }
.tag.installed { background: var(--brand-soft); color: var(--brand); }
.tag.converted { background: var(--green-soft); color: var(--green); }
.empty { color: var(--muted); font-size: .86rem; padding: 18px 0; text-align: center; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 720px) {
    .grid-2 { grid-template-columns: 1fr; }
    .wallet-amount { font-size: 2.1rem; }
    .shell { padding: 16px 14px 48px; }
}

/* ── footnote ── */
.note {
    margin-top: 14px; padding: 12px 14px; background: #f8fafc;
    border: 1px solid var(--line); border-radius: 12px;
    font-size: .8rem; color: var(--muted); line-height: 1.55;
}

/* ── ambassador tier ladder ── */
.tier-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tier-name { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; margin-top: 2px; }
.tier-rate {
    background: var(--green-soft); color: var(--green); font-weight: 800;
    font-size: 1.05rem; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
}
.tier-bar {
    margin-top: 16px; height: 8px; border-radius: 999px;
    background: var(--line); overflow: hidden;
}
.tier-fill {
    height: 100%; width: 0; border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--sky));
    transition: width .5s ease;
}
.tier-ladder { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.tier-step {
    flex: 1 1 120px; border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 12px; font-size: .8rem; color: var(--muted);
}
.tier-step strong { display: block; color: var(--ink); font-size: .88rem; }
.tier-step.is-current { border-color: var(--brand); background: var(--brand-soft); }
.tier-step.is-current strong { color: var(--brand); }
.tier-step.is-done { background: var(--green-soft); border-color: transparent; }
