/* Box of Cats Artist Portal — global styles
   ----------------------------------------------
   Visual language mirrors the per-artist PDF:
   minimal sans-serif, large bold numbers, light
   grey rules, yellow accents (#FBE74D) used
   sparingly on the header pill and section
   underlines. */

:root {
  --yellow: #FBE74D;
  --ink: #111111;
  --muted: #6B6B6B;
  --rule: #E5E5E5;
  --soft: #F7F7F5;
  --soft-2: #FAFAF9;
  --red: #B33232;
  --green: #2F8556;

  --maxw: 1080px;
  --pad-x: clamp(16px, 4vw, 32px);

  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica,
               "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}

a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule); }
a:hover { border-bottom-color: var(--ink); }

/* --- Page header (logo pill on yellow) --------------------- */
.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px var(--pad-x) 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-header .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.site-header .brand-pill {
  background: var(--yellow);
  border-radius: 999px;
  padding: 6px 18px;
  display: inline-flex;
  align-items: center;
  height: 32px;
  border: 0;
}
.site-header .brand-pill img {
  height: 14px;
  width: auto;
  display: block;
}

/* --- Section labels w/ yellow underline -------------------- */
.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 1.5px solid var(--yellow);
  margin: 28px 0 12px;
}

/* --- Light divider rule ------------------------------------ */
.divider {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 18px 0;
}

/* --- Page footer ------------------------------------------- */
.site-footer {
  max-width: var(--maxw);
  margin: 60px auto 24px;
  padding: 0 var(--pad-x);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}

/* --- Login (index.html) ------------------------------------ */
.login-shell {
  max-width: 520px;
  margin: 8vh auto 0;
  padding: 0 var(--pad-x);
  text-align: left;
}
.login-shell h1 {
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.05;
  margin: 12px 0 6px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.login-shell .lead {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 28px;
}
.login-shell form {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.login-shell label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.login-shell input[type="email"] {
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 14px 16px;
  border: 1.5px solid var(--rule);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease;
}
.login-shell input[type="email"]:focus {
  border-color: var(--ink);
}
.login-shell button {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 20px;
  background: var(--ink);
  color: #fff;
  border: 0;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s ease;
}
.login-shell button:hover { background: #000; }
.login-shell button:disabled {
  background: var(--muted);
  cursor: wait;
}
.login-shell .helper {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}
.login-shell .alert {
  font-size: 13px;
  padding: 12px 14px;
  border-left: 3px solid var(--red);
  background: #FFF6F6;
  color: var(--red);
  margin-top: 12px;
  display: none;
}
.login-shell .alert.success {
  border-left-color: var(--green);
  background: #F0FAF4;
  color: var(--green);
}
.login-shell .alert.is-visible { display: block; }

/* --- Dashboard --------------------------------------------- */
.dash-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x) 40px;
}
.dash-title {
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 12px 0 6px;
}
.dash-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* KPI strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 18px 0 22px;
}
@media (max-width: 760px) {
  .kpi-strip { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi .kpi-label {
  font-size: 11px;
  color: var(--muted);
}
.kpi .kpi-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.kpi .kpi-sub {
  font-size: 11px;
  color: var(--muted);
}

/* Money flow strip */
.flow {
  background: var(--soft);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .flow { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .flow { grid-template-columns: repeat(2, 1fr); }
}
.flow .cell .lbl {
  font-size: 10.5px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}
.flow .cell .val {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.flow .cell .val.neg { color: var(--red); }

/* Period chart */
.chart-card {
  margin: 6px 0 8px;
}
.chart-card svg { width: 100%; height: auto; display: block; }

/* Geography / stores: horizontal bars + table */
.bars { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 14px; }
.bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 90px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
@media (max-width: 600px) {
  .bar-row { grid-template-columns: 110px 1fr 76px; font-size: 11.5px; }
}
.bar-row .bar-label { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bar-track { background: var(--soft-2); height: 16px; position: relative; }
.bar-row .bar-fill { background: var(--ink); height: 100%; }
.bar-row .bar-value { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Ranked tables */
.rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 4px 0 10px;
}
.rank-table th, .rank-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: middle;
}
.rank-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
}
.rank-table .num { width: 28px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-table .right { text-align: right; font-variant-numeric: tabular-nums; }
.rank-table .muted { color: var(--muted); }

/* Side-by-side ranked tables (tracks + releases) */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; gap: 0; }
}

/* Logout / user menu */
.user-bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6px var(--pad-x);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  align-items: center;
}
.user-bar button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  border-bottom: 1px solid var(--rule);
  padding: 2px 0;
}
.user-bar button:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* Loading shimmer for the dashboard */
.loading {
  padding: 40px var(--pad-x);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
