/* ============================================================
   ARTIST PORTAL — artist.css
   Extends the shared styles.css dark theme
   ============================================================ */

/* ── Layout ─────────────────────────────────────────────── */
body { background: #000; }

.screen { min-height: 100vh; padding-top: 80px; }

/* ── Navbar extras ───────────────────────────────────────── */
.nav-username {
  color: var(--color-text-secondary, #888);
  font-size: 0.9rem;
  margin-right: 12px;
  line-height: 1;
  align-self: center;
}
.btn-nav-logout {
  background: transparent;
  border: 1px solid #444;
  color: #ccc;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-nav-logout:hover { border-color: var(--color-primary, #2196F3); color: #fff; }

.nav-home-link {
  color: var(--color-text-secondary, #888);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-right: 12px;
  transition: color 0.2s;
}
.nav-home-link:hover { color: var(--color-primary, #2196F3); }

/* ── Footer ──────────────────────────────────────────────── */
.artist-footer {
  text-align: center;
  padding: 32px 16px 24px;
  border-top: 1px solid #1a1a1a;
  margin-top: 40px;
}
.artist-footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.artist-footer-links a {
  color: var(--color-text-secondary, #888);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.artist-footer-links a:hover { color: var(--color-primary, #2196F3); }
.artist-footer-copy {
  color: #555;
  font-size: 0.78rem;
  margin: 0;
}

/* ── Auth card ───────────────────────────────────────────── */
#screen-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 16px 40px;
}
.auth-card {
  background: #111;
  border: 1px solid #222;
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.auth-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 6px;
  background: linear-gradient(135deg, #fff, var(--color-primary, #2196F3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-subtitle {
  color: #888;
  font-size: 0.95rem;
  margin: 0 0 24px;
}

/* Tab switcher */
.tab-switcher {
  display: flex;
  background: #1a1a1a;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 28px;
  gap: 4px;
}
.tab-btn {
  flex: 1;
  padding: 9px 0;
  border: none;
  background: transparent;
  color: #777;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.tab-btn.active {
  background: var(--color-primary, #2196F3);
  color: #fff;
}

/* ── Generic form ────────────────────────────────────────── */
.auth-form, form { width: 100%; }
.hidden { display: none !important; }

.field-group { margin-bottom: 18px; }
.field-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #bbb;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.required { color: var(--color-primary, #2196F3); }
.field-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: #555; font-size: 0.78rem; }

/* URL platform fields */
.url-fields { display: flex; flex-direction: column; gap: 8px; }
.url-field-row { display: flex; align-items: center; gap: 10px; }
.url-field-row input { flex: 1; margin: 0; }
.url-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  width: 82px;
  text-align: center;
  letter-spacing: 0.03em;
}
.url-badge-yt { background: rgba(255,0,0,0.15); color: #ff4444; border: 1px solid rgba(255,0,0,0.25); }
.url-badge-sp { background: rgba(29,185,84,0.15); color: #1db954; border: 1px solid rgba(29,185,84,0.25); }
.url-badge-sc { background: rgba(255,85,0,0.15);  color: #ff5500; border: 1px solid rgba(255,85,0,0.25); }

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: auto;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--color-primary, #2196F3);
  box-shadow: 0 0 0 3px rgba(33,150,243,0.15);
}
.field-group select { cursor: pointer; }
.field-group input::placeholder { color: #555; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Password */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1rem; padding: 0; opacity: 0.5;
  transition: opacity 0.2s;
}
.toggle-pw:hover { opacity: 1; }

/* Password hints */
.pw-hints { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.hint { font-size: 0.78rem; color: #666; }
.hint.ok { color: #4caf50; }

/* Error */
.form-error {
  color: #f44336;
  font-size: 0.82rem;
  margin-bottom: 10px;
  background: rgba(244,67,54,0.08);
  border-radius: 6px;
  padding: 0;
  transition: padding 0.2s;
}
.form-error:empty { display: none; }
.form-error:not(:empty) { padding: 8px 12px; }

/* Primary button */
.btn-primary-full {
  display: block;
  width: 100%;
  background: var(--color-primary, #2196F3);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
  margin-top: 4px;
}
.btn-primary-full:hover { background: #1976d2; }
.btn-primary-full:active { transform: scale(0.98); }
.btn-primary-full:disabled { opacity: 0.5; cursor: not-allowed; }

.forgot-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: #666;
  font-size: 0.85rem;
  text-decoration: none;
}
.forgot-link:hover { color: var(--color-primary, #2196F3); }
.legal-note {
  font-size: 0.75rem;
  color: #555;
  text-align: center;
  margin-top: 14px;
  line-height: 1.5;
}
.legal-note a { color: #888; text-decoration: underline; }

.legal-checks { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: #aaa;
  line-height: 1.5;
}
.checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px; height: 16px;
  margin-top: 2px;
  accent-color: var(--color-primary, #2196F3);
  cursor: pointer;
}
.checkbox-label a { color: #2196F3; text-decoration: none; }
.checkbox-label a:hover { text-decoration: underline; }

/* ── Dashboard ───────────────────────────────────────────── */
.dashboard-container { padding: 32px 24px 60px; max-width: 1100px; margin: 0 auto; }
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.dashboard-title { font-size: 2rem; font-weight: 800; margin: 0; color: #fff; }
.dashboard-sub { color: #666; margin: 4px 0 0; font-size: 0.9rem; }
.btn-upload-new {
  background: var(--color-primary, #2196F3);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}
.btn-upload-new:hover { background: #1976d2; }
.btn-upload-new:active { transform: scale(0.97); }

/* Tracks grid */
.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.tracks-loading, .tracks-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #555;
  padding: 60px 0;
  font-size: 1rem;
}

/* Track card */
.track-card {
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.track-card:hover { border-color: #333; transform: translateY(-2px); }

.track-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #1a1a1a;
  display: block;
}
.track-cover-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #1a1a1a, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.track-info { padding: 14px 16px 12px; }
.track-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}
.track-status-pending {
  background: rgba(255, 152, 0, 0.12);
  color: #FF9800;
  border: 1px solid rgba(255, 152, 0, 0.35);
}
.track-status-rejected {
  background: rgba(255, 107, 107, 0.12);
  color: #FF6B6B;
  border: 1px solid rgba(255, 107, 107, 0.35);
}
.track-meta {
  font-size: 0.78rem;
  color: #666;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.track-meta span { display: flex; align-items: center; gap: 4px; }

.track-stats {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}
.stat { font-size: 0.78rem; color: #888; display: flex; align-items: center; gap: 4px; }
.stat-val { color: #ddd; font-weight: 600; }

.track-actions { display: flex; gap: 8px; }
.btn-edit, .btn-delete {
  flex: 1;
  padding: 8px 0;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.btn-edit { background: #1a1a1a; color: #ccc; border: 1px solid #333; }
.btn-edit:hover { background: #252525; color: #fff; }
.btn-delete { background: rgba(244,67,54,0.1); color: #f44336; border: 1px solid rgba(244,67,54,0.2); }
.btn-delete:hover { background: rgba(244,67,54,0.2); }

/* ── Modals ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  overflow-y: auto;
}
.modal {
  background: #111;
  border: 1px solid #222;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  padding: 32px 32px 24px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  position: relative;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.modal-sm { max-width: 400px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h2 { font-size: 1.3rem; font-weight: 700; margin: 0; color: #fff; }
.modal-close {
  background: #1a1a1a; border: none; color: #aaa;
  width: 32px; height: 32px; border-radius: 8px;
  font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: #2a2a2a; color: #fff; }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px;
}
.modal-submit { width: auto; flex: 1; margin-top: 0; max-width: 200px; }
.btn-cancel {
  background: #1a1a1a; border: 1px solid #333; color: #aaa;
  padding: 12px 20px; border-radius: 10px; font-size: 0.9rem; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-cancel:hover { background: #252525; color: #fff; }
.btn-danger {
  background: #f44336; border: none; color: #fff;
  padding: 12px 20px; border-radius: 10px; font-size: 0.9rem; font-weight: 700; cursor: pointer;
  transition: background 0.2s;
}
.btn-danger:hover { background: #d32f2f; }

.delete-msg { color: #aaa; font-size: 0.95rem; line-height: 1.6; margin: 0 0 4px; }
.delete-msg span { color: #fff; font-weight: 600; }

/* File drop */
.file-drop {
  border: 2px dashed #333;
  border-radius: 12px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.file-drop:hover, .file-drop.drag-over {
  border-color: var(--color-primary, #2196F3);
  background: rgba(33,150,243,0.05);
}
.drop-icon { font-size: 1.8rem; display: block; margin-bottom: 6px; }
.drop-text { font-size: 0.82rem; color: #666; }
.file-chosen { color: #4caf50; font-size: 0.82rem; margin-top: 6px; display: block; }

.cover-preview {
  width: 100%; max-width: 200px; aspect-ratio: 1; height: auto;
  border-radius: 10px; object-fit: cover;
  margin-top: 10px; border: 1px solid #333; display: block;
}

/* ── Clip trimmer placeholder ────────────────────────────── */
.clip-trimmer-placeholder {
  border: 2px dashed #2a2a2a;
  border-radius: 12px;
  padding: 18px 0;
  text-align: center;
}
.trim-hint-pending { font-size: 0.8rem; color: #555; margin: 0; }

/* ── Clip wizard ─────────────────────────────────────────── */
.clip-wizard { padding: 4px 0 8px; }

.clip-step-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.clip-step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #1e1e1e;
  border: 2px solid #333;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.clip-step-dot.active { background: var(--color-primary, #2196F3); border-color: var(--color-primary, #2196F3); }
.clip-step-line {
  flex: 1;
  height: 2px;
  background: #2a2a2a;
  max-width: 64px;
  transition: background 0.2s;
}
.clip-step-line.active { background: var(--color-primary, #2196F3); }

.wizard-card {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 16px;
}
.wizard-card-title { font-size: 0.9rem; font-weight: 600; color: #fff; margin-bottom: 4px; }
.wizard-card-hint { font-size: 0.78rem; color: #666; margin: 0 0 14px; }

.wizard-times {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.wizard-time-box { display: flex; flex-direction: column; gap: 2px; }
.wizard-right { text-align: right; }
.wizard-time-label { font-size: 0.72rem; color: #555; }
.wizard-time-value { font-size: 0.95rem; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.wizard-time-center { display: flex; align-items: center; justify-content: center; }
.wizard-dur-badge {
  font-size: 0.85rem;
  color: var(--color-primary, #2196F3);
  font-weight: 700;
  background: rgba(33,150,243,0.12);
  padding: 3px 10px;
  border-radius: 20px;
}

.wizard-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.wizard-slider-edge { font-size: 0.72rem; color: #555; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.wizard-slider-track {
  flex: 1;
  position: relative;
  height: 6px;
  background: #2a2a2a;
  border-radius: 3px;
  margin: 11px 0;
}
.wizard-slider-fill {
  position: absolute;
  top: 0; height: 100%;
  background: var(--color-primary, #2196F3);
  border-radius: 3px;
  pointer-events: none;
}
.wizard-slider-handle {
  position: absolute;
  top: 50%;
  width: 22px; height: 22px;
  background: #fff;
  border: 3px solid var(--color-primary, #2196F3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 0.1s, box-shadow 0.1s;
}
.wizard-slider-handle:active { cursor: grabbing; transform: translate(-50%, -50%) scale(1.2); }

.wizard-warning { font-size: 0.78rem; color: #ff6b6b; margin: -6px 0 8px; text-align: center; }

.wizard-action-row { display: flex; gap: 8px; margin-top: 12px; }

.wizard-confirm-btn {
  flex: 1;
  padding: 10px 0;
  background: var(--color-primary, #2196F3);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.wizard-confirm-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.wizard-back-btn {
  padding: 10px 14px;
  background: transparent;
  color: #888;
  border: 1px solid #333;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}
.wizard-back-btn:hover { background: #1a1a1a; }

.wizard-done-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.wizard-done-check {
  width: 24px; height: 24px;
  background: #4CAF50;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.wizard-done-text { font-size: 0.92rem; font-weight: 600; color: #4CAF50; }

.wizard-preview-btn {
  flex: 1;
  padding: 10px 0;
  background: transparent;
  color: var(--color-primary, #2196F3);
  border: 1px solid var(--color-primary, #2196F3);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.wizard-preview-btn:hover, .wizard-preview-btn.playing { background: rgba(33,150,243,0.1); }

/* Progress bar */
.upload-progress { margin-bottom: 12px; }
.progress-bar { height: 6px; background: #1a1a1a; border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.progress-fill { height: 100%; background: var(--color-primary, #2196F3); border-radius: 3px; width: 0%; transition: width 0.3s; }
#progress-label { font-size: 0.8rem; color: #888; }

/* ── Crop modal ──────────────────────────────────────────── */
.crop-modal { max-width: 360px; }
.crop-hint  { font-size: 0.82rem; color: #666; margin: 0 0 14px; }
.crop-viewport {
  width: 280px; height: 280px;
  border-radius: 8px;
  border: 2px solid #2a2a2a;
  overflow: hidden;
  margin: 0 auto 14px;
  cursor: grab;
}
.crop-viewport:active { cursor: grabbing; }
.crop-viewport canvas { display: block; touch-action: none; }
.crop-zoom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.crop-zoom-label { font-size: 1rem; color: #666; }
.crop-zoom-slider { flex: 1; accent-color: var(--color-primary, #2196F3); }

/* ── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #222; border: 1px solid #333; color: #fff;
  padding: 12px 22px; border-radius: 12px; font-size: 0.9rem;
  z-index: 2000; pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.hidden { opacity: 0; pointer-events: none; }
.toast.success { border-color: #4caf50; background: rgba(76,175,80,0.15); }
.toast.error { border-color: #f44336; background: rgba(244,67,54,0.15); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .auth-card { padding: 28px 20px; }
  .auth-title { font-size: 1.6rem; }
  .dashboard-container { padding: 24px 16px 48px; }
  .modal { padding: 24px 20px 20px; }
  .field-row { grid-template-columns: 1fr; }
  .tracks-grid { grid-template-columns: 1fr; }
}

.cp-desc { margin-bottom: 20px; }

/* ── Social login buttons ────────────────────────────────────── */
.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
  font-family: 'Inter', sans-serif;
}
.btn-social:active { transform: scale(0.98); }
.btn-google {
  background: #fff;
  color: #3c3c3c;
  border: 1px solid #e0e0e0;
}
.btn-google:hover { background: #f5f5f5; }
.btn-apple {
  background: #fff;
  color: #000;
  border: 1px solid #e0e0e0;
}
.btn-apple:hover { background: #f5f5f5; }
.social-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: #555;
  font-size: 0.82rem;
}
.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #2a2a2a;
}
