@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --page: #0b0e17;
  --panel: #101827;
  --panel-strong: #132033;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.075);
  --line: rgba(148, 178, 209, 0.14);
  --line-strong: rgba(94, 234, 212, 0.28);
  --green: #0d9488;
  --mint: #5eead4;
  --text: #f4f7fb;
  --muted: #94a7c0;
  --soft: #c7d3e3;
  --danger: #f87171;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
}

html[data-theme="light"] {
  --page: #f8fafc;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --surface: rgba(15, 23, 42, 0.035);
  --surface-strong: rgba(15, 23, 42, 0.06);
  --line: #e2e8f0;
  --line-strong: rgba(13, 148, 136, 0.35);
  --green: #0d9488;
  --mint: #0d9488;
  --text: #0f172a;
  --muted: #64748b;
  --soft: #334155;
  --danger: #ef4444;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 10px 25px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }

/* Atributo hidden vence qualquer display utilitario (.form, .grid, etc). */
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(13, 148, 136, 0.12), transparent 28%),
    linear-gradient(145deg, #090d18 0%, #070b15 52%, #050810 100%);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 18% 0%, rgba(13, 148, 136, 0.04), transparent 32%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #0f172a;
}

h1, h2, h3, .brand { font-family: 'Outfit', sans-serif; }
a { color: inherit; }

/* Sidebar recolhível (spec 025 — mockup painel-do-cliente) */
.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  transition: grid-template-columns 0.2s ease;
}

aside {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px;
  background: #0a0c14;
  border-right: 1px solid rgba(148, 178, 209, 0.12);
  overflow-y: auto;
  overflow-x: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 6px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
}

.brand img {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 0;
  object-fit: contain;
}

.ct-collapse-btn {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  margin-left: auto;
  border-radius: 9px;
  border: 1px solid rgba(148, 178, 209, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav a {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 0 12px;
  color: var(--soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.nav a .ct-ico {
  width: 20px;
  flex: 0 0 auto;
  display: inline-flex;
  justify-content: center;
}

.nav a:hover {
  background: var(--surface);
  color: #fff;
}

.nav a.active {
  background: rgba(45, 212, 191, 0.13);
  color: var(--mint);
}

.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 178, 209, 0.12);
}

.side-foot a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.side-foot a:hover {
  background: var(--surface);
  color: #fff;
}

.side-foot a[href='/auth/logout'] {
  color: #f2867c;
}

.side-foot a.ct-login-foot-link {
  color: var(--mint);
  font-weight: 700;
}

.side-foot .theme-toggle {
  margin-top: 12px;
  margin-left: 10px;
  align-self: flex-start;
}

.ct-lock-icon {
  display: inline-block;
  vertical-align: middle;
  opacity: 0.62;
  color: var(--muted);
  flex-shrink: 0;
  transition: opacity 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

a:hover .ct-lock-icon {
  opacity: 1;
  color: var(--mint);
  transform: scale(1.1);
}

.nav a .ct-label .ct-lock-icon {
  margin-left: 6px;
}

.ct-mobile-bar,
.ct-backdrop {
  display: none;
}

.step-label {
  margin: 4px 0 0;
  color: var(--mint);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Detalhe de repertório (spec 026) */
.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.detail-head h2 { margin: 0; }
.detail-head p { margin: 4px 0 0; }

.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.empty-state {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 28px 22px;
  border: 1px dashed rgba(148, 178, 209, 0.28);
  border-radius: 14px;
  background: var(--surface);
}

.empty-state strong {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
}

.empty-state p { margin: 0; color: var(--muted); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.modal-backdrop[hidden] { display: none; }

.modal {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.modal h3 { margin: 0; }
.modal .actions { justify-content: flex-end; }

/* Pílulas de status do histórico (spec 027) */
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-pill.ok {
  background: rgba(45, 212, 191, 0.14);
  color: var(--mint);
  border: 1px solid rgba(45, 212, 191, 0.32);
}

.status-pill.warn {
  background: rgba(245, 200, 107, 0.14);
  color: #f5c86b;
  border: 1px solid rgba(245, 200, 107, 0.32);
}

.status-pill.danger {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.status-pill.neutral {
  background: rgba(148, 178, 209, 0.16);
  color: var(--soft);
  border: 1px solid rgba(148, 178, 209, 0.28);
}

.history-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.job-songs summary {
  cursor: pointer;
  color: var(--mint);
  font-size: 12.5px;
  font-weight: 700;
}

.job-songs ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--soft);
  font-size: 13px;
  display: grid;
  gap: 4px;
}

@media (min-width: 880px) {
  .layout.ct-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .layout.ct-collapsed aside { padding: 22px 8px; }
  .layout.ct-collapsed .brand { justify-content: center; padding: 0; }
  .layout.ct-collapsed .brand span { display: none; }
  .layout.ct-collapsed .ct-collapse-btn { margin-left: 0; }
  .layout.ct-collapsed .nav a { justify-content: center; padding: 0; }
  .layout.ct-collapsed .nav a .ct-label { display: none; }
  .layout.ct-collapsed .nav a .ct-lock-icon { display: none; }
  .layout.ct-collapsed .side-foot { display: none; }
}

main {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 34px clamp(18px, 4vw, 48px) 56px;
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.top h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
  font-weight: 800;
}

.top p {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.55;
}

.pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.12);
  padding: 0 16px;
  color: var(--mint);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 22px;
}

.metric {
  min-height: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.metric span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 34px;
  line-height: 1;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(360px, 0.78fr);
  gap: 22px;
  align-items: start;
}

.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.repertoire-grid { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(16, 24, 39, 0.88);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.panel h2,
.panel h3 {
  margin: 0;
  line-height: 1.1;
}

.panel h2 { font-size: 24px; }
.panel h3 { font-size: 18px; }
.panel-head p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; }
.body {
  display: grid;
  gap: 14px;
  padding: 24px;
}
.panel > h2, .panel > h3, .panel > p, .panel > .form, .panel > .actions, .panel > .share, .panel > .mini-form, .panel > .list, .panel > .items { margin-left: 24px; margin-right: 24px; }
.panel > h2:first-child { margin-top: 24px; }

.form { display: grid; gap: 14px; }
label {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  color: var(--soft);
  font-size: 14px;
  font-weight: 800;
}

textarea, select, input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 7, 18, 0.54);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

textarea:focus, select:focus, input:focus {
  border-color: var(--mint);
  background: rgba(3, 7, 18, 0.82);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.08);
}

textarea {
  min-height: 220px;
  padding: 16px;
  resize: vertical;
  font-family: Consolas, 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.55;
}

select, input { height: 48px; padding: 0 16px; }
select option { background: #101827; color: #fff; }

.body > label:has(#urls) {
  margin-bottom: 4px;
}

.row,
.two,
.lesson-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.generator-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.catalog-search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 140px auto;
  gap: 8px;
  align-items: center;
}

.format-checks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.format-chip {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  user-select: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.format-chip:hover {
  border-color: rgba(94, 234, 212, 0.3);
  background: rgba(255, 255, 255, 0.07);
}

.format-chip input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
  flex: 0 0 auto;
}

.format-chip:has(input:checked) {
  border-color: rgba(94, 234, 212, 0.45);
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.22), rgba(13, 148, 136, 0.22));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.3);
}

.format-chip:has(input:checked) input[type='checkbox'] {
  accent-color: var(--mint);
}

.lesson-fields .wide { grid-column: 1 / -1; }

.lesson-fields {
  margin-top: 2px;
}

.checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.check {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
}

.check input[type='checkbox'] {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  padding: 0;
  accent-color: var(--green);
}

.check:has(input:checked) {
  border-color: transparent;
  background: linear-gradient(135deg, var(--mint), var(--green));
  color: #04231e;
}

.check:has(input:checked) input[type='checkbox'] { accent-color: #04231e; }

.lesson-check {
  min-height: 50px;
  margin-top: 2px;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.035);
}

.lesson-check span {
  color: inherit;
  font-weight: 800;
}

button, .btn {
  min-height: 48px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--mint), var(--green));
  color: #04231e;
  padding: 0 22px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(13, 148, 136, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button:hover, .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(13, 148, 136, 0.35);
}

button:disabled { background: #334155; color: #a7b4c6; cursor: wait; box-shadow: none; }
.secondary, .btn.secondary, button.secondary, .ghost, button.ghost {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.danger, button.danger {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.24);
  box-shadow: none;
}

.mini { min-height: 36px; border-radius: 10px; padding: 0 14px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.form-footer {
  margin-top: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 7, 18, 0.34);
  justify-content: space-between;
}

.form-footer button {
  min-width: 180px;
}
.counter { color: var(--muted); font-weight: 800; }
.counter.warn, .message.error { color: var(--danger); }
.status { padding: 18px 24px 24px; border-top: 1px solid var(--line); }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.message { color: var(--muted); }

.trial-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 24, 38, .54);
}

.trial-dialog {
  position: relative;
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  color: #121826;
  box-shadow: 0 24px 80px rgba(18, 24, 38, .28);
}

.trial-dialog strong { font-size: 28px; line-height: 1.05; }
.trial-dialog p { margin: 0; color: #526071; line-height: 1.55; }

.trial-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #eef2f7;
  color: #121826;
  font-size: 22px;
  cursor: pointer;
}

.trial-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.list, .items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.item, .rep, .field, .note, .collab, .repertoire-song {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 7, 18, 0.38);
}

.item { padding: 16px; }
.rep {
  width: 100%;
  min-height: auto;
  display: block;
  padding: 16px;
  text-align: left;
  color: var(--text);
  box-shadow: none;
}
.rep.active {
  border-color: var(--line-strong);
  background: rgba(13, 148, 136, 0.13);
}
.item strong, .rep strong { display: block; font-size: 17px; }
.item span, .rep span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.item-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.empty, .muted { color: var(--muted); }
.empty { margin: 0; padding: 12px 0; }
.share { color: var(--mint); font-weight: 800; overflow-wrap: anywhere; }

.package {
  margin: 22px 0;
  padding: 20px;
  display: grid;
  gap: 14px;
  background: linear-gradient(180deg, rgba(94, 234, 212, 0.1), rgba(13, 148, 136, 0.07));
  border-color: var(--line-strong);
  box-shadow: none;
}
.package h3 { margin-bottom: 0; }
.package label { gap: 10px; }
.package .two { gap: 16px; }
.package .actions { margin-top: 2px; }

.mini-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 10px;
}
.note { padding: 12px; margin-top: 10px; }
.note b { font-size: 12px; }
.note p { margin: 4px 0 0; color: var(--muted); }
.collab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; }
.field { padding: 16px; }
.field span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.field strong { display: block; margin-top: 6px; font-size: 17px; }

.panel > form.form {
  margin: 0;
  padding: 24px;
}

.panel > form.form label:first-child {
  margin-top: 0;
}

.history-item {
  min-height: 104px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
}

.history-copy strong {
  font-size: 18px;
  line-height: 1.2;
}

.history-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.history-copy span {
  margin-top: 6px;
  color: #b9d3f1;
  line-height: 1.45;
}

.history-side {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.plan-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 11px;
  color: var(--mint);
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.repertoire-list-panel .form { padding: 0 24px 18px; }
.repertoire-list-panel > h2 { margin-bottom: 16px; }
.repertoire-list-panel .list { padding: 0 24px 24px; }
.repertoire-detail-panel { min-height: 680px; }
.repertoire-detail-panel > h2,
.repertoire-detail-panel > p,
.repertoire-detail-panel > .actions,
.repertoire-detail-panel > .share,
.repertoire-detail-panel > h3,
.repertoire-detail-panel > .form,
.repertoire-detail-panel > .mini-form,
.repertoire-detail-panel > .list,
.repertoire-detail-panel > .items { margin-left: 24px; margin-right: 24px; }
.repertoire-detail-panel > h2:first-child { margin-top: 24px; }
.repertoire-detail-panel > h3 { margin-top: 24px; margin-bottom: 10px; }
.repertoire-detail-panel > .items { margin-bottom: 24px; }

.profile-container {
  max-width: 1080px;
  margin: 0;
  display: grid;
  gap: 24px;
}

.profile-top {
  margin-bottom: 4px;
}

.profile-panel,
.history-panel {
  width: 100%;
  max-width: 1080px;
}

.profile-form {
  padding: 24px;
  display: grid;
  gap: 20px;
}

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.profile-field {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.45);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 74px;
  box-sizing: border-box;
}

.profile-field span {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.profile-field strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.profile-field .plan-badge {
  align-self: flex-start;
  margin-top: 2px;
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.profile-form .message {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.profile-form .message.ok {
  color: var(--mint);
}

.profile-form .message.error {
  color: var(--danger);
}

.profile-form .message:empty {
  display: none;
}

.history-content {
  padding: 20px 24px 24px;
}

.history-empty {
  padding: 28px 20px;
  text-align: center;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.history-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.repertoire-song {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
}

.song-main {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.song-main .song-copy {
  flex: 1 1 auto;
}

.drag-handle {
  cursor: grab;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  user-select: none;
}

.repertoire-song.dragging {
  opacity: 0.5;
}

.song-reorder {
  display: flex;
  gap: 4px;
}

.song-reorder button {
  min-width: 32px;
  padding: 0 8px;
}

.compact-select {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
}

.compact-select input[type='checkbox'] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.song-copy {
  min-width: 0;
}

.song-url {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-form {
  grid-template-columns: minmax(0, 1fr) 112px;
}

.note-form button {
  min-width: 112px;
}

@media (max-width: 1180px) {
  .grid, .grid.cols-2, .repertoire-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 879px) {
  .layout,
  .layout.ct-collapsed { display: block; }
  aside {
    position: fixed;
    top: 0;
    left: 0;
    width: 248px;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
  }
  .layout.ct-nav-open aside {
    transform: none;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.55);
  }
  .layout.ct-nav-open .ct-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 55;
  }
  .ct-mobile-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 0;
  }
  .ct-mobile-bar strong {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
  }
  .ct-hamburger {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(148, 178, 209, 0.22);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
  }
}

@media (max-width: 760px) {
  main { padding: 22px 14px 40px; }
  .top { display: block; }
  .top .btn, .top button { margin-top: 16px; width: 100%; }
  .form { gap: 11px; }
  label { gap: 6px; font-size: 13px; line-height: 1.2; }
  select, input { height: 44px; padding: 0 14px; border-radius: 13px; }
  textarea { min-height: 172px; padding: 14px; border-radius: 13px; }
  button, .btn { min-height: 46px; border-radius: 13px; }
  .metrics, .row, .two, .lesson-fields, .generator-options, .checks, .profile-info-grid { grid-template-columns: 1fr; }
  .row, .two, .lesson-fields, .generator-options, .checks, .profile-info-grid { gap: 10px; }
  .check { min-height: 46px; margin-bottom: 0; padding: 0 14px; border-radius: 13px; }
  .lesson-check {
    min-height: 44px;
    background: rgba(255, 255, 255, 0.035);
  }
  .check input[type='checkbox'] { width: 18px; height: 18px; }
  .package {
    margin: 16px 0;
    padding: 16px;
    border-radius: 18px;
  }
  .package h3 { margin-bottom: 12px; }
  .package .actions { margin-top: 8px; }
  .package .actions button { min-height: 50px; }
  .form-footer {
    display: grid;
    gap: 12px;
    padding: 12px;
  }
  .form-footer .counter {
    font-size: 18px;
    line-height: 1.1;
  }
  .form-footer button {
    width: 100%;
    min-width: 0;
  }
  .catalog-search-bar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .catalog-search-bar input {
    grid-column: 1 / -1;
    width: 100%;
  }
  .catalog-search-bar select {
    width: 100%;
    min-width: 0;
  }
  .catalog-search-bar button {
    grid-column: 1 / -1;
    width: 100%;
  }
  .format-checks {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .format-chip {
    min-height: 44px;
    padding: 0 8px;
    font-size: 13px;
    gap: 6px;
  }
  .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .panel-head .btn.mini {
    width: auto;
    flex-shrink: 0;
  }
  .item-head, .collab { display: grid; }
  .history-item { grid-template-columns: 1fr; }
  .history-side { justify-items: stretch; }
  .song-main { grid-template-columns: 1fr; }
  .note-form { grid-template-columns: 1fr; }
  .body, .panel-head { padding: 18px; }
  .panel > h2, .panel > h3, .panel > p, .panel > .form, .panel > .actions, .panel > .share, .panel > .mini-form, .panel > .list, .panel > .items,
  .repertoire-detail-panel > h2, .repertoire-detail-panel > p, .repertoire-detail-panel > .actions, .repertoire-detail-panel > .share, .repertoire-detail-panel > h3, .repertoire-detail-panel > .form, .repertoire-detail-panel > .mini-form, .repertoire-detail-panel > .list, .repertoire-detail-panel > .items {
    margin-left: 18px;
    margin-right: 18px;
  }
  .repertoire-list-panel .form, .repertoire-list-panel .list { padding-left: 18px; padding-right: 18px; }
  .mini-form { grid-template-columns: 1fr; }
  .actions > *, .downloads > * { width: 100%; }
}

body .app-shell {
  color: #121826;
}

body .app-shell label {
  margin: 0;
  color: #121826;
}

body .app-shell input:not([type='range']) {
  height: auto;
  padding: 0;
}

body .app-shell .url-input-shell input {
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #121826;
  box-shadow: none;
}

body .app-shell .dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

body .app-shell .source-tabs {
  margin-top: 28px;
}

body .app-shell .source-tab {
  color: #4f6076;
}

body .app-shell .source-tab.active {
  color: #061b19;
}

body .app-shell .source-card {
  color: #121826;
}

body .app-shell .mixer-section {
 color: #f7fbfb;
}

/* Compact working screens for /app and /repertorios. */
main { padding-top: 22px; }
.top { align-items: center; margin-bottom: 16px; }
.top h1 { font-size: clamp(28px, 3vw, 38px); }
.top p { margin-top: 5px; font-size: 14px; line-height: 1.35; }
.metrics { gap: 10px; margin-bottom: 16px; }
.metric { min-height: 66px; padding: 12px 14px; border-radius: 8px; }
.metric strong { font-size: 24px; }
.panel { border-radius: 8px; }
.panel-head { padding: 16px 18px; }
.panel h2 { font-size: 20px; }
.panel h3 { font-size: 16px; }
.panel-head p { margin-top: 3px; font-size: 13px; }
.body { gap: 11px; padding: 16px 18px; }
.panel > h2, .panel > h3, .panel > p, .panel > .form, .panel > .actions, .panel > .share, .panel > .mini-form, .panel > .list, .panel > .items { margin-left: 18px; margin-right: 18px; }
textarea { min-height: 132px; }
textarea, select, input { border-radius: 8px; }
button, .btn { border-radius: 8px; min-height: 38px; }
.btn.mini, button.mini { min-height: 32px; padding: 0 10px; font-size: 12px; }
.grid { gap: 16px; }
.list { gap: 8px; }
.item { border-radius: 8px; padding: 12px; }
.compact-tool { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); }
.compact-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.compact-head strong { font-family: 'Outfit', sans-serif; font-size: 16px; }
.compact-head span { color: var(--muted); font-size: 12px; font-weight: 700; }
.compact-results { display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.compact-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.compact-result span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.repertoire-grid { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.repertoire-list-panel .form, .repertoire-list-panel .list { padding-left: 18px; padding-right: 18px; }
.repertoire-list-panel .list { max-height: calc(100vh - 330px); overflow-y: auto; overflow-x: hidden; }
.items { max-height: calc(100vh - 360px); overflow-y: auto; overflow-x: hidden; }
@media (max-width: 760px) {
  .compact-head, .compact-result { display: grid; grid-template-columns: 1fr; }
  .repertoire-grid { grid-template-columns: 1fr; }
  .items, .repertoire-list-panel .list { max-height: none; }
}

/* ==========================================================================
   Spec 045: Redesign Dashboard da Minha Área (/app)
   ========================================================================== */
/* ==========================================================================
   Spec 045: Redesign Dashboard da Minha Área (/app)
   ========================================================================== */
.dash-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.dash-welcome-text h1 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.dash-welcome-text p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.dash-search-container {
  position: relative;
  margin-bottom: 26px;
  width: 100%;
}
.dash-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.dash-search-input-wrap svg {
  position: absolute;
  left: 16px;
  pointer-events: none;
  color: var(--muted);
}
.dash-search-input {
  width: 100%;
  height: 52px;
  padding: 0 84px 0 48px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(16, 24, 39, 0.75);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  backdrop-filter: blur(8px);
}
.dash-search-input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.15);
  background: rgba(16, 24, 39, 0.95);
}
.dash-search-kbd {
  position: absolute;
  right: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 11.5px;
  font-family: inherit;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 6px;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.dash-search-clear {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
  min-height: auto;
  line-height: 1;
  transition: color 0.15s;
}
.dash-search-clear:hover {
  color: var(--text);
}
.dash-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 100;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #0f172a;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  max-height: 380px;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  gap: 6px;
}
.dash-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
  border: 1px solid transparent;
}
.dash-search-item:hover, .dash-search-item.active, .dash-search-item:focus {
  background: rgba(94, 234, 212, 0.12);
  border-color: rgba(94, 234, 212, 0.3);
  transform: translateX(3px);
  outline: none;
}

.dash-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.dash-metric-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.dash-metric-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.dash-metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.dash-metric-card:hover::after {
  opacity: 1;
}
.dash-metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(94, 234, 212, 0.12);
  color: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: background 0.2s, transform 0.2s;
}
.dash-metric-card:hover .dash-metric-icon {
  background: rgba(94, 234, 212, 0.2);
  transform: scale(1.05);
}
.dash-metric-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dash-metric-info span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-metric-info strong {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin-top: 2px;
}
.dash-metric-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 500;
}

.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dash-section-head h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-section-head a, .dash-section-head span {
  color: var(--mint);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.dash-section-head a:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.dash-recent-section {
  margin-bottom: 30px;
}
.dash-recent-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.cifra-resume-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  min-height: 124px;
  position: relative;
}
.cifra-resume-card:hover {
  transform: translateY(-3px);
  border-color: rgba(94, 234, 212, 0.4);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}
.cifra-resume-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.cifra-resume-title {
  min-width: 0;
}
.cifra-resume-title strong {
  display: block;
  font-size: 15px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cifra-resume-title span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cifra-resume-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(94, 234, 212, 0.12);
  color: var(--mint);
  white-space: nowrap;
  flex-shrink: 0;
}
.cifra-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.cifra-resume-card:hover .cifra-resume-btn {
  background: linear-gradient(135deg, #5eead4, #0d9488);
  color: #04231e;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.cifra-suggest-empty {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.015);
}
.cifra-suggest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.cifra-suggest-head strong {
  font-size: 14px;
  color: var(--text);
}
.cifra-suggest-head span {
  font-size: 12.5px;
  color: var(--muted);
}
.cifra-suggest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.cifra-suggest-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.cifra-suggest-card:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.06);
}
.cifra-suggest-card strong {
  display: block;
  font-size: 13.5px;
  color: var(--text);
}
.cifra-suggest-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.dash-tools-section {
  margin-bottom: 32px;
}
.dash-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.dash-tool-card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.dash-tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}
.dash-tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dash-tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(94, 234, 212, 0.1);
  color: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.dash-tool-card:hover .dash-tool-icon {
  background: rgba(94, 234, 212, 0.2);
  transform: scale(1.05);
}
.dash-tool-card h3 {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
}
.dash-tool-card p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.dash-activity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px;
  align-items: start;
}
.dash-activity-card {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}
.dash-activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.dash-activity-header h3 {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-activity-body {
  padding: 16px 20px;
  display: grid;
  gap: 10px;
}
.dash-rep-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s, border-color 0.15s;
}
.dash-rep-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(94, 234, 212, 0.3);
}
.dash-rep-info strong {
  display: block;
  font-size: 14.5px;
  color: var(--text);
}
.dash-rep-info span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.dash-rep-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-stage-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #5eead4, #0d9488);
  color: #04231e;
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.dash-stage-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}

@media (max-width: 1180px) {
  .dash-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-activity-grid { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .dash-metrics-grid { grid-template-columns: 1fr; }
  .dash-tools-grid { grid-template-columns: 1fr; }
  .dash-welcome { flex-direction: column; align-items: flex-start; }
}

/* ─── PROGRAMA DE INDICAÇÃO (Indique e Ganhe 1 Mês Pro Grátis) ─── */
.dash-referral-card {
  position: relative;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, rgba(139, 92, 246, 0.09) 100%);
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.dash-referral-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.dash-referral-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dash-referral-gift {
  font-size: 14px;
  animation: flamePulse 2s ease-in-out infinite;
}

.dash-referral-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--soft);
  font-size: 12.5px;
  font-weight: 700;
}

.dash-referral-status-tag.success {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--mint);
}

.dash-referral-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.dash-referral-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.dash-referral-info p {
  margin: 0 0 16px;
  color: var(--soft);
  font-size: 13.5px;
  line-height: 1.45;
}

.dash-referral-info strong {
  color: #5eead4;
}

.dash-referral-progress-wrap {
  margin-top: 12px;
}

.dash-referral-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.dash-referral-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #5eead4, #8b5cf6);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.dash-referral-progress-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.dash-referral-progress-labels strong {
  font-size: 13px;
  color: #fff;
}

.dash-referral-actions-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
}

.dash-referral-actions-box label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--soft);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dash-referral-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dash-referral-input-group input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.4);
  color: #5eead4;
  font-family: monospace;
  font-size: 12.5px;
  outline: none;
}

.dash-referral-input-group input:focus {
  border-color: #5eead4;
}

.btn-copy-ref {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 0;
  background: #5eead4;
  color: #04231e;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.btn-copy-ref:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-copy-ref.copied {
  background: #10b981;
  color: #fff;
}

.dash-referral-share-buttons {
  margin-top: 10px;
}

.btn-share-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  border-radius: 10px;
  background: #25d366;
  color: #000;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.18s ease;
}

.btn-share-whatsapp:hover {
  background: #20ba59;
  transform: translateY(-1px);
}

.dash-referral-friends {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-referral-friends h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--soft);
  font-weight: 700;
}

.dash-referral-friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.dash-ref-friend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-ref-friend-icon {
  font-size: 16px;
}

.dash-ref-friend-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dash-ref-friend-info strong {
  font-size: 12.5px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-ref-friend-info span {
  font-size: 11px;
  color: var(--muted);
}

.dash-ref-friend-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
}

.dash-ref-friend-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #5eead4;
}

.dash-ref-friend-badge.applied {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

@media (max-width: 900px) {
  .dash-referral-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ─── Light Mode Overrides for Dashboard Components ─── */
html[data-theme="light"] aside {
  background: #ffffff;
  border-right-color: #e2e8f0;
}

html[data-theme="light"] .brand {
  color: #0f172a;
}

html[data-theme="light"] .ct-collapse-btn {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

html[data-theme="light"] .ct-collapse-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] .nav a {
  color: #475569;
}

html[data-theme="light"] .nav a:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] .nav a.active {
  background: #f0fdfa;
  color: #0d9488;
  border: 1px solid #ccfbf1;
}

html[data-theme="light"] .side-foot {
  border-top-color: #e2e8f0;
}

html[data-theme="light"] .side-foot a {
  color: #64748b;
}

html[data-theme="light"] .side-foot a:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] .dash-welcome-text h1 {
  color: #0f172a;
}

html[data-theme="light"] .dash-welcome-text p {
  color: #64748b;
}

html[data-theme="light"] .dash-search-input-wrap {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .dash-search-input-wrap:focus-within {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

html[data-theme="light"] .dash-search-input {
  color: #0f172a;
}

html[data-theme="light"] .dash-search-input::placeholder {
  color: #94a7c0;
}

html[data-theme="light"] .dash-search-kbd {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}

html[data-theme="light"] .dash-search-results {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .dash-search-item {
  border-bottom-color: #f1f5f9;
}

html[data-theme="light"] .dash-search-item:hover,
html[data-theme="light"] .dash-search-item.selected {
  background: #f0fdfa;
}

html[data-theme="light"] .dash-search-item-title {
  color: #0f172a;
}

html[data-theme="light"] .dash-search-item-meta {
  color: #64748b;
}

html[data-theme="light"] .dash-metric-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .dash-metric-card:hover {
  border-color: #0d9488;
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.08);
}

html[data-theme="light"] .dash-metric-icon {
  background: #f0fdfa;
  color: #0d9488;
}

html[data-theme="light"] .dash-metric-info span {
  color: #64748b;
}

html[data-theme="light"] .dash-metric-info strong {
  color: #0f172a;
}

html[data-theme="light"] .dash-metric-sub {
  color: #94a7c0;
}

html[data-theme="light"] .dash-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .dash-card-header h2 {
  color: #0f172a;
}

html[data-theme="light"] .dash-card-header p {
  color: #64748b;
}

html[data-theme="light"] .dash-tool-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html[data-theme="light"] .dash-tool-card:hover {
  background: #ffffff;
  border-color: #0d9488;
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.08);
}

html[data-theme="light"] .dash-tool-icon {
  background: #f0fdfa;
  color: #0d9488;
}

html[data-theme="light"] .dash-tool-info strong {
  color: #0f172a;
}

html[data-theme="light"] .dash-tool-info p {
  color: #64748b;
}

html[data-theme="light"] .dash-rep-item {
  border-bottom-color: #f1f5f9;
}

html[data-theme="light"] .dash-rep-item:hover {
  background: #f8fafc;
}

html[data-theme="light"] .dash-rep-name {
  color: #0f172a;
}

html[data-theme="light"] .dash-rep-meta {
  color: #64748b;
}

html[data-theme="light"] .dash-referral-card {
  background: linear-gradient(135deg, #f0fdfa 0%, #f5f3ff 100%);
  border-color: #ccfbf1;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .dash-referral-info h2 {
  color: #0f172a;
}

html[data-theme="light"] .dash-referral-info p {
  color: #334155;
}

html[data-theme="light"] .dash-referral-info strong {
  color: #0f766e;
}

html[data-theme="light"] .dash-referral-actions-box {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .dash-referral-actions-box label {
  color: #475569;
}

html[data-theme="light"] .dash-referral-input-group input {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f766e;
}

html[data-theme="light"] .dash-referral-progress-bar {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

html[data-theme="light"] .dash-referral-progress-labels strong {
  color: #0f172a;
}

html[data-theme="light"] .dash-ref-friend-item {
  background: #ffffff;
  border-color: #e2e8f0;
}

html[data-theme="light"] .dash-ref-friend-info strong {
  color: #0f172a;
}

html[data-theme="light"] .dash-referral-friends h4 {
  color: #334155;
}

html[data-theme="light"] .modal {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15);
}

html[data-theme="light"] .empty-state {
  background: #f8fafc;
  border-color: #cbd5e1;
}

html[data-theme="light"] .empty-state strong {
  color: #0f172a;
}



