/* Modern Dashboard Mockup - Clean & Minimal */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #FAFAFA;
  color: #18181B;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.dashboard-mockup {
  display: flex;
  min-height: 100vh;
  background: #FAFAFA;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 260px;
  background: #FFFFFF;
  border-right: 1px solid #E4E4E7;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid #E4E4E7;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.logo-text {
  font-size: 17px;
  font-weight: 600;
  color: #18181B;
  letter-spacing: -0.3px;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #71717A;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
}

.nav-item:hover {
  background: #F4F4F5;
  color: #18181B;
}

.nav-item.active {
  background: #18181B;
  color: #FFFFFF;
}

.nav-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.nav-text {
  flex: 1;
}

.nav-badge {
  background: #F4F4F5;
  color: #71717A;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  min-width: 22px;
  text-align: center;
}

.nav-item.active .nav-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.nav-badge.alert {
  background: #18181B;
  color: #FFFFFF;
}

.nav-item.active .nav-badge.alert {
  background: #FFFFFF;
  color: #18181B;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid #E4E4E7;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: #18181B;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.user-info {
  flex: 1;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: #18181B;
  margin-bottom: 1px;
}

.user-plan {
  font-size: 12px;
  color: #71717A;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.header {
  background: #FFFFFF;
  padding: 24px 32px;
  border-bottom: 1px solid #E4E4E7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  flex: 1;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: #18181B;
  margin-bottom: 2px;
  letter-spacing: -0.4px;
}

.page-subtitle {
  font-size: 14px;
  color: #71717A;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #18181B;
  transition: all 0.15s ease;
}

.date-selector:hover {
  border-color: #D4D4D8;
  background: #FAFAFA;
}

.icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.icon-sm {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  color: #71717A;
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #18181B;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: #27272A;
}

/* ===== STATS CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 32px;
}

.stat-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #E4E4E7;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: #D4D4D8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.stat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F4F4F5;
  border-radius: 10px;
  color: #52525B;
  stroke-width: 1.5;
}

.stat-icon.warning {
  background: #FAFAF9;
  color: #78716C;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
}

.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: #71717A;
  flex: 1;
  padding-left: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: #18181B;
  letter-spacing: -0.5px;
  line-height: 1;
}

.stat-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.stat-trend {
  font-weight: 600;
}

.stat-trend.positive {
  color: #10B981;
}

.stat-trend.negative {
  color: #EF4444;
}

.stat-period {
  color: #A1A1AA;
  font-weight: 400;
}

.stat-meta {
  color: #A1A1AA;
  font-weight: 400;
}

/* ===== TABLE ===== */
.table-container {
  background: #FFFFFF;
  margin: 0 32px 32px;
  border-radius: 12px;
  border: 1px solid #E4E4E7;
  overflow: hidden;
}

.table-header-section {
  padding: 24px 24px 20px;
  border-bottom: 1px solid #E4E4E7;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 17px;
  font-weight: 600;
  color: #18181B;
}

.filter-tabs {
  display: flex;
  gap: 6px;
}

.filter-tab {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid #E4E4E7;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #71717A;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab:hover {
  background: #F4F4F5;
  border-color: #D4D4D8;
}

.filter-tab.active {
  background: #18181B;
  color: #FFFFFF;
  border-color: #18181B;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #FAFAFA;
  border: 1px solid #E4E4E7;
  border-radius: 8px;
  max-width: 300px;
}

.search-icon {
  width: 18px;
  height: 18px;
  color: #A1A1AA;
  stroke-width: 2;
}

.search-box input {
  border: none;
  background: transparent;
  font-size: 14px;
  color: #18181B;
  outline: none;
  width: 100%;
  font-weight: 400;
}

.search-box input::placeholder {
  color: #A1A1AA;
}

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

.products-table thead {
  background: #FAFAFA;
}

.products-table th {
  padding: 12px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #71717A;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #E4E4E7;
}

.products-table tbody tr {
  border-bottom: 1px solid #F4F4F5;
  transition: background 0.1s ease;
}

.products-table tbody tr:hover {
  background: #FAFAFA;
}

.products-table tbody tr:last-child {
  border-bottom: none;
}

.products-table td {
  padding: 16px 20px;
  font-size: 14px;
  color: #18181B;
}

.product-cell {
  max-width: 380px;
}

.product-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-image {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #F4F4F5;
  border: 1px solid #E4E4E7;
}

.product-details {
  flex: 1;
  min-width: 0;
}

.product-name {
  font-size: 14px;
  font-weight: 500;
  color: #18181B;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-sku {
  font-size: 13px;
  color: #A1A1AA;
  font-weight: 400;
}

.platform-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid;
}

.platform-badge.wb {
  background: #FAFAFA;
  color: #52525B;
  border-color: #E4E4E7;
}

.platform-badge.ozon {
  background: #FAFAFA;
  color: #52525B;
  border-color: #E4E4E7;
}

.sales-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sales-number {
  font-weight: 500;
  color: #18181B;
  font-size: 14px;
}

.sales-change {
  font-size: 12px;
  font-weight: 500;
  color: #10B981;
}

.sales-change.negative {
  color: #EF4444;
}

.sales-change.neutral {
  color: #A1A1AA;
}

.revenue-cell {
  font-weight: 500;
  color: #18181B;
}

.margin-value {
  font-weight: 500;
  color: #18181B;
  font-size: 14px;
}

.margin-value.negative {
  color: #A1A1AA;
}

.profit-cell {
  font-weight: 600;
  font-size: 14px;
}

.profit-cell.positive {
  color: #10B981;
}

.profit-cell.negative {
  color: #EF4444;
}

.profit-cell.neutral {
  color: #71717A;
}

.action-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid #E4E4E7;
  border-radius: 7px;
  color: #71717A;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.action-btn:hover {
  background: #18181B;
  color: #FFFFFF;
  border-color: #18181B;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #FAFAFA;
  border-top: 1px solid #E4E4E7;
}

.table-info {
  font-size: 13px;
  color: #71717A;
  font-weight: 500;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #18181B;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.page-btn:hover:not(:disabled):not(.active) {
  background: #F4F4F5;
  border-color: #D4D4D8;
}

.page-btn.active {
  background: #18181B;
  color: #FFFFFF;
  border-color: #18181B;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-dots {
  padding: 0 6px;
  color: #D4D4D8;
  font-weight: 500;
  font-size: 13px;
}

/* ===== ANALYTICS PAGE ===== */
.analytics-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.analytics-section {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #E4E4E7;
}

.section-header-analytics {
  margin-bottom: 24px;
}

.section-subtitle {
  font-size: 13px;
  color: #A1A1AA;
  font-weight: 400;
}

/* Platform Comparison Cards */
.platform-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.platform-card {
  background: #FAFAFA;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #E4E4E7;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.platform-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.platform-badge-lg {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid;
}

.platform-badge-lg.wb {
  background: #F5F3FF;
  color: #7C3AED;
  border-color: #DDD6FE;
}

.platform-badge-lg.ozon {
  background: #EFF6FF;
  color: #2563EB;
  border-color: #BFDBFE;
}

.platform-trend {
  font-size: 14px;
  font-weight: 600;
}

.platform-trend.positive {
  color: #10B981;
}

.platform-metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-label {
  font-size: 13px;
  font-weight: 500;
  color: #71717A;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  color: #18181B;
  letter-spacing: -0.5px;
}

.platform-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid #E4E4E7;
}

.platform-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label-sm {
  font-size: 12px;
  color: #A1A1AA;
  font-weight: 400;
}

.stat-value-sm {
  font-size: 16px;
  font-weight: 600;
  color: #18181B;
}

/* Line Chart */
.chart-container {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 20px;
}

.chart-legend {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-color.wb-color {
  background: #8B5CF6;
}

.legend-color.ozon-color {
  background: #3B82F6;
}

.legend-label {
  font-size: 13px;
  font-weight: 500;
  color: #71717A;
}

.line-chart {
  width: 100%;
  height: auto;
}

/* Analytics Grid */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Donut Chart */
.donut-chart-container {
  display: flex;
  align-items: center;
  gap: 32px;
}

.donut-chart {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.donut-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.donut-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #18181B;
}

.donut-value {
  font-size: 14px;
  font-weight: 600;
  color: #18181B;
}

.donut-percent {
  font-size: 13px;
  color: #A1A1AA;
  font-weight: 500;
  min-width: 40px;
  text-align: right;
}

/* Top Products List */
.top-products-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.top-product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #FAFAFA;
  border-radius: 10px;
  border: 1px solid #E4E4E7;
  transition: all 0.15s ease;
}

.top-product-item:hover {
  background: #F4F4F5;
  border-color: #D4D4D8;
}

.top-product-rank {
  width: 32px;
  height: 32px;
  background: #18181B;
  color: #FFFFFF;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.top-product-image {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #F4F4F5;
  border: 1px solid #E4E4E7;
}

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

.top-product-name {
  font-size: 14px;
  font-weight: 500;
  color: #18181B;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-product-sku {
  font-size: 12px;
  color: #A1A1AA;
}

.top-product-margin {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

.top-product-margin-bar {
  flex: 1;
  height: 6px;
  background: #E4E4E7;
  border-radius: 3px;
  overflow: hidden;
}

.top-product-margin-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981 0%, #059669 100%);
  border-radius: 3px;
}

.top-product-margin-value {
  font-size: 13px;
  font-weight: 600;
  color: #18181B;
  min-width: 45px;
  text-align: right;
}
