/* POETIO Admin Dashboard Styles */

:root {
    --primary: #8B5CF6;
    --primary-dark: #7C3AED;
    --secondary: #EC4899;
    --accent: #F59E0B;
    --success: #10B981;
    --error: #EF4444;
    
    --bg-dark: #0F172A;
    --bg-darker: #020617;
    --bg-card: #1E293B;
    --bg-card-hover: #334155;
    
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, #1e1b4b 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Admin Header */
.admin-header {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 0.75rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.admin-nav {
    display: flex;
    gap: var(--spacing-sm);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.nav-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

/* Admin Container */
.admin-container {
    display: flex;
    min-height: calc(100vh - 80px);
}

.admin-sidebar {
    width: 280px;
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-main {
    flex: 1;
    padding: var(--spacing-lg);
}

/* Sidebar */
.sidebar-section {
    margin-bottom: var(--spacing-lg);
}

.sidebar-section h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.sidebar-btn {
    width: 100%;
    background: var(--bg-darker);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.sidebar-btn:hover {
    background: var(--primary);
    transform: translateX(4px);
}

/* Admin Sections */
.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.stat-content h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: var(--text-secondary);
}

/* Upload Section */
.upload-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

.upload-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.drop-zone {
    border: 2px dashed rgba(139, 92, 246, 0.5);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    background: rgba(139, 92, 246, 0.05);
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: var(--spacing-lg);
}

.drop-zone:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.drop-zone i {
    width: 60px;
    height: 60px;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.drop-zone h3 {
    margin-bottom: 0.5rem;
}

.file-info {
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.file-preview {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.file-preview i {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--spacing-md);
}

.form-group label {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group select {
    background: var(--bg-darker);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    color: var(--text-primary);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
}

/* Upload Progress */
.upload-progress {
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}

/* Admin Table Styles */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    margin-top: 2rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: rgba(139, 92, 246, 0.1);
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.admin-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.admin-table img {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-icon.danger:hover {
    background: var(--error);
    border-color: var(--error);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(139, 92, 246, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-nav {
        display: none;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .admin-table {
        min-width: 800px;
    }
}
/* ============================================
   POEMS/ARTISTS CARDS STYLES
   ============================================ */
.poems-list {
    display: grid;
    gap: 1.5rem;
}

.poem-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.poem-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.poem-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.poem-header h3 {
    margin: 0;
    color: var(--primary);
}

.poem-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 1rem 0;
}

.poem-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.poem-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.poem-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.status-badge.approved {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.btn-danger {
    background: var(--error);
}

.btn-danger:hover {
    background: #dc2626;
}

/* ============================================
   Modal Styles
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--spacing-md);
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: var(--bg-darker);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--error);
    color: white;
}

.modal-content .form {
    padding: var(--spacing-lg);
}

.modal-content .form-group textarea {
    background: var(--bg-darker);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    width: 100%;
}

.modal-content .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===========================================
   ANALYTICS CSS - Adaugă la sfârșitul admin.css
   =========================================== */

/* === ANALYTICS HEADER === */
#analyticsSection .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

#analyticsSection .section-header h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#analyticsSection .header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.period-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.period-select:hover {
  border-color: rgba(139, 92, 246, 0.5);
}

.period-select:focus {
  outline: none;
  border-color: #8B5CF6;
}

/* === ANALYTICS STATS GRID === */
.analytics-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.analytics-stat-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.3s ease;
}

.analytics-stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.analytics-stat-card .stat-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.analytics-stat-card .stat-icon-wrapper svg {
  width: 28px;
  height: 28px;
  color: #fff;
}

.analytics-stat-card.users .stat-icon-wrapper {
  background: linear-gradient(135deg, #8B5CF6, #6366F1);
}

.analytics-stat-card.poems .stat-icon-wrapper {
  background: linear-gradient(135deg, #10B981, #059669);
}

.analytics-stat-card.videos .stat-icon-wrapper {
  background: linear-gradient(135deg, #EC4899, #DB2777);
}

.analytics-stat-card.applications .stat-icon-wrapper {
  background: linear-gradient(135deg, #F59E0B, #D97706);
}

.stat-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: #9CA3AF;
}

.stat-change {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  width: fit-content;
}

.stat-change.positive {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.stat-change.negative {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.stat-change.neutral {
  background: rgba(156, 163, 175, 0.15);
  color: #9CA3AF;
}

/* === CHARTS GRID === */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.chart-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.chart-card.small {
  min-width: 280px;
}

.chart-header {
  margin-bottom: 1.25rem;
}

.chart-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #E5E7EB;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-header h3 svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.chart-container {
  height: 280px;
  position: relative;
}

.chart-container-small {
  height: 180px;
  position: relative;
  display: flex;
  justify-content: center;
}

/* === CHART LEGEND === */
.chart-legend {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #9CA3AF;
}

.legend-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* === REVENUE CARD === */
.chart-card.revenue {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.02) 100%);
  border-color: rgba(16, 185, 129, 0.2);
}

.revenue-display {
  text-align: center;
  padding: 1.5rem 0;
}

.revenue-amount {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.25rem;
}

.revenue-amount .currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: #10B981;
  margin-top: 0.5rem;
}

.revenue-amount .amount {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.revenue-amount .period {
  font-size: 1rem;
  color: #9CA3AF;
  align-self: flex-end;
  margin-bottom: 0.5rem;
}

.revenue-annual {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #6EE7B7;
}

.plan-breakdown {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  margin-top: 1rem;
}

.plan-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.plan-name {
  color: #D1D5DB;
}

.plan-count {
  color: #9CA3AF;
}

/* === ACTIVITY SECTION === */
.activity-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.activity-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
}

.activity-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #E5E7EB;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.activity-header h3 svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.activity-list {
  max-height: 350px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
}

.activity-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #8B5CF6, #6366F1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-avatar svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.activity-rank {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #8B5CF6;
  flex-shrink: 0;
}

.activity-info {
  flex: 1;
  min-width: 0;
}

.activity-name {
  display: block;
  font-weight: 500;
  color: #E5E7EB;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-meta {
  display: block;
  font-size: 0.85rem;
  color: #6B7280;
  margin-top: 0.15rem;
}

.activity-time,
.activity-views {
  font-size: 0.85rem;
  color: #9CA3AF;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.activity-views svg {
  width: 14px;
  height: 14px;
}

.empty-state {
  padding: 3rem;
  text-align: center;
  color: #6B7280;
}

.loading-spinner {
  padding: 3rem;
  text-align: center;
  color: #9CA3AF;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
  
  .chart-card.small {
    min-width: 100%;
  }
  
  .analytics-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .activity-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .analytics-stats-grid {
    grid-template-columns: 1fr;
  }
  
  #analyticsSection .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  #analyticsSection .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* === SCROLLBAR CUSTOMIZATION === */
.activity-list::-webkit-scrollbar {
  width: 6px;
}

.activity-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.activity-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.activity-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===========================================
   CRM STYLES - Customer Relationship Management
   =========================================== */

/* === CRM FILTERS === */
.crm-filters {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.filters-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #9CA3AF;
}

.filter-input,
.filter-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: #8B5CF6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.filter-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #9CA3AF;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.btn-warning {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* === CRM STATS GRID === */
.crm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.crm-stat-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.crm-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.crm-stat-card .stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.crm-stat-card .stat-icon svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.crm-stat-card .stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.crm-stat-card .stat-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.crm-stat-card .stat-content p {
  font-size: 0.9rem;
  color: #9CA3AF;
}

/* === CRM TABLE ENHANCEMENTS === */
.admin-table thead th:first-child,
.admin-table tbody td:first-child {
  width: 50px;
  text-align: center;
}

.admin-table thead th:nth-child(2),
.admin-table tbody td:nth-child(2) {
  width: 80px;
}

.admin-table .user-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #8B5CF6;
}

/* === ROLE AND PLAN BADGES === */
.role-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.role-badge.role-user {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
}

.role-badge.role-artist {
  background: rgba(139, 92, 246, 0.15);
  color: #8B5CF6;
}

.role-badge.role-admin {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.plan-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.plan-badge.plan-free {
  background: rgba(107, 114, 128, 0.15);
  color: #6B7280;
}

.plan-badge.plan-premium {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}

.plan-badge.plan-patron {
  background: rgba(236, 72, 153, 0.15);
  color: #EC4899;
}

/* === STATUS BADGES === */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.status-green {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.status-badge.status-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}

.status-badge.status-orange {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.status-badge.status-red {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.status-badge.status-gray {
  background: rgba(107, 114, 128, 0.15);
  color: #6B7280;
}

/* === USER DETAILS MODAL === */
.user-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.user-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  align-self: center;
}

.user-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-item label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #9CA3AF;
}

.info-item span {
  font-size: 0.9rem;
  color: #fff;
}

.user-notes {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
}

.user-notes h4 {
  font-size: 1rem;
  color: #E5E7EB;
  margin-bottom: 0.75rem;
}

.user-notes textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  transition: all 0.2s;
}

.user-notes textarea:focus {
  outline: none;
  border-color: #8B5CF6;
}

.user-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* === FORM ELEMENTS FOR MODALS === */
.form-input,
.form-textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s;
  width: 100%;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #8B5CF6;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* === RECIPIENTS LIST === */
.recipients-list {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 0.75rem;
  margin-top: 0.5rem;
}

.recipients-list p {
  color: #9CA3AF;
  font-size: 0.85rem;
  margin: 0;
}

/* === RESPONSIVE CRM === */
@media (max-width: 1024px) {
  .filters-row {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .crm-filters {
    padding: 1rem;
  }

  .filters-row {
    grid-template-columns: 1fr;
  }

  .crm-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .user-info-grid {
    grid-template-columns: 1fr;
  }

  .admin-table {
    font-size: 0.85rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .crm-stats-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}
