/* Creator dashboard (ambassador kind "influencer"). Scoped under .cr so the campus
   ambassador page is untouched. Same brand navy; a calmer, creator-first layout. */
.cr {
    --cr-ink: #0f172a; --cr-muted: #64748b; --cr-line: #e2e8f0; --cr-card: #ffffff;
    --cr-brand: #0f4c81; --cr-brand-2: #1d6fb8; --cr-glow: #6cb4ee;
    --cr-good: #047857; --cr-good-soft: #ecfdf5; --cr-amber: #b45309; --cr-amber-soft: #fef3c7;
    width: 100%; min-width: 0; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px;
}
.cr-hi { padding: 4px 2px 2px; }
.cr-eyebrow, .cr-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cr-muted); }
.cr-hi h1 { font-size: clamp(26px, 6vw, 32px); font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }

/* link hero */
.cr-link {
    color: #fff; border-radius: 22px; padding: 20px;
    background: radial-gradient(420px 220px at 100% 0%, rgba(108, 180, 238, .45), transparent 70%),
                linear-gradient(140deg, var(--cr-brand), #0b2f52);
    box-shadow: 0 14px 34px rgba(15, 76, 129, .28);
    display: flex; flex-direction: column; gap: 12px;
}
.cr-link .cr-label { color: rgba(255, 255, 255, .7); }
.cr-link-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cr-chip { font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); padding: 4px 10px; border-radius: 999px; }
.cr-link code { font: 700 clamp(17px, 4.6vw, 21px)/1.25 ui-monospace, "SF Mono", Menlo, monospace; word-break: break-all; letter-spacing: -.01em; }
.cr-link-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cr-link-btns button { border: 0; border-radius: 14px; padding: 13px; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; background: #fff; color: var(--cr-brand); }
.cr-link-btns .cr-ghost { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.cr-link .cr-foot { color: rgba(255, 255, 255, .72); }

/* stats */
.cr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cr-stat { background: var(--cr-card); border: 1px solid var(--cr-line); border-radius: 18px; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.cr-stat b { font-size: clamp(19px, 5.4vw, 28px); overflow-wrap: anywhere; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cr-stat span { font-size: 12.5px; color: var(--cr-muted); font-weight: 600; }
.cr-money b { color: var(--cr-good); }

/* cards */
.cr-card { background: var(--cr-card); border: 1px solid var(--cr-line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.cr-foot { font-size: 13px; color: var(--cr-muted); }
.cr-status { font-size: 13px; color: var(--cr-muted); min-height: 0; }
.cr-status:empty { display: none; }

/* rate ladder */
.cr-rate-big { font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--cr-brand); line-height: 1.1; margin-top: 2px; }
.cr-rate-big small { font-size: 14px; font-weight: 600; color: var(--cr-muted); letter-spacing: 0; }
.cr-ladder { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.cr-ladder span { text-align: center; font-size: 12.5px; font-weight: 700; padding: 7px 0; border-radius: 10px; background: #f1f5f9; color: #94a3b8; font-variant-numeric: tabular-nums; }
.cr-ladder span.done { background: #e0ecf8; color: var(--cr-brand); }
.cr-ladder span.now { background: var(--cr-brand); color: #fff; box-shadow: 0 4px 12px rgba(15, 76, 129, .3); }
.cr-bar { height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.cr-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--cr-brand-2), var(--cr-glow)); }

/* wallet */
.cr-wallet-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.cr-wallet-big { font-size: 36px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.cr-wallet-top button { border: 0; border-radius: 14px; padding: 12px 18px; font-family: inherit; font-size: 15px; font-weight: 700; background: var(--cr-good); color: #fff; cursor: pointer; white-space: nowrap; }
.cr-wallet-top button:disabled { background: #e2e8f0; color: #64748b; cursor: default; }
.cr-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cr-split div { background: #f8fafc; border-radius: 12px; padding: 10px 12px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 6px; min-width: 0; }
.cr-split span { font-size: 12.5px; color: var(--cr-muted); font-weight: 600; }
.cr-split b { font-variant-numeric: tabular-nums; }
.cr-upi { border-top: 1px solid var(--cr-line); padding-top: 12px; }
.cr-upi summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--cr-ink); list-style: none; }
.cr-upi summary::-webkit-details-marker { display: none; }
.cr-upi summary::after { content: "Edit"; float: right; color: var(--cr-brand); font-weight: 700; }
.cr-upi[open] summary::after { content: "Close"; }
.cr-mono { font-family: ui-monospace, Menlo, monospace; color: var(--cr-muted); }
.cr-upi-fields { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 10px; }
.cr-upi-fields input { border: 1px solid var(--cr-line); border-radius: 12px; padding: 11px 12px; font-family: inherit; font-size: 15px; min-width: 0; }
.cr-upi-fields input:focus { outline: 2px solid var(--cr-brand); outline-offset: 1px; border-color: transparent; }
.cr-upi-fields .cr-ghost { border: 1px solid var(--cr-line); background: #fff; border-radius: 12px; padding: 0 16px; font-weight: 700; font-family: inherit; cursor: pointer; }
@media (max-width: 520px) { .cr-upi-fields { grid-template-columns: 1fr; } .cr-upi-fields .cr-ghost { padding: 11px; } }

/* ledger */
.cr-ledger { display: flex; flex-direction: column; }
.cr-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--cr-line); }
.cr-row:first-child { border-top: 0; }
.cr-row b { display: block; font-size: 14.5px; }
.cr-row span { font-size: 12.5px; color: var(--cr-muted); }
.cr-amt { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--cr-good); display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.cr-amt.out { color: var(--cr-ink); }
.cr-tag { font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 999px; background: #f1f5f9; color: var(--cr-muted); }
.cr-tag.pending { background: var(--cr-amber-soft); color: var(--cr-amber); }
.cr-tag.available { background: var(--cr-good-soft); color: var(--cr-good); }
.cr-empty { font-size: 14px; color: var(--cr-muted); padding: 8px 0; }

.cr button:focus-visible, .cr summary:focus-visible { outline: 3px solid var(--cr-glow); outline-offset: 2px; }

.cr-card, .cr-link, .cr-stat { min-width: 0; }
.cr-row > div:first-child { min-width: 0; }

/* terms of use pop-up */
.tc-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px);
    display: flex; align-items: flex-end; justify-content: center; padding: 12px; animation: tc-in .25s ease-out; }
@media (min-width: 640px) { .tc-backdrop { align-items: center; } }
.tc-backdrop.tc-out { opacity: 0; transition: opacity .2s; }
.tc { width: 100%; max-width: 560px; max-height: calc(100dvh - 24px); background: #fff; color: #0f172a; border-radius: 24px;
    display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(15, 23, 42, .35); }
.tc-head { padding: 22px 22px 14px; background: radial-gradient(360px 160px at 100% 0%, rgba(108, 180, 238, .35), transparent 70%), linear-gradient(140deg, #0f4c81, #0b2f52); color: #fff; }
.tc-head .cr-eyebrow { color: rgba(255, 255, 255, .7); }
.tc-head h2 { font-size: clamp(21px, 5.4vw, 25px); font-weight: 800; letter-spacing: -.02em; margin-top: 4px; line-height: 1.15; text-wrap: balance; }
.tc-head p { margin-top: 6px; font-size: 14px; color: rgba(255, 255, 255, .8); }
.tc-body { overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.tc-points { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tc-points li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.tc-ic { width: 34px; height: 34px; border-radius: 10px; background: #eef4fb; display: grid; place-items: center; font-size: 17px; }
.tc-points b { display: block; font-size: 14.5px; }
.tc-points span { font-size: 13.5px; color: #64748b; }
.tc-full { border: 1px solid #e2e8f0; border-radius: 14px; }
.tc-full summary { cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 14px; color: #0f4c81; list-style: none; }
.tc-full summary::-webkit-details-marker { display: none; }
.tc-full summary::after { content: "＋"; float: right; }
.tc-full[open] summary::after { content: "－"; }
.tc-doc { font-size: 13.5px; line-height: 1.6; color: #334155; }
.tc-doc .tc-title { font-size: 16px; margin-top: 2px; }
.tc-doc h3 { font-size: 14px; font-weight: 800; color: #0f172a; margin: 16px 0 6px; }
.tc-doc p { margin: 0 0 8px; }
.tc-doc .tc-defs { display: grid; grid-template-columns: minmax(90px, 30%) 1fr; gap: 4px 10px; margin: 6px 0 10px; }
.tc-doc dt { font-weight: 700; color: #0f172a; }
.tc-doc dd { margin: 0; }
.tc-doc .tc-tbl { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.tc-doc .tc-tbl th, .tc-doc .tc-tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #e2e8f0; }
.tc-doc .tc-tbl th { font-size: 12px; color: #64748b; }
.tc-foot { padding: 14px 22px 18px; border-top: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 12px; background: #f8fafc; }
.tc-check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 13.5px; color: #334155; cursor: pointer; }
.tc-check input { width: 20px; height: 20px; margin-top: 1px; accent-color: #0f4c81; }
#tc-accept { border: 0; border-radius: 14px; padding: 14px; font-family: inherit; font-size: 16px; font-weight: 800; background: #0f4c81; color: #fff; cursor: pointer; }
#tc-accept:disabled { background: #cbd5e1; color: #f8fafc; cursor: default; }
#tc-accept:focus-visible, .tc-full summary:focus-visible, .tc-check input:focus-visible { outline: 3px solid #6cb4ee; outline-offset: 2px; }
@keyframes tc-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tc-backdrop { animation: none; } }
