/* ==========================================================================
   RABU - dashboard.css  (paneles admin / musico, formularios, tablas, auth)
   ========================================================================== */

/* Stats cards */
.stats-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 32px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(29, 185, 84, 0.12);
}
.stat-value {
  font-family: "Oswald", sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--green-2);
  line-height: 1;
}
.stat-label {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Panel block */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 24px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.panel-head h3 {
  font-size: 18px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
}
table.data th,
table.data td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}
table.data th {
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
table.data tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}
.cell-thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}
.row-actions {
  display: flex;
  gap: 8px;
}

/* Forms */
.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field.full {
  grid-column: 1 / -1;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}
.field input,
.field select,
.field textarea {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border 0.15s;
  width: 100%;
}
.field textarea {
  resize: vertical;
  min-height: 90px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green);
}
.field input[type="file"] {
  padding: 9px;
  cursor: pointer;
}
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.file-preview {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--card);
}

/* badge */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(29, 185, 84, 0.15);
  color: var(--green-2);
}
.badge--admin {
  background: rgba(224, 51, 90, 0.15);
  color: #ff6b8a;
}

/* Artist admin cards */
.artist-admin-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.artist-admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}
.artist-admin-card:hover {
  transform: translateY(-3px);
  border-color: rgba(113, 223, 194, 0.45);
}
.artist-admin-card.is-inactive {
  opacity: 0.7;
}
.artist-admin-cover {
  position: relative;
  height: 150px;
  overflow: hidden;
  background: #101820;
}
.artist-admin-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.artist-admin-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 21, 30, 0.15), rgba(15, 21, 30, 0.92));
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.artist-admin-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(15, 21, 30, 0.9);
  background: rgba(9, 12, 16, 0.7);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.artist-admin-body {
  padding: 18px 18px 16px;
}
.artist-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.artist-admin-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.artist-admin-genre {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 13px;
}
.artist-admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}
.icon-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}
.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(113, 223, 194, 0.6);
  background: rgba(113, 223, 194, 0.08);
}
.icon-btn--danger:hover {
  border-color: rgba(224, 51, 90, 0.5);
  background: rgba(224, 51, 90, 0.12);
  color: #ff9bb0;
}

.artist-editor {
  display: grid;
  gap: 22px;
}
.artist-editor-hero {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #1d2b3a 0%, #0f172a 52%, #101820 100%);
}
.artist-editor-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.artist-editor-overlay {
  position: absolute;
  inset: 0;
  padding: 26px 28px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  background: linear-gradient(180deg, rgba(13, 19, 28, 0.18), rgba(13, 19, 28, 0.9));
}
.artist-editor-avatar-wrap {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(13, 19, 28, 0.8);
  background: linear-gradient(135deg, rgba(113, 223, 194, 0.35), rgba(72, 115, 255, 0.25));
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.32);
  flex-shrink: 0;
}
.artist-editor-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.artist-editor-meta {
  min-width: 0;
}
.artist-editor-meta .eyebrow {
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--green-2);
  font-weight: 700;
}
.artist-editor-meta h2 {
  margin: 10px 0 4px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.04;
  text-wrap: balance;
}
.artist-editor-meta .meta {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}
.artist-form-panel {
  padding: 24px;
}

.album-admin-grid,
.track-admin-grid,
.sponsor-admin-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.album-admin-card,
.track-admin-card,
.sponsor-admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}
.album-admin-card:hover,
.track-admin-card:hover,
.sponsor-admin-card:hover {
  transform: translateY(-3px);
  border-color: rgba(113, 223, 194, 0.45);
}
.album-admin-card.is-inactive,
.track-admin-card.is-inactive,
.sponsor-admin-card.is-inactive {
  opacity: 0.7;
}
.album-admin-cover,
.track-admin-cover,
.sponsor-admin-cover {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: linear-gradient(135deg, #1b2635 0%, #142330 50%, #0f172a 100%);
}
.album-admin-image,
.track-admin-image,
.sponsor-admin-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.album-admin-body,
.track-admin-body,
.sponsor-admin-body {
  padding: 18px 18px 16px;
}
.album-admin-head,
.track-admin-head,
.sponsor-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.album-admin-title,
.track-admin-title,
.sponsor-admin-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.album-admin-meta,
.track-admin-meta,
.sponsor-admin-meta {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
}
.album-admin-actions,
.track-admin-actions,
.sponsor-admin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.album-editor,
.track-editor,
.sponsor-editor {
  display: grid;
  gap: 22px;
}
.album-editor-hero,
.track-editor-hero,
.sponsor-editor-hero {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #1b2635 0%, #111827 52%, #0d1723 100%);
}
.album-editor-cover,
.track-editor-cover,
.sponsor-editor-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.album-editor-overlay,
.track-editor-overlay,
.sponsor-editor-overlay {
  position: absolute;
  inset: 0;
  padding: 26px 28px;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  background: linear-gradient(180deg, rgba(13, 19, 28, 0.18), rgba(13, 19, 28, 0.9));
}
.album-editor-art-wrap,
.track-editor-art-wrap,
.sponsor-editor-logo-wrap {
  width: 112px;
  height: 112px;
  border-radius: 18px;
  overflow: hidden;
  border: 4px solid rgba(13, 19, 28, 0.8);
  background: linear-gradient(135deg, rgba(113, 223, 194, 0.22), rgba(112, 74, 255, 0.24));
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.32);
  flex-shrink: 0;
}
.album-editor-art,
.track-editor-art,
.sponsor-editor-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.album-editor-meta,
.track-editor-meta,
.sponsor-editor-meta {
  min-width: 0;
}
.album-editor-meta .eyebrow,
.track-editor-meta .eyebrow,
.sponsor-editor-meta .eyebrow {
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--green-2);
  font-weight: 700;
}
.album-editor-meta h2,
.track-editor-meta h2,
.sponsor-editor-meta h2 {
  margin: 10px 0 4px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.04;
  text-wrap: balance;
}
.album-editor-meta .meta,
.track-editor-meta .meta,
.sponsor-editor-meta .meta {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}
.album-form-panel,
.track-form-panel,
.sponsor-form-panel {
  padding: 24px;
}

@media (max-width: 640px) {
  .artist-admin-head {
    align-items: center;
  }

  .artist-admin-name {
    font-size: 18px;
  }

  .artist-editor-hero {
    height: 200px;
  }

  .artist-editor-overlay {
    padding: 18px 18px;
    gap: 14px;
  }

  .artist-editor-avatar-wrap {
    width: 88px;
    height: 88px;
  }

  .album-admin-head,
  .track-admin-head,
  .sponsor-admin-head {
    align-items: center;
  }

  .album-admin-title,
  .track-admin-title,
  .sponsor-admin-title {
    font-size: 18px;
  }

  .album-editor-hero,
  .track-editor-hero,
  .sponsor-editor-hero {
    height: 200px;
  }

  .album-editor-overlay,
  .track-editor-overlay,
  .sponsor-editor-overlay {
    padding: 18px 18px;
    gap: 14px;
  }

  .album-editor-art-wrap,
  .track-editor-art-wrap,
  .sponsor-editor-logo-wrap {
    width: 88px;
    height: 88px;
  }
}

/* ============================ Auth / Login =============================== */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 0%, #14361f 0%, var(--bg) 55%);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 38px 32px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.auth-brand .brand-mark {
  font-size: 44px;
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  color: var(--green);
}
.auth-brand p {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 4px;
}
.auth-card h2 {
  font-size: 22px;
  margin-bottom: 4px;
  text-align: center;
}
.auth-card .sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 24px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-form .btn {
  width: 100%;
  margin-top: 6px;
  padding: 13px;
}
.auth-demo {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.7;
}
.auth-demo strong {
  color: var(--text);
}
.auth-error {
  background: rgba(224, 51, 90, 0.14);
  border: 1px solid rgba(224, 51, 90, 0.4);
  color: #ff8fa6;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  display: none;
}
.auth-error.show {
  display: block;
}
.auth-back {
  display: block;
  text-align: center;
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 13px;
}
.auth-back:hover {
  color: var(--green-2);
}

/* dashboard layout header */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 14px;
  flex-wrap: wrap;
}
.dash-header h1 {
  font-size: 28px;
}
.dash-header .sub {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 2px;
}

/* Search dropdown */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  max-height: 420px;
  overflow-y: auto;
  z-index: 60;
  display: none;
  padding: 8px;
}
.search-results.show {
  display: block;
}
.sr-group + .sr-group {
  margin-top: 4px;
}
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 460px;
}
.sr-group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 10px 10px 4px;
}
.sr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: none;
}
.sr-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.sr-icon {
  flex-shrink: 0;
  width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.sr-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sr-item img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
}
.sr-item .sr-title {
  font-size: 14px;
  font-weight: 600;
}
.sr-item .sr-sub {
  font-size: 12px;
  color: var(--text-dim);
}
.sr-empty {
  padding: 14px 10px;
  color: var(--text-dim);
  font-size: 14px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
}
.modal-overlay.show {
  display: flex;
}
.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
}
.modal h3 {
  font-size: 20px;
  margin-bottom: 18px;
}

/* Donation modal */
.donation-modal {
  position: relative;
  max-width: 440px;
}
.donation-modal .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}
.donation-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}
.donation-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  transition: transform 0.12s ease, opacity 0.18s ease;
}
.donation-btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}
.donation-btn-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.donation-btn--mp {
  background: #009ee3;
}
.donation-btn--pp {
  background: #003087;
}
.donation-alias {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-top: -4px;
}
.donation-alias strong {
  color: var(--text);
}
.donation-terms {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}
.donation-terms a {
  color: var(--primary-light);
  text-decoration: underline;
}
