/* ==========================================================================
   Iqtiboslar Admin - Clean, Compact & Minimalist SaaS UI Design System
   Sleek Dark Navy Sidebar, Ultra-Clean Compact White Cards, Indigo Accents
   ========================================================================== */

:root {
  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Brand / Primary */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;
  --primary-text: #3730a3;

  /* Surfaces */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  
  /* Sidebar (Deep Slate / Navy) */
  --sidebar-bg: #0b1329;
  --sidebar-border: #1e293b;
  --sidebar-text: #94a3b8;
  --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
  --sidebar-active-bg: rgba(79, 70, 229, 0.22);
  --sidebar-active-text: #ffffff;
  --sidebar-active-border: #6366f1;

  /* Typography */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* Borders & Dividers */
  --border-light: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-color: #e2e8f0;

  /* Status Colors */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;

  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;

  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #991b1b;

  --info: #0ea5e9;
  --info-bg: #f0f9ff;
  --info-border: #bae6fd;
  --info-text: #0369a1;

  /* Shadows (Subtle & Clean) */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-md: 0 3px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 12px -3px rgba(0, 0, 0, 0.07);

  /* Radius (Compact) */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  /* Dimensions (Compact & Minimalist) */
  --sidebar-width: 232px;
  --header-height: 50px;
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.45;
  font-size: 0.85rem;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* Sidebar (Compact Navy) */
.app-sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  height: 100vh;
  z-index: 50;
  transition: transform 0.2s ease;
  overflow: hidden;
}

.sidebar-brand {
  height: var(--header-height);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.brand-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.3);
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.sidebar-nav {
  flex: 1;
  padding: 0.65rem 0.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.nav-section,
.nav-section-title {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  padding: 0.55rem 0.6rem 0.2rem 0.6rem;
}

.nav-item a,
.sidebar-nav a.nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.65rem;
  border-radius: var(--radius-md);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-item a:hover,
.sidebar-nav a.nav-link:hover {
  background-color: var(--sidebar-hover-bg);
  color: #ffffff;
}

.nav-item a.active,
.sidebar-nav a.nav-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  border-left: 3px solid var(--sidebar-active-border);
}

.nav-icon,
.nav-link-icon {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
}

.sidebar-footer {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: #334155;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
}

.admin-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #f8fafc;
}

.admin-role {
  font-size: 0.68rem;
  color: #64748b;
}

.logout-btn {
  color: #94a3b8;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.logout-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Main Content Area */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Header */
.app-header {
  height: var(--header-height);
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-search {
  position: relative;
  width: 300px;
}

.header-search form {
  margin: 0;
  width: 100%;
}

.header-search input {
  width: 100%;
  padding: 0.35rem 0.75rem 0.35rem 2.2rem !important;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-family: inherit;
  background: var(--bg-subtle);
  color: var(--text-main);
  outline: none;
  transition: all 0.15s ease;
  height: 30px;
  box-sizing: border-box;
}

.header-search input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.header-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.78rem;
  pointer-events: none;
  z-index: 2;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.15rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Page Body Container (Compact, No Empty Waste) */
.page-container {
  padding: 0.85rem 1.25rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Page Header (Compact) */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.page-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* KPI Cards Grid (Compact & Minimalist) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.stat-info .stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.stat-info .stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--success);
  margin-top: 0.2rem;
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-icon.warning { background: var(--warning-bg); color: var(--warning); }
.stat-icon.info { background: var(--info-bg); color: var(--info); }

/* Unified Minimalist Card System */
.card,
.form-card,
.data-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}

.data-card {
  padding: 0;
  overflow: hidden;
}

.data-card-header {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #fafbfc;
}

.data-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Universal Form Inputs & Controls (Compact & Clean)
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
}

.form-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-label .required {
  color: #ef4444;
}

.form-control,
.form-select,
.filter-input,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.38rem 0.65rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text-main);
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  height: 32px;
}

.form-control:focus,
.form-select:focus,
.filter-input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
  background-color: #ffffff;
}

/* Select with Clean Arrow */
select,
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 11px 8px;
  padding-right: 1.8rem;
  cursor: pointer;
}

textarea.form-control,
textarea {
  min-height: 60px;
  height: auto;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

/* Details / Summary accordions */
details {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  background: #ffffff;
  margin-bottom: 0.75rem;
}

details summary {
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--primary);
  user-select: none;
}

/* Minimalist Compact Data Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table,
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

.data-table th,
.table th {
  background: #f8fafc;
  padding: 0.45rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-light);
}

.data-table td,
.table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  color: var(--text-main);
  line-height: 1.4;
}

.data-table tbody tr,
.table tbody tr {
  transition: background-color 0.1s ease;
}

.data-table tbody tr:hover,
.table tbody tr:hover {
  background-color: #f8fafc;
}

/* Pills & Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.badge-secondary,
.badge-neutral {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

.lang-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.lang-badge.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* Buttons (Compact & Modern) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  height: 32px;
  line-height: 1;
}

.btn-sm {
  padding: 0.22rem 0.55rem;
  font-size: 0.75rem;
  height: 26px;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.25);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

/* Language Tabs */
.tabs-nav {
  display: flex;
  gap: 0.35rem;
  border-bottom: 1.5px solid var(--border-light);
  margin-bottom: 0.75rem;
}

.tab-btn {
  padding: 0.45rem 0.85rem;
  border: none;
  background: none;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1.5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Toast Messages */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.toast {
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.95rem;
  box-shadow: var(--shadow-lg);
  border-left: 3px solid var(--primary);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Review Queue Cards */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.65rem;
}

.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.review-quote-text {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-main);
  background: var(--bg-subtle);
  border-left: 3px solid var(--primary);
  padding: 0.45rem 0.65rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0.45rem 0;
  font-style: italic;
}

/* Responsive */
@media (max-width: 900px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
  .mobile-toggle {
    display: block;
  }
  .header-search {
    display: none;
  }
}

/* Alerts */
.alert {
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
}

.alert-danger {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

.alert-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning-text);
}

.alert-info {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  color: var(--info-text);
}

/* Checkbox Cards & Inputs */
.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.checkbox-card:hover {
  background: #f8fafc;
  border-color: var(--primary-border);
}

.checkbox-card:has(input:checked) {
  background: #f5f3ff;
  border-color: #818cf8;
}

.checkbox-card input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--primary);
  border-radius: 3px;
}

.checkbox-card-title {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.84rem;
  line-height: 1.3;
}

.checkbox-card-desc {
  color: var(--text-muted);
  font-size: 0.74rem;
  margin-top: 2px;
  line-height: 1.35;
}

/* File Upload Zone */
.file-upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.file-upload-zone:hover {
  border-color: var(--primary);
  background: #f5f3ff;
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload-icon {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.file-upload-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.file-upload-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Standard File Input */
input[type="file"] {
  width: 100%;
  padding: 0.35rem 0.65rem;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-main);
  cursor: pointer;
  height: 32px;
}

input[type="file"]::file-selector-button {
  padding: 0.25rem 0.65rem;
  margin-right: 0.65rem;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

input[type="file"]::file-selector-button:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Code badge */
.code-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f1f5f9;
  color: #4338ca;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid #e2e8f0;
  display: inline-block;
}

/* Visual Analytics Charts Grid (Clean & Scaled Down) */
.charts-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chart-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chart-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.chart-container {
  position: relative;
  width: 100%;
  height: 220px;
}

/* Author Breakdown Cards */
.author-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.5rem;
  padding: 0.65rem;
}

.author-breakdown-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.author-breakdown-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
  background: #fafbfc;
}

.author-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
}

.author-card-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.author-avatar-badge {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.author-card-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-card-stats {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.4rem;
  margin-top: 1px;
}

.author-toggle-btn {
  background: none;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.author-toggle-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
}

.author-works-collapse {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 200px;
  overflow-y: auto;
}

.work-mini-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-size: 0.76rem;
  gap: 0.4rem;
}

.work-mini-title {
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.work-mini-stats {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
