/* Modern Artist Panel Styles - Dark Theme */
:root {
  --primary: #818cf8; /* Indigo 400 */
  --primary-dark: #6366f1; /* Indigo 500 */
  --secondary: #94a3b8;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --bg-body: #0f0518; /* Deep Violet Black */
  --bg-card: #1a0b2e; /* Dark Violet */
  --text-main: #ffffff;
  --text-muted: #a5b4fc;
  --text-light: #cbd5e1;
  --border-color: #2e1065; /* Dark purple border */
  --sidebar-width: 280px;
  --sidebar-bg: #130725;
  --header-height: 70px;
  
  --glass-bg: rgba(26, 11, 46, 0.7);
  --glass-bg-light: rgba(46, 16, 101, 0.5);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-border-light: 1px solid rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --glass-blur: blur(12px);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  overflow-x: hidden;
}

/* App Layout */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.modern-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.sidebar-nav {
  flex: 1;
  padding: 24px 12px;
  padding-bottom: 100px;
  overflow-y: auto;
}

/* Custom Scrollbar for Sidebar */
.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.4);
  margin: 24px 12px 8px;
  font-weight: 600;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.nav-link:hover {
  background: rgba(255,255,255,0.05);
  color: white;
  transform: translateX(4px);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent);
  color: white;
  border-left: 3px solid var(--primary);
  border-radius: 4px 8px 8px 4px;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  opacity: 0.8;
}

.nav-link.active svg {
  opacity: 1;
  color: var(--primary);
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.1);
}

/* Main Content */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  max-width: 1600px;
  width: 100%;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
}

.page-title h1 {
  font-size: 1.875rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(to right, #fff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.025em;
}

.page-title p {
  color: var(--text-muted);
  margin: 4px 0 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-main);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Content Card */
.content-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.card-body {
  padding: 24px;
}

/* Modern Table */
.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.modern-table th {
  text-align: left;
  padding: 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.modern-table td {
  padding: 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s ease;
  color: var(--text-main);
}

.modern-table tr:hover td {
  background: rgba(255,255,255,0.03);
}

.modern-table tr:last-child td {
  border-bottom: none;
}

.track-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}

.track-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.approved { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge.pending { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge.rejected { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Utilities */
.badge-success { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-secondary { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }

.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-white { background: #ffffff; }

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-main);
  transition: all 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: rgba(0, 0, 0, 0.3);
}
.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.form-group { margin-bottom: 20px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Mobile Responsive */
.mobile-trigger {
  display: none;
}

@media (max-width: 1024px) {
  .modern-sidebar {
    transform: translateX(-100%);
  }
  
  .modern-sidebar.open {
    transform: translateX(0);
  }
  
  .main-wrapper {
    margin-left: 0;
    padding: 20px;
    padding-top: 70px;
    padding-bottom: 80px;
  }
  
  .mobile-trigger {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 60;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    border: none;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.6);
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  /* Force table to not be like tables anymore */
  .modern-table, 
  .modern-table thead, 
  .modern-table tbody, 
  .modern-table th, 
  .modern-table td, 
  .modern-table tr { 
    display: block; 
  }

  /* Hide table headers (but not display: none;, for accessibility) */
  .modern-table thead tr { 
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .modern-table tr { 
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    background: var(--bg-card);
    padding: 16px;
    box-shadow: var(--shadow-sm);
  }

  .modern-table td { 
    /* Behave  like a "row" */
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    position: relative;
    padding: 12px 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .modern-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  /* Labeling the data */
  .modern-table td:before { 
    /* Now like a table header */
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-right: 12px;
  }
  
  /* Generic labels */
  .modern-table td:nth-of-type(1):before { content: "Dato"; }
  .modern-table td:nth-of-type(2):before { content: "Info"; }
  .modern-table td:nth-of-type(3):before { content: "Detalle"; }
  .modern-table td:nth-of-type(4):before { content: "Estado"; }
  
  .modern-table td:nth-of-type(1) {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 12px;
    margin-bottom: 8px;
    justify-content: flex-start;
  }
  .track-cell { width: 100%; }
}

/* User Profile Section (Sidebar) */
.sidebar-user-section {
  padding: 16px 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 16px;
}
.sidebar-user-section .user-mini {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user-section .user-mini:hover {
  background: rgba(255, 255, 255, 0.1);
}
.sidebar-user-section .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.sidebar-user-section .user-name {
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
}
.sidebar-user-section .user-role {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
}
