/* POS Dashboard Styles */

.pos-container {
  min-height: 100vh;
  background: #f5f7fa;
}

.pos-header {
  background: white;
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pos-header h1 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.8rem;
}

.pos-header h1 i {
  margin-right: 0.5rem;
  color: #667eea;
}

.pos-tabs {
  display: flex;
  background: white;
  border-bottom: 2px solid #e0e0e0;
  padding: 0 2rem;
}

.pos-tabs .tab-btn {
  padding: 1rem 2rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  color: #666;
  transition: all 0.3s;
}

.pos-tabs .tab-btn:hover {
  color: #667eea;
  background: #f5f7fa;
}

.pos-tabs .tab-btn.active {
  color: #667eea;
  border-bottom-color: #667eea;
  font-weight: 600;
}

.pos-content {
  padding: 2rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.section {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section h2 {
  margin-top: 0;
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

.section h2 i {
  margin-right: 0.5rem;
  color: #667eea;
}

/* Sales Interface */
.pos-sales-interface {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sales-controls {
  display: flex;
  gap: 1rem;
}

.pos-sale-interface {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 600px;
}

.sale-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f5f7fa;
  border-radius: 8px;
}

.sale-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  height: calc(100vh - 300px);
  overflow: hidden;
}

.products-section {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.products-search {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.products-search input,
.products-search select {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.products-grid-sale {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  overflow-y: auto;
  padding: 0.5rem;
}

.product-card-sale {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.product-card-sale:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #667eea;
}

.product-card-sale h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: #2c3e50;
}

.product-card-sale .price {
  font-size: 1.1rem;
  font-weight: bold;
  color: #27ae60;
  margin: 0.5rem 0;
}

.product-card-sale .category {
  font-size: 0.75rem;
  color: #999;
  margin: 0;
}

.cart-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.cart-section h3 {
  margin-top: 0;
  color: #2c3e50;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0.5rem;
}

#sale-cart-items {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  gap: 1rem;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h5 {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
}

.cart-item-info p {
  margin: 0;
  font-size: 0.8rem;
  color: #666;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.qty-btn:hover {
  background: #f5f7fa;
}

.remove-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #e74c3c;
  background: #e74c3c;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.remove-btn:hover {
  background: #c0392b;
}

.cart-item-total {
  font-weight: bold;
  color: #2c3e50;
  min-width: 80px;
  text-align: right;
}

.cart-summary {
  border-top: 2px solid #e0e0e0;
  padding-top: 1rem;
  margin-top: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.summary-row.total {
  font-size: 1.2rem;
  font-weight: bold;
  color: #2c3e50;
  border-top: 2px solid #e0e0e0;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.customer-info,
.payment-methods {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.customer-info h4,
.payment-methods h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  color: #2c3e50;
}

.customer-info input {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.payment-methods label {
  display: block;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.payment-methods input[type="radio"] {
  margin-right: 0.5rem;
}

/* Products Grid */
.products-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#product-search {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}

.product-card h3 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
}

.product-price {
  font-size: 1.3rem;
  font-weight: bold;
  color: #27ae60;
  margin: 0.5rem 0;
}

.product-category {
  color: #999;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Inventory Table */
.inventory-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.form-select {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: white;
}

.inventory-table-container {
  overflow-x: auto;
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.inventory-table thead {
  background: #f5f7fa;
}

.inventory-table th,
.inventory-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.inventory-table th {
  font-weight: 600;
  color: #2c3e50;
}

/* Customers */
.customers-controls {
  margin-bottom: 1.5rem;
}

.customers-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.customer-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
}

.customer-card h3 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
}

.customer-card p {
  margin: 0.25rem 0;
  color: #666;
}

/* Reports */
.reports-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.summary-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: #666;
  text-transform: uppercase;
}

.summary-value {
  font-size: 2rem;
  font-weight: bold;
  color: #667eea;
  margin: 0;
}

.reports-controls {
  margin-bottom: 1.5rem;
}

.report-section {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.report-section h3 {
  margin-top: 0;
  color: #2c3e50;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.report-card {
  background: #f5f7fa;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.report-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: #666;
}

.report-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
}

.report-table th,
.report-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.report-table th {
  background: #f5f7fa;
  font-weight: 600;
  color: #2c3e50;
}

/* Sales Table */
.sales-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.sales-table thead {
  background: #f5f7fa;
}

.sales-table th,
.sales-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.sales-table th {
  font-weight: 600;
  color: #2c3e50;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.status-completed {
  background: #d4edda;
  color: #155724;
}

.status-badge.status-cancelled {
  background: #f8d7da;
  color: #721c24;
}

.status-badge.status-processing {
  background: #cfe2ff;
  color: #084298;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 2rem;
}

.modal-content {
  background: white;
  border-radius: 10px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
  margin: 0;
  color: #2c3e50;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #999;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.modal-close:hover {
  background: #f5f7fa;
  color: #2c3e50;
}

.modal-body {
  padding: 1.5rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Buttons */
.primary-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s;
}

.primary-btn:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.secondary-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.secondary-btn:hover {
  background: #5a6268;
}

.danger-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.danger-btn:hover {
  background: #c0392b;
}

/* Sale Details */
.sale-details {
  max-width: 800px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.items-table th,
.items-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.items-table th {
  background: #f5f7fa;
  font-weight: 600;
}

.sale-totals {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #e0e0e0;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.total-row.total {
  font-size: 1.2rem;
  font-weight: bold;
  color: #2c3e50;
}

.sale-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Receipt */
.receipt-view {
  max-width: 400px;
  margin: 0 auto;
}

.receipt-header {
  text-align: center;
  border-bottom: 2px solid #000;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.receipt-header h2 {
  margin: 0 0 0.5rem 0;
}

.receipt-items {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.receipt-items th,
.receipt-items td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.receipt-totals {
  text-align: right;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #000;
}

.receipt-totals p {
  margin: 0.25rem 0;
}

.receipt-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  color: #666;
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 5px;
  color: white;
  font-weight: 500;
  z-index: 10001;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification.info,
.notification-info {
  background: #3498db;
  color: white;
}

.notification.success,
.notification-success {
  background: #27ae60;
  color: white;
}

.notification.error,
.notification-error {
  background: #e74c3c;
  color: white;
}

/* Error Message */
.error-message {
  background: #fee;
  color: #c33;
  padding: 1rem;
  border-radius: 5px;
  border: 1px solid #fcc;
}

.no-data {
  text-align: center;
  padding: 3rem;
  color: #999;
}

/* Responsive */
@media (max-width: 768px) {
  .sale-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .products-grid-sale {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .pos-tabs {
    flex-wrap: wrap;
    padding: 0 1rem;
  }

  .pos-tabs .tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

/* Reports Tab - Enhanced Layout */
.report-tabs {
  display: flex;
  gap: 0.5rem;
  background: #f5f7fa;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  flex-wrap: wrap;
}

.report-tab {
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #666;
  transition: all 0.3s;
  white-space: nowrap;
}

.report-tab:hover {
  background: #f0f4ff;
  border-color: #667eea;
  color: #667eea;
}

.report-tab.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
  font-weight: 600;
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: white;
  padding: 1rem 1.25rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s;
  text-align: left;
}

.summary-card:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.summary-card .card-label {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.summary-card .card-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
}

/* Chart Container */
.chart-container {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.chart-container canvas {
  width: 100% !important;
  height: auto !important;
  max-height: 300px;
}

/* Table Container */
.table-container {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-container .data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.table-container .data-table thead {
  background: #f5f7fa;
}

.table-container .data-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 2px solid #e0e0e0;
}

.table-container .data-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
}

.table-container .data-table tbody tr:hover {
  background: #f9fafb;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #666;
  transition: all 0.2s;
}

.pagination-btn:hover {
  background: #f0f4ff;
  border-color: #667eea;
  color: #667eea;
}

.pagination-btn.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
  font-weight: 600;
  cursor: default;
}

.pagination-ellipsis {
  color: #999;
  padding: 0 0.5rem;
}

/* Reports Container */
.reports-container {
  padding: 0;
}

/* Export Button */
.secondary-btn {
  background: #27ae60;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
}

.secondary-btn:hover {
  background: #229954;
}

.export-receipt-btn {
  background: #667eea;
  color: white;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.export-receipt-btn:hover {
  background: #5568d3;
}

/* Responsive for Reports */
@media (max-width: 768px) {
  .report-tabs {
    gap: 0.25rem;
    padding: 0.5rem;
  }

  .report-tab {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .summary-cards {
    grid-template-columns: 1fr;
  }

  .chart-container {
    padding: 1rem;
  }

  .table-container {
    padding: 1rem;
    overflow-x: auto;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .pagination-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}


