/* TipStage — App Styles
   Built on DesignKit tokens.css */

:root {
  --accent: #f97316;
  --accent-dim: rgba(249, 115, 22, 0.12);
  --accent-glow: rgba(249, 115, 22, 0.28);
  --accent-hover: #ea580c;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: var(--bg-raised);
  border-color: var(--border-bright);
  color: var(--text);
}
.btn-secondary:hover { background: var(--bg-hover); }

.btn-lg { padding: 14px 28px; font-size: 17px; }
.w-full { width: 100%; }

/* ═══════════════════════════════════════════
   INPUTS
   ═══════════════════════════════════════════ */

input[type="text"],
input[type="email"],
input[type="number"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  transition: border-color var(--transition-fast);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ═══════════════════════════════════════════
   PERFORMER TIP PAGE (Mobile-first)
   ═══════════════════════════════════════════ */

.tip-page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
}

.tip-cover {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.tip-header {
  text-align: center;
  padding: 0 24px 24px;
  margin-top: -48px;
  position: relative;
}

.tip-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  margin: 0 auto 12px;
  overflow: hidden;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}
.tip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tip-header h1 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.tip-meta {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 8px;
}

.tip-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 360px;
  margin: 0 auto;
}

.tip-socials {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 12px;
  font-size: 1.25rem;
}
.tip-socials a {
  text-decoration: none;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}
.tip-socials a:hover { opacity: 1; }

/* Tip section */
.tip-section {
  padding: 24px;
  border-top: 1px solid var(--border);
}

.tip-section h3 {
  font-size: 1.125rem;
  margin-bottom: 16px;
}

.tip-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.tip-btn {
  padding: 14px 8px;
  background: var(--bg-raised);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.tip-btn:hover { border-color: var(--accent); }
.tip-btn.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.tip-custom {
  margin-bottom: 16px;
}
.tip-custom label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
}
.tip-custom-input {
  display: flex;
  align-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 14px;
}
.tip-custom-input span {
  color: var(--text-muted);
  font-size: 17px;
  margin-right: 4px;
}
.tip-custom-input input {
  border: none;
  background: none;
  padding: 10px 0;
  font-size: 17px;
  width: 100%;
}

.tip-cover-fees {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}
.tip-cover-fees input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.tip-optional {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.tip-total {
  text-align: center;
  margin-bottom: 8px;
  min-height: 20px;
}
.tip-total small {
  color: var(--text-muted);
  font-size: 13px;
}

.tip-powered {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Schedule */
.schedule-slot {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.schedule-slot:last-child { border-bottom: none; }
.schedule-date {
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
  min-width: 120px;
}
.schedule-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.schedule-info strong { font-size: 15px; }
.schedule-info span { font-size: 14px; color: var(--text-secondary); }
.schedule-info small { font-size: 13px; color: var(--text-muted); }

/* Media embeds */
.media-embed {
  position: relative;
  padding-bottom: 56.25%;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
}
.media-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.media-embed-sm { padding-bottom: 80px; height: 80px; }
.media-embed-sm iframe { height: 80px; }

.media-link {
  display: block;
  padding: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
}
.media-link:hover { border-color: var(--accent); }

/* Follow */
.tip-follow {
  display: flex;
  gap: 8px;
}
.tip-follow input { flex: 1; }

/* Loading */
.tip-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tip-not-found {
  text-align: center;
  padding: 80px 24px;
}
.tip-not-found h2 { margin-bottom: 8px; }

/* ═══════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════ */

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { border-color: var(--success); }
.toast-danger { border-color: var(--danger); }
.toast-warning { border-color: var(--warning); }

/* ═══════════════════════════════════════════
   DASHBOARD LAYOUT
   ═══════════════════════════════════════════ */

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.dash-header h2 { font-size: 1.25rem; }

.dash-nav {
  display: flex;
  gap: 4px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.dash-nav a {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.dash-nav a:hover { background: var(--bg-hover); color: var(--text); }
.dash-nav a.active { background: var(--accent-dim); color: var(--accent); }

.dash-content {
  padding: 24px;
  max-width: 960px;
  margin: 0 auto;
}

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.data-table tr:hover { background: var(--bg-hover); }

/* Card */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

/* Form groups */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

/* Alert */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-warning {
  background: rgba(243, 156, 18, 0.12);
  border: 1px solid rgba(243, 156, 18, 0.3);
  color: #f39c12;
}
.alert-success {
  background: rgba(39, 174, 96, 0.12);
  border: 1px solid rgba(39, 174, 96, 0.3);
  color: #27ae60;
}

/* QR preview */
.qr-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px;
}
.qr-preview canvas, .qr-preview img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.qr-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Responsive */
@media (max-width: 480px) {
  .tip-amounts { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .tip-btn { padding: 12px 4px; font-size: 15px; }
  .dash-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
