/* Watermelon CMS - Modern SaaS Dashboard Stylesheet */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --watermelon-rose: #e11d48;
  --watermelon-green: #10b981;
  --dark-bg: #0f172a;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
}

@font-face {
  font-family: 'Metropolis';
  src: url('../../assets/fonts/Metropolis-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Metropolis';
  src: url('../../assets/fonts/Metropolis-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  overflow-x: hidden;
}

.font-metropolis {
  font-family: 'Metropolis', sans-serif;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Card & UI Elevation */
.admin-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.admin-card-hover:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

/* Sidebar Active Nav */
.nav-link {
  display: flex;
  items-center: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  transition: all 0.15s ease-in-out;
}

.nav-link:hover {
  color: #1e293b;
  background-color: #f1f5f9;
}

.nav-link.active {
  color: #2563eb;
  background-color: #eff6ff;
  font-weight: 600;
}

.nav-link.active svg {
  color: #2563eb;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-active, .badge-published, .badge-completed, .badge-fully-paid {
  background-color: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.badge-draft, .badge-inactive, .badge-unpaid, .badge-cancelled {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.badge-breaking, .badge-advance-paid {
  background-color: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}
.badge-in-progress, .badge-in-review {
  background-color: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

/* Data Table Styling */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.admin-table th {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.admin-table td {
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}
.admin-table tr:hover td {
  background-color: #fafafa;
}

/* Rich Text Editor Styling */
.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  background: #f8fafc;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  border-bottom: none;
}
.rich-editor-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  border-radius: 0.375rem;
  transition: all 0.15s;
}
.rich-editor-btn:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}
.rich-editor-content {
  min-height: 220px;
  max-height: 420px;
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid #cbd5e1;
  border-bottom-left-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
  background: #ffffff;
  outline: none;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.rich-editor-content:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Audio Player Floating Bar */
.audio-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modals & Backdrop */
.modal-backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease-out;
}
.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}
.modal-box {
  transform: scale(0.95) translateY(10px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.active .modal-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  color: #1e293b;
  border-radius: 0.85rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  min-width: 280px;
  max-width: 420px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast-success { border-left: 4px solid #10b981; }
.toast-error { border-left: 4px solid #e11d48; }
.toast-info { border-left: 4px solid #2563eb; }

/* Timeline UI for Watermelon Design */
.timeline-item {
  position: relative;
  padding-left: 1.75rem;
  padding-bottom: 1.5rem;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0.4375rem;
  top: 0.75rem;
  bottom: 0;
  width: 2px;
  background-color: #e2e8f0;
}
.timeline-item:last-child::before {
  display: none;
}
.timeline-dot {
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background-color: #2563eb;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 1px #cbd5e1;
}
