/* Symlaris design system — plain CSS, no build step.
   Near-black marketing surfaces with condensed display type and
   blue/purple accents; the app itself (auth, dashboard, admin) is a
   clean light UI with a single blue accent. Desktop/mobile split at
   900px, matching the original React build. */

:root {
  --ink: #0a0a0b;
  --paper: #ffffff;
  --near-black: #0b0b0f;
  --near-black-2: #141419;
  --line: #1a1a1a;
  --dark-border: #2a2a32;
  --gray-50: #fafafa;
  --gray-100: #f2f2f3;
  --gray-200: #e4e4e7;
  --gray-300: #cfcfd4;
  --gray-400: #a3a3ab;
  --gray-500: #737380;
  --gray-600: #525260;
  --gray-700: #333340;

  --accent: #2f6fed;
  --accent-2: #7c5cff;
  --accent-pink: #f5457a;
  --accent-orange: #ff7a3d;

  --font-sans: Archivo, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: Anton, Archivo, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

.display-heading {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.95;
}
.mono-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.gradient-text-cool {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-text-warm {
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-border {
  position: relative;
  border: 1px solid transparent;
  background: linear-gradient(var(--near-black), var(--near-black)) padding-box,
    linear-gradient(90deg, var(--accent), var(--accent-2)) border-box;
}

/* --- layout helpers ------------------------------------------------- */
.container { max-width: 1152px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .container { padding: 0 32px; } }

.mobile-only { display: block; }
.dsk-only { display: none; }
.mobile-only-flex { display: flex; }
.dsk-only-flex { display: none; }
@media (min-width: 900px) {
  .mobile-only, .mobile-only-flex { display: none !important; }
  .dsk-only { display: block; }
  .dsk-only-flex { display: flex; }
}

/* --- buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: background-color .15s;
}
.btn:hover { background: var(--gray-700); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--gray-100); }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); }
.btn-lg { font-size: 16px; padding: 14px 26px; }
.btn-sm { font-size: 13px; padding: 7px 15px; }
.btn-full { width: 100%; }
.btn-dark-outline { background: transparent; color: var(--paper); border-color: var(--dark-border); }
.btn-dark-outline:hover { border-color: var(--gray-500); }

/* --- cards -------------------------------------------------------------- */
.card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--paper);
  padding: 20px;
}
.card-dark {
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  background: var(--near-black-2);
  padding: 24px;
}

/* --- forms -------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}
.field .hint { color: var(--gray-400); font-size: 12px; font-weight: 400; float: right; }
.input, select.input, textarea.input {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .15);
}
textarea.input { resize: vertical; min-height: 90px; }
.field-error { color: var(--gray-700); font-size: 13px; margin-top: 6px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--gray-600); }
.checkbox-row input { margin-top: 3px; accent-color: var(--accent); }

/* --- status pills — style differs by state, never just color ----------- */
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  border: 1px solid;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}
.pill-active { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.pill-pending { background: transparent; color: var(--ink); border-color: var(--ink); }
.pill-draft { background: var(--gray-100); color: var(--gray-600); border-color: var(--gray-100); }
.pill-rejected { background: transparent; color: var(--gray-500); border-color: var(--gray-400); border-style: dashed; }

/* --- alerts / flash ------------------------------------------------------ */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: var(--gray-100); color: var(--ink); border: 1px solid var(--gray-300); }
.alert-success { background: var(--ink); color: var(--paper); }

/* --- public header / landing --------------------------------------------- */
.public-header {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--dark-border);
  background: var(--near-black);
}
.public-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.public-header nav { display: none; align-items: center; gap: 32px; }
.public-header a.navlink { color: var(--gray-400); font-size: 12px; }
.public-header a.navlink:hover, .public-header a.navlink.active { color: var(--paper); }
@media (min-width: 900px) { .public-header nav { display: flex; } }

/* Hamburger toggle (mobile only) */
.menu-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 32px; height: 32px; padding: 0; border: none; background: none;
}
.menu-toggle span {
  display: block; width: 100%; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 900px) { .menu-toggle { display: none; } }

/* Mobile nav overlay panel */
.mobile-menu {
  display: none; flex-direction: column; gap: 2px;
  border-top: 1px solid var(--dark-border);
  background: var(--near-black);
  padding: 8px 16px 20px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 14px 4px; font-size: 13px; color: var(--gray-300); border-bottom: 1px solid var(--line); }
.mobile-menu a.active { color: #fff; }
.mobile-menu a:nth-last-child(2) { border-bottom: none; }
.mobile-menu a:last-child { border-bottom: none; margin-top: 10px; text-align: center; color: #fff; }
@media (min-width: 900px) { .mobile-menu { display: none !important; } }

/* Bold centered CTA banner (landing / sub-page closers) */
.cta-banner { border-top: 1px solid var(--dark-border); padding: 80px 0; text-align: center; }
.cta-banner .container { max-width: 720px; }
.cta-banner p { margin: 20px auto 0; max-width: 480px; color: var(--gray-400); font-size: 15px; }
.cta-banner .cta-actions { margin-top: 32px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

body.dark-page { background: var(--near-black); color: var(--paper); }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; gap: 8px;
  border-top: 1px solid var(--gray-200);
  background: var(--paper);
  padding: 12px 16px;
}
.sticky-cta.dark { border-color: var(--dark-border); background: var(--near-black); }
@media (min-width: 900px) { .sticky-cta { display: none; } }
/* Artist-app pages (e.g. the upload form) also have a fixed bottom-nav on
   mobile — without this offset both sit at bottom:0 with the same
   z-index and the bottom-nav paints over the CTA buttons, hiding them. */
.app-body .sticky-cta { bottom: 58px; }

/* --- artist / admin app shell -------------------------------------------- */
.app-body { padding-bottom: 80px; }
@media (min-width: 900px) { .app-body { padding-bottom: 0; } }

.topnav { border-bottom: 1px solid var(--gray-200); }
.topnav .container { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.topnav-links { display: flex; align-items: center; gap: 4px; }
.topnav-links a {
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
}
.topnav-links a:hover { background: var(--gray-100); }
.topnav-links a.active { background: var(--accent); color: var(--paper); }

.mobile-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--gray-200);
  padding: 14px 16px;
}

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex;
  border-top: 1px solid var(--gray-200);
  background: var(--paper);
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-400);
}
.bottom-nav a.active { color: var(--accent); }
@media (min-width: 900px) { .bottom-nav { display: none; } }

.admin-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 16px 12px; }
@media (min-width: 900px) { .admin-tabs { padding: 0 32px 12px; } }
.admin-tabs a { flex-shrink: 0; border-radius: var(--radius-full); padding: 8px 16px; font-size: 14px; font-weight: 500; color: var(--gray-600); }
.admin-tabs a:hover { background: var(--gray-100); }
.admin-tabs a.active { background: var(--accent); color: var(--paper); }

/* --- misc --------------------------------------------------------------- */
.grid { display: grid; gap: 16px; }
/* Mobile-first: grid-2 and grid-3 stack to a single column until 900px
   (form field pairs, card lists) — grid-4 is the one exception that's
   already 2-up on mobile (compact metric tiles), matching the original
   design's `grid-cols-2 dsk:grid-cols-4` pattern. */
.grid-2, .grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Fixed-sidebar + content layouts — single column on mobile, the real
   split only from 900px up. Used wherever a form pairs a narrow sidebar
   (cover art, a date field, etc.) with a wider main column. */
.layout-sidebar-240,
.layout-sidebar-220,
.layout-sidebar-200-right {
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .layout-sidebar-240 { grid-template-columns: 240px 1fr; }
  .layout-sidebar-220 { grid-template-columns: 220px 1fr; }
  .layout-sidebar-200-right { grid-template-columns: 1fr 200px; }
}
.metric { border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 18px; }
.metric .label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-500); }
.metric .value { font-size: 26px; font-weight: 600; margin-top: 8px; }
.metric .sub { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

.empty-state {
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
}
.empty-state .title { font-size: 14px; font-weight: 500; }
.empty-state .desc { font-size: 14px; color: var(--gray-500); margin-top: 6px; max-width: 380px; margin-left: auto; margin-right: auto; }

table.simple-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.simple-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-500); padding: 10px 14px; background: var(--gray-50); }
table.simple-table td { padding: 10px 14px; border-top: 1px solid var(--gray-100); }

.track-block { border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px; }
.track-block + .track-block { margin-top: 16px; }
.split-row, .credit-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.split-row .input, .credit-row .input { flex: 1; }

.tag { display: inline-flex; align-items: center; border-radius: var(--radius-full); border: 1px solid var(--gray-200); padding: 4px 10px; font-size: 12px; color: var(--gray-600); }

.hidden-row { display: none !important; }
.remove-row-btn, .remove-track-btn {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 9px;
  color: var(--gray-500);
  background: var(--paper);
  flex-shrink: 0;
}
.remove-row-btn:hover, .remove-track-btn:hover { background: var(--gray-100); }
.platform-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 260px; overflow-y: auto; }
@media (min-width: 900px) { .platform-grid { grid-template-columns: repeat(3, 1fr); } }
.platform-option { display: flex; align-items: center; gap: 8px; border: 1px solid var(--gray-200); border-radius: 8px; padding: 8px 10px; font-size: 13px; color: var(--gray-600); cursor: pointer; }
.platform-option:has(input:checked) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.platform-option input { position: absolute; opacity: 0; pointer-events: none; }
.section-divider { border-top: 1px solid var(--gray-100); padding-top: 20px; margin-top: 20px; }

/* Visually hidden but still focusable/validatable — unlike display:none,
   which silently breaks native "required" validation popups on file inputs
   in Chrome. */
.visually-hidden-file { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Platform icon chips (landing page "distributed to" row) */
.platform-row { display: flex; flex-wrap: wrap; gap: 36px; justify-content: center; align-items: center; }
.platform-chip { display: flex; align-items: center; gap: 8px; color: var(--gray-400); transition: color .2s ease; }
.platform-chip:hover { color: #fff; }
.platform-chip-icon { width: 18px; height: 18px; flex: 0 0 auto; display: flex; }
.platform-chip-icon svg { width: 100%; height: 100%; fill: currentColor; display: block; }

/* Icon + title row inside a .card-dark feature card (landing "Mucho más
   que distribución" grid). */
.feature-card-icon { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.feature-card-icon .icon-box { width: 26px; height: 26px; flex-shrink: 0; color: var(--accent-2); }
.feature-card-icon .icon-box svg { width: 100%; height: 100%; display: block; }

/* --- analytics (admin + artist "Estadísticas") --------------------------- */
.stats-intro { max-width: 760px; }
.stats-intro p { color: var(--gray-500); font-size: 14px; margin-top: 8px; }

.stats-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  margin: 20px 0; padding: 16px; border: 1px solid var(--gray-200); border-radius: var(--radius-md);
}
.stats-filters .field-inline { display: flex; flex-direction: column; gap: 4px; }
.stats-filters .field-inline label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-500); }
.stats-filters select { border: 1px solid var(--gray-300); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 14px; font-family: inherit; background: var(--paper); }
.stats-filters .stats-total { margin-left: auto; text-align: right; }
.stats-filters .stats-total .value { font-size: 22px; font-weight: 600; }
.stats-filters .stats-total .label { font-size: 12px; color: var(--gray-500); }

.stats-chart-layout { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--gray-200); border-radius: var(--radius-md); overflow: hidden; }
@media (min-width: 900px) { .stats-chart-layout { grid-template-columns: 280px 1fr; } }
.stats-platform-list { border-bottom: 1px solid var(--gray-200); }
@media (min-width: 900px) { .stats-platform-list { border-bottom: none; border-right: 1px solid var(--gray-200); } }
.stats-platform-row {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100); cursor: pointer; background: none; width: 100%; text-align: left; font-family: inherit;
}
.stats-platform-row:last-child { border-bottom: none; }
.stats-platform-row:hover { background: var(--gray-50); }
.stats-platform-row.active { background: var(--gray-100); }
.stats-platform-row .icon { width: 26px; height: 26px; flex-shrink: 0; color: var(--ink); }
.stats-platform-row .icon svg { width: 100%; height: 100%; }
.stats-platform-row .name { font-size: 14px; font-weight: 500; }
.stats-platform-row .count { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.stats-chart-pane { padding: 20px; display: flex; align-items: center; justify-content: center; min-height: 240px; }

.stats-grid-2 { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
@media (min-width: 900px) { .stats-grid-2 { grid-template-columns: repeat(2, 1fr); } }

.stats-panel-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 16px; }
.stats-panel-header h3 { font-size: 15px; font-weight: 600; }
.stats-panel-header .total { font-size: 12px; color: var(--gray-500); font-weight: 400; }
.stats-search { display: flex; gap: 8px; flex: 1; min-width: 180px; }
.stats-search input { flex: 1; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; font-family: inherit; }
.stats-search button { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: var(--radius-sm); padding: 8px 14px; font-size: 13px; font-weight: 500; }
.stats-sort-btn { border: 1px solid var(--gray-300); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--paper); flex-shrink: 0; }

.stats-list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--gray-100); }
.stats-list-row:first-child { border-top: none; }
.stats-list-row .thumb { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gray-100); flex-shrink: 0; }
.stats-list-row .thumb-flag { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--gray-100); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stats-list-row .name { font-size: 14px; font-weight: 500; }
.stats-list-row .meta { margin-left: auto; text-align: right; font-size: 13px; color: var(--gray-600); }
.stats-list-row .meta strong { display: block; font-size: 14px; color: var(--ink); }
.stats-list-row .chevron { color: var(--gray-400); flex-shrink: 0; }

.stats-pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--gray-100); }
.stats-pagination button { border: 1px solid var(--gray-300); border-radius: var(--radius-sm); padding: 6px 12px; background: var(--paper); font-size: 13px; }
.stats-pagination button:disabled { opacity: .4; cursor: default; }
.stats-pagination .page-info { font-size: 13px; color: var(--gray-500); }

.stats-empty-mini { text-align: center; padding: 32px 16px; color: var(--gray-500); }
.stats-empty-mini svg { width: 32px; height: 32px; margin-bottom: 10px; color: var(--gray-300); }
.stats-empty-mini .title { font-size: 14px; font-weight: 500; color: var(--ink); }
.stats-empty-mini .desc { font-size: 13px; margin-top: 4px; }

/* Artist carousel (auto-scrolling strip, pauses on hover) */
.artist-carousel { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 64px, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(90deg, transparent, #000 64px, #000 calc(100% - 64px), transparent); }
.artist-track { display: flex; gap: 18px; width: max-content; animation: artist-scroll 32s linear infinite; }
.artist-carousel:hover .artist-track { animation-play-state: paused; }
.artist-card { flex: 0 0 auto; width: 150px; border: 1px solid var(--dark-border); border-radius: var(--radius-md); overflow: hidden; background: var(--near-black-2); }
.artist-card-photo { aspect-ratio: 3 / 4; background: var(--near-black-2); }
.artist-card-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.artist-card p { padding: 10px 12px; font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes artist-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .artist-track { animation: none; } }
