/* Fund Your Community, owner report.
   Same glass-and-gold language as portal/storage-kings.css and Cope Live, kept
   as its own file: this page belongs to a Bag Carriers product, that one to a
   client, and an edit to either must not be able to move the other. */

:root {
  --bg: #060606;
  --panel: #0c0c0d;
  --panel-raised: #111113;
  --gold: #c59a69;
  --gold-bright: #e5bd8c;
  --gold-dim: rgba(197, 154, 105, .16);
  --fg: #f5f1ea;
  --muted: #96928c;
  --dim: #5f5c58;
  --hairline: rgba(255, 255, 255, .075);
  --hairline-bright: rgba(255, 255, 255, .12);
  --sev-high: #e18a76;
  --sev-medium: #d9b866;
  --sev-low: #81b697;
  --blue: #68a8df;
  --spring: cubic-bezier(.32, .72, 0, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { min-height: 100%; }
body {
  min-height: 100dvh;
  padding: 18px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 5%, rgba(197, 154, 105, .1), transparent 32rem),
    radial-gradient(circle at 88% 24%, rgba(68, 91, 81, .09), transparent 38rem),
    var(--bg);
  color: var(--fg);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

[hidden] { display: none !important; }
.num { font-family: "DM Mono", monospace; font-variant-numeric: tabular-nums; }

#auth-loading, #load-error {
  min-height: calc(100dvh - 36px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
#load-error { color: var(--sev-high); }

/* Floating status island */
.topbar-shell {
  width: min(1560px, calc(100% - 20px));
  margin: 0 auto 18px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  box-shadow: 0 0 0 1px var(--hairline), 0 18px 70px rgba(0, 0, 0, .18);
}
.topbar {
  min-height: 50px;
  padding: 0 10px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 999px;
  background: rgba(10, 10, 11, .94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
  font-family: "DM Mono", monospace;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 13px; min-width: 0; }
.status-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--sev-low); box-shadow: 0 0 8px rgba(129, 182, 151, .55); }
.status-dot.attention { background: var(--sev-medium); box-shadow: 0 0 8px rgba(217, 184, 102, .5); }
.brand { font-size: 11px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }
.brand-sep, .brand-tag { color: var(--dim); font-size: 10px; }
.stamp { color: var(--muted); font-size: 9px; white-space: nowrap; }
.back {
  min-height: 38px;
  padding: 0 5px 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 11px;
  font-weight: 700;
  transition: transform 700ms var(--spring), background-color 700ms var(--spring);
}
.back i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .08); font-style: normal; transition: transform 700ms var(--spring); }
.back:hover { transform: translateY(-1px); background: var(--gold-bright); }
.back:hover i { transform: translate(2px, -1px) scale(1.04); }
.back:active { transform: scale(.98); }

main { width: min(1560px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

.command-bar { position: sticky; top: 8px; z-index: 3; border-radius: 22px; }
.command-core { min-height: 68px; padding: 13px 16px 13px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-radius: 16px; backdrop-filter: blur(20px); }
.source-health, .command-actions { display: flex; align-items: center; gap: 12px; }
.source-health div { display: flex; flex-direction: column; gap: 2px; }
.source-health strong { font-size: 11px; }
.source-health span:not(.status-dot) { color: var(--dim); font-size: 9px; }
.command-button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--fg); color: var(--bg); font: 700 10px "Plus Jakarta Sans", sans-serif; cursor: pointer; transition: transform 500ms var(--spring), background-color 500ms var(--spring); }
.command-button:hover { transform: translateY(-1px); background: var(--gold-bright); }
.command-button:disabled { cursor: wait; opacity: .6; }

/* Double-bezel system shared with the other portal desks */
.panel-shell, .metric-shell, .table-bezel {
  padding: 6px;
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .016));
  box-shadow: 0 0 0 1px var(--hairline), 0 36px 90px rgba(0, 0, 0, .18);
}
.panel-core, .tile, .panel {
  border-radius: 24px;
  background: linear-gradient(152deg, rgba(17, 17, 19, .98), rgba(9, 9, 10, .98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .075), inset 0 0 0 1px rgba(255, 255, 255, .025);
}
.reveal-card { opacity: 0; transform: translateY(34px) scale(.985); transition: transform 900ms var(--spring) var(--reveal-delay, 0ms), opacity 700ms var(--spring) var(--reveal-delay, 0ms); }
.reveal-card.is-visible { opacity: 1; transform: translateY(0) scale(1); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(430px, 5fr); gap: 18px; align-items: stretch; }
.hero { min-height: 290px; padding: 40px 46px; display: grid; grid-template-columns: 1fr 150px; align-items: center; gap: 28px; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; right: -90px; bottom: -125px; width: 280px; height: 280px; border-radius: 50%; background: rgba(197, 154, 105, .1); filter: blur(58px); pointer-events: none; }
.eyebrow, .section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(197, 154, 105, .08);
  box-shadow: inset 0 0 0 1px rgba(197, 154, 105, .16);
  color: var(--gold-bright);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero h1 { max-width: 730px; margin-top: 28px; font-size: clamp(2.7rem, 4.5vw, 5rem); font-weight: 600; line-height: .96; letter-spacing: -.065em; }
.hero h1 span { color: var(--gold); font-weight: 500; }
.hero p { max-width: 560px; margin-top: 22px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.hero-mark { width: 132px; height: 132px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 28%, rgba(229, 189, 140, .55), rgba(197, 154, 105, .12) 45%, transparent 70%); box-shadow: 0 0 0 1px rgba(197, 154, 105, .16), inset 0 0 40px rgba(197, 154, 105, .08); }
.hero-mark span { font-family: "DM Mono", monospace; color: var(--gold-bright); font-size: 18px; letter-spacing: .18em; }

.portfolio-block { min-width: 0; padding: 18px; border-radius: 30px; background: rgba(255, 255, 255, .018); box-shadow: inset 0 0 0 1px var(--hairline); }
.section-kicker { margin: 2px 0 14px; }

.tiles { display: grid; gap: 10px; }
.revenue-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.revenue-movement { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.signup-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.metric-shell { min-width: 0; padding: 5px; border-radius: 20px; box-shadow: 0 0 0 1px var(--hairline); }
.tile { min-height: 140px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 15px; }
.tile .label { color: var(--muted); font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.tile .value { margin: 12px 0 6px; color: var(--fg); font-size: clamp(1.5rem, 2.5vw, 2.4rem); font-weight: 500; line-height: 1; letter-spacing: -.05em; }
.tile .sub { color: var(--dim); font-size: 10px; line-height: 1.45; }
.tile.accent { background: linear-gradient(152deg, rgba(45, 32, 22, .98), rgba(15, 12, 10, .98)); }
.tile.accent .value { color: var(--gold-bright); }

.section-core { padding: 34px; }
.section-head { margin-bottom: 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-head h2 { margin-top: 14px; font-size: clamp(1.7rem, 2.4vw, 2.7rem); font-weight: 600; line-height: 1; letter-spacing: -.05em; }
.section-note { max-width: 240px; color: var(--dim); font-family: "DM Mono", monospace; font-size: 9px; line-height: 1.5; text-align: right; }
.note { color: var(--dim); font-size: 10px; line-height: 1.6; }
.section-intro { margin: -14px 0 20px; max-width: 760px; }

.revenue-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: start; }
.revenue-caveats { display: grid; gap: 10px; padding: 20px 22px; border-radius: 22px; background: rgba(255, 255, 255, .02); box-shadow: inset 0 0 0 1px var(--hairline); }
.revenue-caveats p { color: var(--muted); font-size: 11px; line-height: 1.65; }
.revenue-caveats p:first-child { color: var(--sev-medium); }

.table-bezel { min-width: 0; padding: 5px; border-radius: 20px; box-shadow: 0 0 0 1px var(--hairline); }
.panel { overflow: hidden; border-radius: 15px; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 12px 14px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 8px; font-weight: 500; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; box-shadow: inset 0 -1px 0 var(--hairline); }
td { padding: 12px 14px; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .045); white-space: nowrap; vertical-align: middle; }
tr:last-child td { box-shadow: none; }
tbody tr { transition: background-color 700ms var(--spring); }
tbody tr:hover { background: rgba(255, 255, 255, .035); }
.r { text-align: right; }
.empty { padding: 28px 14px; color: var(--dim); font-size: 11px; text-align: center; }
.row-ref { display: block; margin-top: 3px; color: var(--dim); font-family: "DM Mono", monospace; font-size: 8px; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; }
.row-link { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--hairline); }
.row-link:hover { color: var(--gold-bright); }
.missing { color: var(--dim); font-size: 9px; }

/* Paid and comped are different businesses, so they are never the same colour
   and never rely on colour alone: each pill prints its own word. */
.access-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px; font: 500 8px "DM Mono", monospace; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.access-pill.paid { color: var(--sev-low); background: rgba(129, 182, 151, .12); box-shadow: inset 0 0 0 1px rgba(129, 182, 151, .26); }
.access-pill.comped { color: var(--gold-bright); background: rgba(197, 154, 105, .14); box-shadow: inset 0 0 0 1px rgba(197, 154, 105, .34); }
.access-pill.trial { color: var(--blue); background: rgba(104, 168, 223, .1); }
.access-pill.grace { color: var(--sev-medium); background: rgba(217, 184, 102, .1); }
.access-pill.past-due { color: var(--sev-high); background: rgba(225, 138, 118, .12); box-shadow: inset 0 0 0 1px rgba(225, 138, 118, .24); }
.access-pill.none { color: var(--dim); background: rgba(255, 255, 255, .05); }
.access-pill.unknown { color: var(--fg); background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px var(--hairline-bright); }

.table-action { display: inline-flex; min-height: 30px; padding: 0 12px; align-items: center; border: 0; border-radius: 999px; background: var(--gold-dim); color: var(--gold-bright); font: 600 9px "Plus Jakarta Sans", sans-serif; cursor: pointer; transition: background-color 500ms var(--spring); }
.table-action:hover { background: rgba(197, 154, 105, .3); }
.table-action.end { background: rgba(225, 138, 118, .12); color: var(--sev-high); }
.table-action.end:hover { background: rgba(225, 138, 118, .24); }
.table-action:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.bar { display: flex; align-items: center; gap: 9px; min-width: 130px; }
.bar-track { flex: 1; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--gold); }
.bar-val { color: var(--muted); font-size: 9px; white-space: nowrap; }

/* Who is stuck: access we are carrying, with nothing recorded against it. */
.stuck-block { margin-bottom: 18px; }
.stuck { padding: 18px 20px; border-radius: 22px; background: rgba(225, 138, 118, .06); box-shadow: inset 3px 0 0 var(--sev-high), inset 0 0 0 1px rgba(225, 138, 118, .16); }
.stuck-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.stuck-head strong { color: var(--sev-high); font-size: 13px; }
.stuck-head span { color: var(--dim); font-family: "DM Mono", monospace; font-size: 9px; }
.stuck-names { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.stuck-name { padding: 7px 11px; border-radius: 999px; background: rgba(255, 255, 255, .04); font-size: 10px; }
.stuck-name a { color: var(--muted); text-decoration: none; }
.stuck-name a:hover { color: var(--gold-bright); }
.stuck-none { padding: 16px 20px; border-radius: 22px; background: rgba(129, 182, 151, .06); box-shadow: inset 3px 0 0 var(--sev-low), inset 0 0 0 1px rgba(129, 182, 151, .14); color: var(--sev-low); font-size: 11px; }
tr.stuck-row td:first-child { box-shadow: inset 3px 0 0 var(--sev-high), inset 0 -1px 0 rgba(255, 255, 255, .045); }

.lower-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 18px; align-items: start; }

.event-list { display: grid; gap: 10px; }
.event { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: start; padding: 14px 16px; border-radius: 17px; background: rgba(255, 255, 255, .024); box-shadow: inset 0 0 0 1px var(--hairline); }
.event time { color: var(--dim); font-family: "DM Mono", monospace; font-size: 9px; }
.event strong { font-size: 12px; }
.event p { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.event-type { color: var(--gold-bright); font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }

/* Confirm step. Nothing is granted or ended on a single click. */
.workflow-dialog { width: min(600px, calc(100% - 24px)); margin: auto; padding: 6px; border: 0; border-radius: 28px; background: linear-gradient(145deg, rgba(255,255,255,.1), rgba(255,255,255,.025)); color: var(--fg); box-shadow: 0 45px 120px rgba(0,0,0,.72); }
.workflow-dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(8px); }
.workflow-dialog form { padding: 28px; display: grid; gap: 16px; border-radius: 22px; background: linear-gradient(152deg, rgba(17,17,19,.99), rgba(9,9,10,.99)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; }
.dialog-head h2 { margin-top: 12px; font-size: 1.45rem; letter-spacing: -.04em; line-height: 1.15; }
.dialog-head p { margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.dialog-close { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: rgba(255,255,255,.05); color: var(--muted); font-size: 20px; cursor: pointer; }
.workflow-dialog label { display: grid; gap: 7px; color: var(--muted); font: 500 9px "DM Mono", monospace; letter-spacing: .05em; text-transform: uppercase; }
.workflow-dialog input, .workflow-dialog select { width: 100%; min-height: 46px; padding: 11px 13px; border: 0; border-radius: 12px; outline: 0; background: rgba(255,255,255,.055); box-shadow: inset 0 0 0 1px var(--hairline); color: var(--fg); font: 400 12px "Plus Jakarta Sans", sans-serif; text-transform: none; }
.workflow-dialog input:focus, .workflow-dialog select:focus { box-shadow: inset 0 0 0 1px var(--gold); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.dialog-save { min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--fg); color: var(--bg); font: 700 11px "Plus Jakarta Sans", sans-serif; cursor: pointer; }
.dialog-save.destructive { background: var(--sev-high); color: #180d0a; }
.dialog-save:disabled { opacity: .55; cursor: wait; }
.dialog-cancel { min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: rgba(255,255,255,.055); color: var(--muted); font: 600 11px "Plus Jakarta Sans", sans-serif; cursor: pointer; }
.dialog-error { color: var(--sev-high); font-size: 11px; line-height: 1.55; }

footer { width: min(1560px, 100%); min-height: 58px; margin: 18px auto 0; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; color: var(--dim); font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .04em; }
footer strong { color: var(--muted); font-weight: 400; }

@media (max-width: 1180px) {
  /* minmax(0, 1fr), not 1fr: a plain 1fr track cannot shrink below its
     content's min-content width, so a wide table inside its own scroll box
     still pushed the whole page sideways on a phone. */
  .hero-grid, .lower-grid, .revenue-split { grid-template-columns: minmax(0, 1fr); }
  .portfolio-block { padding: 0; background: transparent; box-shadow: none; }
  .revenue-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  body { padding: 8px 0 24px; }
  .topbar-shell { width: calc(100% - 20px); margin-bottom: 12px; }
  .topbar { min-height: 48px; padding: 5px 5px 5px 15px; }
  .brand-tag, .brand-sep, .stamp { display: none; }
  .brand { font-size: 10px; }
  main { width: 100%; padding: 0 10px; gap: 12px; }
  .hero-grid, .lower-grid { gap: 12px; }
  .panel-shell { padding: 5px; border-radius: 24px; }
  .panel-core { border-radius: 19px; }
  .hero { min-height: 300px; padding: 34px 26px; grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.4rem, 12vw, 4rem); }
  .hero-mark { display: none; }
  .revenue-tiles, .revenue-movement, .signup-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { min-height: 128px; padding: 17px; }
  .section-core { padding: 28px 18px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .section-note { text-align: left; max-width: none; }
  .revenue-caveats { padding: 16px 17px; }
  .event { grid-template-columns: 1fr; gap: 6px; }
  .event-type { justify-self: start; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
  footer { width: 100%; padding: 0 18px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; }
}

/* Two columns survive down to a small phone: one column of five-figure money
   tiles turns the top of the page into a scroll rather than a summary. */
@media (max-width: 380px) {
  .revenue-tiles, .revenue-movement, .signup-tiles { grid-template-columns: 1fr; }
  .tile { min-height: 112px; }
  .stuck-head { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-card, .back, .back i, tbody tr, .table-action, .command-button { transition: none !important; }
  .reveal-card { opacity: 1; transform: none; }
}
