/* css/popup.css */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Poppins', sans-serif;
}

.popup-container {
  background: #fff;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.popup-header {
  background: #1a3a6f;
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popup-header h3 {
  margin: 0;
  font-size: 20px;
}

.close-popup {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0 8px;
}

.close-popup:hover {
  opacity: 0.8;
}

.popup-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #1a3a6f;
}

.row-2cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.product-search-section {
  margin: 20px 0;
  padding: 15px;
  background: #f5f5f5;
  border-radius: 8px;
}

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.search-bar input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.filter-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.filter-group select {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.product-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
}

.product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.product-item:hover {
  background: #f0f0f0;
}

.product-item.selected {
  background: #e8f0fe;
  border-left: 3px solid #1a3a6f;
}

.product-info {
  flex: 1;
}

.product-code {
  font-weight: 600;
  color: #1a3a6f;
  font-size: 12px;
}

.product-name {
  font-size: 13px;
  color: #333;
}

.product-price {
  font-size: 12px;
  color: #666;
}

.product-price span {
  color: #1a3a6f;
  font-weight: 600;
}

.add-btn {
  background: #1a3a6f;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.add-btn:hover {
  background: #0f2a4f;
}

.selected-products-section {
  margin: 20px 0;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
}

.selected-products-section h4 {
  margin: 0 0 10px 0;
  color: #1a3a6f;
}

.selected-list {
  max-height: 200px;
  overflow-y: auto;
}

.selected-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.selected-item-info {
  flex: 1;
}

.selected-item-code {
  font-size: 12px;
  font-weight: 600;
  color: #1a3a6f;
}

.selected-item-name {
  font-size: 12px;
  color: #555;
}

.remove-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
}

.remove-btn:hover {
  background: #c82333;
}

.total-amount {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid #ddd;
  text-align: right;
  font-weight: bold;
  font-size: 16px;
}

.total-amount span {
  color: #1a3a6f;
  font-size: 18px;
}

.whatsapp-btn-submit {
  background: #25D366;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  width: 100%;
  margin-top: 15px;
}

.whatsapp-btn-submit:hover {
  background: #128C7E;
}

.admin-login-link {
  text-align: center;
  margin-top: 10px;
}

.admin-login-link a {
  color: #1a3a6f;
  font-size: 12px;
  text-decoration: none;
}

/* Admin Panel Styles */
.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.admin-header {
  background: #1a3a6f;
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px;
  margin-bottom: 20px;
}

.admin-logout {
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.admin-search {
  margin-bottom: 20px;
}

.admin-search input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.admin-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-filters select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.products-table th,
.products-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.products-table th {
  background: #1a3a6f;
  color: white;
}

.products-table tr:hover {
  background: #f5f5f5;
}

.product-checkbox {
  width: 40px;
}

.price-input {
  width: 80px;
  padding: 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.save-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.save-btn:hover {
  background: #218838;
}

.toggle-visibility {
  width: 40px;
  height: 20px;
  appearance: none;
  background: #ccc;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
}

.toggle-visibility:checked {
  background: #28a745;
}

.toggle-visibility::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: 0.2s;
}

.toggle-visibility:checked::before {
  left: 22px;
}

.login-container {
  max-width: 400px;
  margin: 100px auto;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #1a3a6f;
}

.login-container input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.login-container button {
  width: 100%;
  padding: 12px;
  background: #1a3a6f;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.login-container button:hover {
  background: #0f2a4f;
}