/* Base Layout */
body {
  background: #f3f4f6;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Top Navigation */
.top-nav {
  background: white;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.menu {
  display: flex;
  gap: 20px;
}

.menu a {
  color: #374151;
  text-decoration: none;
  font-size: 14px;
}

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

.nav-btn {
  background: #0066ff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.notification {
  position: relative;
  color: #374151;
}

.badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #dc2626;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 10px;
}

.settings {
  color: #374151;
  cursor: pointer;
}

/* Main Container */
.main-container {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Sale Info Section */
.sale-info {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.info-card {
  flex: 1;
}

.info-card label {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-size: 14px;
}

.modern-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 14px;
}

/* Search Container */
.search-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.search-box {
  background: white;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box i {
  color: #6b7280;
}

/* Totals Container */
.totals-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.total-card {
  background: white;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.total-card h3 {
  margin: 0 0 8px 0;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
}

.total-card p {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #0066ff;
}

.total-card.highlight {
  background: #0066ff;
}

.total-card.highlight h3,
.total-card.highlight p {
  color: white;
}

/* Payment Methods */
.payment-methods {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.payment-option {
  background: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkmark {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  font-size: 14px;
}

/* Products Table */
.products-table {
  width: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
  border-collapse: collapse;
}

.products-table th {
  text-align: left;
  padding: 12px 20px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  font-weight: 500;
  font-size: 14px;
}

.products-table td {
  padding: 12px 20px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  font-size: 14px;
}

.quantity-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  background: #f3f4f6;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  color: #374151;
}

.quantity-cell input {
  width: 50px;
  text-align: center;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 4px;
}

.remove-btn {
  background: #ef4444;
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
}

.cancel-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.pay-btn {
  background: #10b981;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/* Hover Effects */
.nav-btn:hover,
.qty-btn:hover,
.remove-btn:hover,
.cancel-btn:hover,
.pay-btn:hover {
  opacity: 0.9;
}

.payment-option:hover {
  background: #f9fafb;
}

/* Header Card */
.page-header {
  background: #ffffff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title-link {
  color: #0066ff;
  text-decoration: none;
  font-size: 16px;
}

.total-info {
  color: #6b7280;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity {
  color: #0066ff;
  font-size: 20px;
}

/* Export Buttons */
.export-buttons {
  display: flex;
  gap: 8px;
  margin-left: 20px;
}

.btn-print {
  background: #0066ff;
}
.btn-excel {
  background: #0d9488;
}
.btn-pdf {
  background: #dc2626;
}

.btn-print,
.btn-excel,
.btn-pdf {
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}

/* Controls Card */
.table-controls {
  background: #ffffff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
}

.entries-control select {
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 14px;
}

.search-control input {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 14px;
}

/* Table Card */
.table-container {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  padding: 12px 20px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  font-weight: normal;
}

.data-table td {
  padding: 12px 20px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

/* Status Badge */
.status-badge {
  background: #fef3c7;
  color: #b45309;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.status-badge.completed {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.pending {
  background: #fef3c7;
  color: #b45309;
}

.status-badge.cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

/* Action Buttons */
.actions-cell {
  display: flex;
  gap: 4px;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 4px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn.view {
  background: #0066ff;
}
.action-btn.history {
  background: #f59e0b;
}
.action-btn.cart {
  background: #10b981;
}
.action-btn.chat {
  background: #06b6d4;
}
.action-btn.edit {
  background: #8b5cf6;
}
.action-btn.return {
  background: #ef4444;
}

/* Table Footer */
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  color: #374151;
  font-size: 14px;
}

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

.page-btn {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: white;
  color: #374151;
  font-size: 14px;
}

.page-btn.active {
  background: #0066ff;
  color: white;
  border-color: #0066ff;
}

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

/* Hover Effects */
.data-table tbody tr:hover {
  background: #f9fafb;
}

/* Additional Status Colors for Sales */
.status-badge.paid {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.unpaid {
  background: #fee2e2;
  color: #b91c1c;
}

.status-badge.partial {
  background: #fef3c7;
  color: #b45309;
}

/* Amount Column */
.amount-cell {
  font-weight: 500;
  color: #059669;
}

.amount-cell.negative {
  color: #dc2626;
}

/* Date Column */
.date-cell {
  color: #6b7280;
}

/* Customer Info */
.customer-cell {
  display: flex;
  flex-direction: column;
}

.customer-name {
  color: #374151;
}

.customer-email {
  color: #6b7280;
  font-size: 12px;
}
