/* Tokens lifted from the existing dashboard so the two products read as one
   house. Grey ramp, type scale, spacing and shadow ladder are unchanged; only
   the scope class differs. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Fraunces:opsz,wght@9..144,500&display=swap");

:root {
  --f-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;

  --t-10: 10px; --t-11: 11px; --t-12: 12px; --t-14: 14px; --t-16: 16px;
  --t-18: 18px; --t-22: 22px; --t-28: 28px; --t-40: 40px;

  --s-4: 4px; --s-8: 8px; --s-12: 12px; --s-16: 16px; --s-24: 24px;
  --s-32: 32px; --s-48: 48px; --s-64: 64px;

  --n-12: hsl(40,8%,12%);  --n-22: hsl(40,8%,22%);  --n-32: hsl(40,8%,32%);
  --n-50: hsl(40,8%,50%);  --n-62: hsl(40,8%,62%);  --n-75: hsl(40,8%,75%);
  --n-85: hsl(40,8%,85%);  --n-92: hsl(40,10%,92%); --n-97: hsl(40,12%,97%);
  --paper: hsl(40,14%,98%); --white: #fff;

  --pri-30: hsl(218,65%,30%); --pri-38: hsl(218,65%,38%); --pri-92: hsl(218,40%,94%);
  --suc-38: hsl(150,55%,32%); --suc-92: hsl(150,35%,93%);
  --wrn-50: hsl(38,90%,45%);  --wrn-92: hsl(38,70%,93%);  --wrn-30: hsl(28,80%,30%);
  --crt-48: hsl(2,65%,48%);   --crt-92: hsl(2,60%,95%);   --crt-30: hsl(2,65%,32%);

  --r-card: 4px; --bw-1: 1px;
  --sh-1: 0 1px 2px hsla(40,10%,12%,.05);
  --sh-2: 0 4px 12px hsla(40,10%,12%,.08), 0 1px 2px hsla(40,10%,12%,.04);
  --w-nav: 220px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-body); font-size: var(--t-14); color: var(--n-12);
  background: var(--paper); -webkit-font-smoothing: antialiased;
}
a { color: var(--pri-38); }

/* ---------------------------------------------------------------- shell -- */
.app { display: grid; grid-template-columns: var(--w-nav) 1fr; min-height: 100vh; }
.nav {
  background: var(--white); border-right: var(--bw-1) solid var(--n-92);
  padding: var(--s-24) var(--s-16); display: flex; flex-direction: column; gap: var(--s-24);
}
.brand { display: flex; align-items: center; gap: var(--s-8); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 3px; background: var(--n-12); color: var(--white);
  display: grid; place-items: center; font-size: var(--t-12); font-weight: 600; letter-spacing: .02em;
}
.brand-word { font-size: var(--t-11); font-weight: 600; letter-spacing: .10em;
  text-transform: uppercase; color: var(--n-32); line-height: 1.3; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav a.item {
  display: block; padding: var(--s-8) var(--s-12); border-radius: 3px;
  color: var(--n-32); text-decoration: none; font-size: var(--t-14);
}
.nav a.item:hover { background: var(--n-97); }
.nav a.item.on { background: var(--n-12); color: var(--white); font-weight: 600; }
.nav .sec { font-size: var(--t-10); letter-spacing: .10em; text-transform: uppercase;
  color: var(--n-62); margin-top: var(--s-16); }
.nav .who { margin-top: auto; border-top: var(--bw-1) solid var(--n-92); padding-top: var(--s-16);
  font-size: var(--t-12); color: var(--n-50); }
.nav .who strong { display: block; color: var(--n-22); font-size: var(--t-14); }

.main { padding: var(--s-32) var(--s-32) var(--s-64); max-width: 1480px; }
.topbar { display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-16); margin-bottom: var(--s-24); flex-wrap: wrap; }
.crumb { font-size: var(--t-11); letter-spacing: .10em; text-transform: uppercase; color: var(--n-50); }
h1 { font-family: var(--f-display); font-size: var(--t-28); font-weight: 500; margin: var(--s-4) 0 0; }
.asof { font-size: var(--t-12); color: var(--n-50); }

/* ---------------------------------------------------------------- cards -- */
.band { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--s-16); margin-bottom: var(--s-24); }
.card { background: var(--white); border: var(--bw-1) solid var(--n-92);
  border-radius: var(--r-card); padding: var(--s-16); box-shadow: var(--sh-1); }
.card .k { font-size: var(--t-10); letter-spacing: .08em; text-transform: uppercase; color: var(--n-50); }
.card .v { font-family: var(--f-display); font-size: var(--t-28); margin-top: var(--s-4); }
.card .sub { font-size: var(--t-12); color: var(--n-50); margin-top: var(--s-4); }

.note { background: var(--wrn-92); border-left: 3px solid var(--wrn-50);
  padding: var(--s-12) var(--s-16); border-radius: 0 var(--r-card) var(--r-card) 0;
  font-size: var(--t-13, 13px); color: var(--wrn-30); margin-bottom: var(--s-24); }

/* --------------------------------------------------------------- chips --- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-8); margin-bottom: var(--s-16); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border: var(--bw-1) solid var(--n-85); border-radius: 3px; background: var(--white);
  font-size: var(--t-12); color: var(--n-32); text-decoration: none; white-space: nowrap;
}
.chip:hover { border-color: var(--n-62); }
.chip.on { background: var(--n-12); border-color: var(--n-12); color: var(--white); font-weight: 600; }
.chip .n { color: var(--n-62); font-variant-numeric: tabular-nums; }
.chip.on .n { color: var(--n-85); }
.seg { display: inline-flex; border: var(--bw-1) solid var(--n-85); border-radius: 3px; overflow: hidden; }
.seg a { padding: 5px 12px; font-size: var(--t-12); text-decoration: none; color: var(--n-32); background: var(--white); }
.seg a.on { background: var(--n-12); color: var(--white); font-weight: 600; }

.searchbar { display: flex; gap: var(--s-8); margin-bottom: var(--s-16); }
.searchbar input {
  flex: 1; max-width: 420px; padding: 7px 10px; font-family: var(--f-body);
  font-size: var(--t-13, 13px); border: var(--bw-1) solid var(--n-85); border-radius: 3px;
}
.searchbar button { padding: 7px 14px; font-size: var(--t-13, 13px); cursor: pointer;
  border: var(--bw-1) solid var(--n-85); background: var(--white); border-radius: 3px; }

/* --------------------------------------------------------------- table --- */
.tablewrap { background: var(--white); border: var(--bw-1) solid var(--n-92);
  border-radius: var(--r-card); overflow-x: auto; box-shadow: var(--sh-1); }
table { border-collapse: collapse; width: 100%; min-width: 1120px; table-layout: fixed; }
thead th {
  text-align: left; font-size: var(--t-10); letter-spacing: .08em; text-transform: uppercase;
  color: var(--n-50); font-weight: 600; padding: var(--s-12) var(--s-12) var(--s-8);
  border-bottom: var(--bw-1) solid var(--n-92); vertical-align: bottom;
  white-space: normal; line-height: 1.25;
}
thead th a { color: inherit; text-decoration: none; }
thead th .hint { display: block; font-size: var(--t-10); letter-spacing: 0;
  text-transform: none; color: var(--n-62); font-weight: 400; margin-top: 2px;
  /* fixed table layout does not clip overflow, so a long hint runs straight
     over the neighbouring header until it is told to wrap */
  white-space: normal; overflow-wrap: anywhere; }
thead th a { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
tbody td { padding: var(--s-12); border-bottom: var(--bw-1) solid var(--n-97);
  vertical-align: top; overflow-wrap: anywhere; }
tbody tr:hover { background: var(--n-97); }
.song a { font-weight: 600; color: var(--n-12); text-decoration: none; }
.song a:hover { text-decoration: underline; }
.song .artist { color: var(--n-50); font-size: var(--t-12); margin-top: 2px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money { font-variant-numeric: tabular-nums; font-size: var(--t-16); white-space: nowrap; }
.range { font-size: var(--t-11); color: var(--n-62); white-space: nowrap; }
.muted { color: var(--n-62); }
.notpriced { color: var(--n-62); }
.notpriced .why { font-size: var(--t-11); color: var(--n-75); }

/* three-segment share bar: you, other publishers, nobody.
   One track across claimed and unregistered, because they are the same 100. */
.sharebar { height: 6px; border-radius: 2px; overflow: hidden; display: flex;
  background: var(--n-92); margin-top: 6px; min-width: 120px; }
.sharebar i { display: block; height: 100%; }
.sb-you    { background: var(--pri-38); }
.sb-others { background: var(--n-75); }
.sb-nobody { background: repeating-linear-gradient(45deg, var(--wrn-50), var(--wrn-50) 3px, var(--wrn-92) 3px, var(--wrn-92) 6px); }
.legend { font-size: var(--t-11); color: var(--n-62); margin-top: 3px; }

.pchip { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: var(--t-11);
  border: var(--bw-1) solid var(--n-85); background: var(--n-97); color: var(--n-32);
  margin: 0 4px 4px 0; white-space: nowrap;
  /* Publisher names run long ("SOCIEDAD GENERAL DE AUTORES Y EDITORES (SGAE)").
     Left unbounded they widen the column until Confidence, the column the
     client was promised, falls off the right edge. Truncate the chip, keep the
     full name in the title attribute. */
  max-width: 210px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.pchip.you { background: var(--pri-92); border-color: var(--pri-38); color: var(--pri-30); font-weight: 600; }
.pchip.noshare { background: var(--white); border-style: dashed; color: var(--n-62); }
.more { font-size: var(--t-11); color: var(--n-62); }

.conf { min-width: 110px; }
.conf .n { font-variant-numeric: tabular-nums; font-size: var(--t-16); }
.conf .track { height: 7px; background: var(--n-92); border-radius: 2px; overflow: hidden;
  margin: 4px 0 3px; max-width: 96px; }
.conf .fill { display: block; height: 100%; background: var(--suc-38); }
.conf .fill.mid { background: var(--wrn-50); }
.conf.unknown .track { max-width: 96px; }
.conf .lbl { font-size: var(--t-11); color: var(--n-50); }
.conf.unknown .track { background: transparent; border: 1px dashed var(--n-85); }
.conf.unknown .lbl { color: var(--n-62); font-style: normal; }

.pager { display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-12) var(--s-16); font-size: var(--t-12); color: var(--n-50); }
.pager a { text-decoration: none; padding: 4px 8px; border: var(--bw-1) solid var(--n-85);
  border-radius: 3px; margin-left: 4px; color: var(--n-32); }
.pager .off { opacity: .4; pointer-events: none; }

/* --------------------------------------------------------------- login --- */
.login { min-height: 100vh; display: grid; place-items: center; padding: var(--s-24); }
.login .box { width: 100%; max-width: 380px; }
.login .card { padding: var(--s-32); }
.login h1 { font-size: var(--t-22); margin: 0 0 var(--s-4); }
.login p.lede { color: var(--n-50); font-size: var(--t-13, 13px); margin: 0 0 var(--s-24); }
.login label { display: block; font-size: var(--t-12); color: var(--n-32); margin-bottom: 4px; }
.login input { width: 100%; padding: 9px 10px; margin-bottom: var(--s-16);
  border: var(--bw-1) solid var(--n-85); border-radius: 3px; font-size: var(--t-14); font-family: var(--f-body); }
.login button { width: 100%; padding: 10px; background: var(--n-12); color: var(--white);
  border: 0; border-radius: 3px; font-size: var(--t-14); font-weight: 600; cursor: pointer; }
.login .err { background: var(--crt-92); color: var(--crt-30); padding: var(--s-8) var(--s-12);
  border-radius: 3px; font-size: var(--t-12); margin-bottom: var(--s-16); }
.login .foot { text-align: center; color: var(--n-62); font-size: var(--t-11); margin-top: var(--s-16); }

/* --------------------------------------------------------------- detail -- */
.detail { display: grid; grid-template-columns: 1fr 320px; gap: var(--s-24); align-items: start; }
.panel { background: var(--white); border: var(--bw-1) solid var(--n-92);
  border-radius: var(--r-card); padding: var(--s-16); margin-bottom: var(--s-16); box-shadow: var(--sh-1); }
.panel h2 { font-size: var(--t-11); letter-spacing: .08em; text-transform: uppercase;
  color: var(--n-50); margin: 0 0 var(--s-12); font-weight: 600; }
.panel .big { font-family: var(--f-display); font-size: var(--t-40); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px var(--s-12); font-size: var(--t-13, 13px); }
.kv dt { color: var(--n-50); }
.kv dd { margin: 0; }
.do { background: var(--wrn-92); border-left: 3px solid var(--wrn-50); padding: var(--s-12);
  color: var(--wrn-30); font-size: var(--t-13, 13px); border-radius: 0 3px 3px 0; }
@media (max-width: 1100px) { .detail { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .app { grid-template-columns: 1fr; } .nav { flex-direction: row; align-items: center; } }
