:root {
  --primary: #2563eb;
  --secondary: #6b7280;
  --success: #059669;
  --danger: #dc2626;
  --warning: #f59e0b;
  --background: #f8fafc;
  --card: #ffffff;
  --text: #1f2937;
  --border: #e5e7eb;
}

/* Base Styles */
body {
  margin: 0;
  padding: 0;
  background: var(--background);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
}

.dashboard {
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
}

/* Header Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-left h1 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #0066ff;
}

.header-left h1::before {
  content: "\f49e"; /* Box icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 24px;
  color: #0066ff;
}

.subtitle {
  color: #6b7280;
  font-size: 20px;
  font-weight: 400;
}

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

/* Filter Buttons */
.filter-buttons {
  display: flex;
  gap: 8px;
  margin-right: 20px;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn i {
  font-size: 14px;
  color: #6b7280;
}

.filter-btn:hover {
  border-color: #0066ff;
  color: #0066ff;
}

.filter-btn:hover i {
  color: #0066ff;
}

/* Total Quantity Display */
.total-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 20px;
}

.total-quantity-label {
  font-size: 14px;
  color: #6b7280;
}

.total-quantity-value {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

/* Action Buttons */
.header-actions {
  display: flex;
  gap: 8px;
}

.header-actions button {
  padding: 8px 20px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

/* Print Button */
.header-actions button:nth-child(1) {
  background: #0066ff;
  color: white;
}

.header-actions button:nth-child(1):hover {
  background: #0052cc;
}

/* Excel Button */
.header-actions button:nth-child(2) {
  background: #059669;
  color: white;
}

.header-actions button:nth-child(2):hover {
  background: #047857;
}

/* PDF Button */
.header-actions button:nth-child(3) {
  background: #dc2626;
  color: white;
}

.header-actions button:nth-child(3):hover {
  background: #b91c1c;
}

/* Hide notification and settings */
.notification,
.settings-btn {
  display: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .header-right {
    flex-wrap: wrap;
    gap: 12px;
  }

  .filter-buttons {
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
  }

  .header-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .filter-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .filter-btn {
    justify-content: center;
  }

  .header-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .header-actions button {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .filter-buttons,
  .header-actions {
    grid-template-columns: 1fr;
  }
}

/* Fancy Select Styles */
.fancy-select {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,...");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.fancy-select:hover {
  border-color: var(--primary);
}

/* Data Cards Container */
.data-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

/* Individual Card */
.data-card {
  background: white;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.data-card:hover {
  transform: translateY(-2px);
}

/* Card Icon */
.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #eef2ff;
  flex-shrink: 0;
}

.card-icon i {
  font-size: 16px;
  color: #0066ff;
}

/* Card Info */
.card-info {
  flex: 1;
  min-width: 0; /* Prevents text overflow */
}

.card-info label {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-info span {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Specific Icons and Colors */
.data-card:nth-child(1) .card-icon {
  background: #eef2ff;
}
.data-card:nth-child(1) .card-icon i {
  color: #0066ff;
}

.data-card:nth-child(2) .card-icon {
  background: #f0fdf4;
}
.data-card:nth-child(2) .card-icon i {
  color: #059669;
}

/* Money Cards */
.data-card.highlight .card-icon {
  background: #fef3c7;
}
.data-card.highlight .card-icon i {
  color: #d97706;
}

/* Specific Icons */
.data-card:nth-child(1) .card-icon i::before {
  content: "\f07a"; /* shopping cart */
}

.data-card:nth-child(2) .card-icon i::before {
  content: "\f466"; /* boxes */
}

.data-card:nth-child(3) .card-icon i::before {
  content: "\f0d6"; /* money bill */
}

.data-card:nth-child(4) .card-icon i::before {
  content: "\f155"; /* percent */
}

.data-card:nth-child(5) .card-icon i::before {
  content: "\f53d"; /* money check */
}

.data-card:nth-child(6) .card-icon i::before {
  content: "\f54e"; /* receipt */
}

.data-card:nth-child(7) .card-icon i::before {
  content: "\f51e"; /* coins */
}

/* Responsive Design */
@media (max-width: 1400px) {
  .data-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1200px) {
  .data-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .data-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .data-card {
    padding: 10px;
  }

  .card-icon {
    width: 36px;
    height: 36px;
  }

  .card-info label {
    font-size: 11px;
  }

  .card-info span {
    font-size: 14px;
  }
}

/* Remove $ signs from spans */
.card-info span {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.card-info span::before {
  content: none;
}

/* Analytics Section */
.analytics-section {
  background: var(--card);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.chart-controls {
  display: flex;
  gap: 12px;
}

.chart-btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.chart-btn.active {
  background: var(--primary);
  color: white;
}

.chart-btn:not(.active) {
  background: #f1f5f9;
  color: var(--text);
}

.chart-wrapper {
  height: 400px;
}

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

.data-card {
  animation: fadeIn 0.3s ease-out forwards;
}

.data-card:nth-child(2) {
  animation-delay: 0.1s;
}

.data-card:nth-child(3) {
  animation-delay: 0.2s;
}

/* Add these table styles to your existing CSS */

/* Table Container */
.table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin: 20px 0;
  padding: 20px;
  box-sizing: border-box;
}

/* Table Styles */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

/* Header Styles */
.data-table thead th {
  background: #f8fafc;
  padding: 8px 12px;
  font-weight: 500;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
  font-size: 12px;
}

.data-table th i {
  font-size: 10px;
  margin-left: 4px;
  color: #94a3b8;
}

/* Cell Styles */
.data-table td {
  padding: 6px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  font-weight: 400;
  line-height: 1.4;
  padding: 10px;
}

/* Numeric Column Alignment */
.numeric {
  text-align: right;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  font-size: 12px;
}

/* Item Name Style */
.item-name {
  color: #2563eb;
  font-weight: 500;
  font-size: 12px;
}

/* Row Hover Effect */
.data-table tbody tr {
  transition: background-color 0.2s ease-out;
}

.data-table tbody tr:hover {
  cursor: pointer;
}
.data-table tbody tr:hover td {
  color: white;
}

/* Highlight Values */
.highlight {
  color: #1e293b;
  font-weight: 500;
}

/* Alternating Row Colors */
.data-table tbody tr:nth-child(even) {
  background: #f9fafb;
}
.data-table tbody tr:hover {
  transition: ease-in-out;
  background-color: #696b6d;
}

/* Custom Scrollbar */
.table-container {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.table-container::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.table-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
  .table-container {
    margin: 16px 0;
  }

  .data-table {
    min-width: 1200px;
  }

  .data-table td,
  .data-table th {
    padding: 6px 8px;
  }
}

/* Sort Icon Hover Effect */
.data-table th:hover i {
  color: #2563eb;
}

/* Footer Pagination */
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.showing-entries {
  color: #64748b;
  font-size: 12px;
}

.pagination {
  display: flex;
  gap: 4px;
}

.page-btn {
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: white;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: #2563eb;
  color: #2563eb;
}

.page-btn.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

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

/* Modern Tab Navigation */
.tab-navigation {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 12px;
  margin: 24px 0;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tab-btn {
  flex: 1;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--primary), #3b82f6);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
  border-radius: 8px;
}

.tab-btn span {
  position: relative;
  z-index: 2;
}

.tab-btn:hover:not(.active) {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
  color: white;
  font-weight: 600;
}

.tab-btn.active::before {
  opacity: 1;
}

/* Add icons to tabs */
.tab-btn:nth-child(1)::after {
  content: "\f080";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: 8px;
  position: relative;
  z-index: 2;
}

.tab-btn:nth-child(2)::after {
  content: "\f201";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: 8px;
  position: relative;
  z-index: 2;
}

.tab-btn:nth-child(3)::after {
  content: "\f0ce";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: 8px;
  position: relative;
  z-index: 2;
}

.tab-btn:nth-child(4)::after {
  content: "\f15c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: 8px;
  position: relative;
  z-index: 2;
}

/* Glowing effect on active tab */
.tab-btn.active {
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .tab-navigation {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
  }

  .tab-btn {
    flex: 1 1 calc(50% - 4px);
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .tab-btn {
    flex: 1 1 100%;
  }
}

/* Animation for tab switching */
@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-btn.active {
  animation: tabFadeIn 0.3s ease forwards;
}

/* Table Actions Container */
.table-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
}

/* Entries Selector */
.entries-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 8px 16px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
}

.entries-selector label {
  color: #6b7280;
  font-size: 14px;
  white-space: nowrap;
}

.entries-select {
  padding: 6px 32px 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  color: #374151;
  background: #f9fafb;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  min-width: 80px;
}

.entries-select:hover {
  border-color: #2563eb;
}

.entries-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Search Wrapper */
.right-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

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

.search-wrapper i.fa-search {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 14px;
}

.search-input {
  width: 100%;
  padding: 12px 40px 12px 42px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  display: none;
}

.search-input:not(:placeholder-shown) + .search-clear {
  display: block;
}

/* Export Actions */
.export-actions {
  display: flex;
  gap: 8px;
}

.export-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #f3f4f6;
  color: #374151;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.export-btn:hover {
  background: #e5e7eb;
}

.export-btn i {
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .table-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .right-actions {
    flex-direction: column;
  }

  .search-wrapper {
    width: 100%;
  }

  .export-actions {
    justify-content: space-between;
  }

  .export-btn {
    flex: 1;
    justify-content: center;
  }
}

/* Animations */
.search-input,
.export-btn {
  transition: all 0.2s ease;
}

.search-input:focus {
  transform: translateY(-1px);
}

.export-btn:active {
  transform: translateY(1px);
}

/* Hover States */
.entries-selector:hover {
  border-color: #2563eb;
}

.search-wrapper:hover .search-input {
  border-color: #2563eb;
}

.export-btn:first-child {
  background: #dcf7e3;
  color: #059669;
}

.export-btn:nth-child(2) {
  background: #fee2e2;
  color: #dc2626;
}

.export-btn:last-child {
  background: #e0e7ff;
  color: #4f46e5;
}

.export-btn:first-child:hover {
  background: #6ee7b7;
}

.export-btn:nth-child(2):hover {
  background: #fca5a5;
}

.export-btn:last-child:hover {
  background: #a5b4fc;
}
