/* Coupon List & Card Styles for Dashboard Coupons Page */
/* German Currency Input Styling */
.german-currency {
  position: relative;
}

.german-currency:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.german-currency.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.german-currency::placeholder {
  color: #9ca3af;
  font-style: italic;
}

/* Form row styling */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Discount type dependent styling */
.discount-hint {
  transition: color 0.2s ease;
}

/* Status indicators */
.status-active {
  color: #10b981;
  font-weight: 500;
}

.status-inactive {
  color: #ef4444;
  font-weight: 500;
}

.status-expired {
  color: #f59e0b;
  font-weight: 500;
}

/* Coupon Section Styling */
.coupon-section {
  margin-bottom: 2rem;
}

.section-header {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.section-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Individual vs Group Coupon Styling */
.coupon-individual {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 1.5rem;
}

.coupon-group {
  background: linear-gradient(135deg, #fefefe 0%, #f8fafc 100%);
  margin-bottom: 1.5rem;
}

.customer-item.coupon-group {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1.5rem;
}

.customer-item.coupon-group .group-icon {
  display: none !important;
}

/* General spacing for all customer-item cards */
.customer-item {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: nowrap;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.customer-item:hover {
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.08);
  border-color: var(--primary-color, #2563eb);
}

/* Remove margin from the last item in each section */
.coupon-section .customer-item:last-child {
  margin-bottom: 0;
}

.group-badge {
  background: var(--accent-color);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Group Coupons Modal */
.group-coupons-modal {
  max-width: 800px;
  width: 98vw;
  max-height: 90vh;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  background: var(--card-bg, #fff);
  padding: 0;
  margin-top: 3vh;
  margin-bottom: 3vh;
}

/* Specific centering for group coupons modal overlay */
#groupCouponsModal.popup-overlay {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.group-coupons-body {
  padding: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

.coupons-count {
  padding: 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
}

.group-coupon-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.85rem;
  transition: background-color 0.2s ease;
}

.group-coupon-row:hover {
  background-color: #f8fafc;
}

.group-coupon-row:last-child {
  border-bottom: none;
}

.coupon-code-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Courier New", monospace;
  font-weight: 600;
}

.coupon-code-cell i {
  color: var(--primary-color);
  font-size: 0.8rem;
}

.coupon-code-cell .code {
  background: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px dashed #d1d5db;
  font-size: 0.8rem;
}

.coupon-usage-cell {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.coupon-status-cell {
  text-align: center;
}

.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-badge.status-inactive {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.status-expired {
  background: #fef3c7;
  color: #92400e;
}

/* --- Coupon Popup Styling: Match .add-category-modal .modal-content --- */
.popup-content,
.large-popup {
  background: var(--card-bg, #fff);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  min-width: 340px;
  width: 45%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  margin-top: 3vh;
  margin-bottom: 3vh;
  overflow-x: hidden;
  animation: popupIn 0.2s cubic-bezier(0.4, 1.4, 0.6, 1) both;
}

/* Popup header, body, actions spacing (match menu-items) */
.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.popup-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-icon.btn-sm.close-popup {
  background: #f0f0f0;
  border: none;
  font-size: 1rem;
  color: var(--text-secondary, #888);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border-radius: 5px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-icon.btn-sm.close-popup:hover {
  background-color: var(--error-color);
  color: white;
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
  display: inline-block;
}

.popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.5rem 2rem 2rem 2rem;
  border-top: 1px solid var(--border-color, #e5e7eb);
  background: var(--bg-secondary, #f8fafc);
}

.popup-actions .btn-primary,
.popup-actions .btn-outline {
  min-width: 120px;
}

.pagination-info {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  margin-top: 1rem;
}

/* Bulk coupon styling */
.bulk-coupon-notice {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bulk-coupon-item {
  opacity: 0.8;
}

/* Download popup styling */
.download-info {
  margin-top: 1rem;
}

.info-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.info-card i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.info-content {
  flex: 1;
}

.info-content strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

#downloadBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Add/override toolbar layout for coupons */
.orders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 15px 20px;
  border: var(--border-light);
  border-radius: 8px;
  margin-bottom: 20px;
  background-color: var(--card-bg);
}

.orders-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}

.header-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-toolbar .filter-select {
  width: auto;
  min-width: 140px;
}

.header-toolbar .date-filter {
  width: auto;
  min-width: 140px;
  padding: 8px;
  border: var(--border-light);
  border-radius: 4px;
  font-size: 14px;
  background-color: var(--card-bg);
  color: var(--text-primary);
  font-family: "SF UI Display", system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;
}

.header-toolbar .date-filter:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* Dark mode styles for date filter */
[data-theme="dark"] .header-toolbar .date-filter {
  background-color: var(--card-bg);
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* Dark mode calendar icon styling */
[data-theme="dark"] .header-toolbar .date-filter::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.8;
}

[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.8;
}

[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.8;
}

.header-toolbar .btn-primary {
  width: 100% !important;
  min-width: unset;
}

/* Quick Actions full width and spacing */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.quick-action-btn {
  width: 100%;
  box-sizing: border-box;
  font-size: 15px;
  padding: 13px 0;
  justify-content: center;
  align-items: center;
}

.quick-action-btn i {
  margin-right: 0.3rem;
  font-size: 0.8rem;
}

.customer-list,
.areas-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.coupon-section {
  margin-bottom: 2rem;
}

.section-header {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.customer-info {
  flex: 0 1 70%;
  min-width: 0;
  word-break: break-word;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.coupon-icon,
.group-icon {
  font-size: 2.2rem;
  color: var(--primary-color, #2563eb);
}

.group-icon {
  color: var(--accent-color, #059669);
}

.customer-details h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.customer-details p {
  margin: 0 0 0.25rem 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.customer-since {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.group-badge {
  background: var(--accent-color, #059669);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Customer stats - specific to coupons page */
.customer-stats.coupon-stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  min-width: 160px;
}

.customer-stats.coupon-stats .stat-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.97rem;
  color: var(--text-secondary);
}

.customer-stats.coupon-stats .stat-label {
  font-weight: 500;
}

.customer-stats.coupon-stats .stat-value {
  font-weight: 600;
}

.status-active {
  color: #10b981;
}

.status-inactive {
  color: #ef4444;
}

.status-expired {
  color: #f59e0b;
}

.customer-actions {
  flex: 0 0 30%;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 0.5rem;
}

.customer-actions .btn-outline,
.customer-actions .btn-danger {
  width: fit-content;
  min-width: 0;
  align-self: flex-end;
}

.customer-actions .btn-danger {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  padding-left: 20px;
  padding-right: 20px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  box-shadow: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.customer-actions .btn-danger:hover,
.customer-actions .btn-danger:focus {
  background: #b91c1c;
  color: #fff;
}

.customer-actions .btn-outline {
  padding-left: 20px;
  padding-right: 20px;
}

.bulk-coupon-notice {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.bulk-coupon-item {
  opacity: 0.8;
}

/* Empty State Styling */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  background: var(--bg-secondary, #f8fafc);
  border-radius: 10px;
  border: 1px dashed var(--border-color, #e5e7eb);
  margin: 2rem 0;
  color: var(--text-secondary);
  text-align: center;
}

.empty-state-icon {
  margin-bottom: 1rem;
}

.empty-state-icon i {
  font-size: 2.5rem;
  color: var(--primary-color, #2563eb);
}

/* German Currency Input Styling */
.german-currency {
  position: relative;
}

.german-currency:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.german-currency.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.german-currency::placeholder {
  color: #9ca3af;
  font-style: italic;
}

/* Status indicators for overview */
.status-active {
  color: #10b981;
  font-weight: 500;
}

.status-inactive {
  color: #ef4444;
  font-weight: 500;
}

/* Clean button styling for actions */
.btn-danger {
  background-color: #ef4444;
  color: white;
  border: 1px solid #ef4444;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

#couponCode {
  margin-bottom: 0.5rem;
}

.btn-danger:hover {
  background-color: #dc2626;
  border-color: #dc2626;
}

.customer-item {
  justify-content: space-between;
}

.discount-type-row {
  display: flex;
  flex-direction: row;
  gap: 2.5rem;
  align-items: center;
}

.discount-type-row label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.discount-type-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.discount-type-column label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.days-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.day-checkbox {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, border 0.2s;
}

.day-checkbox input[type="checkbox"] {
  accent-color: #2563eb;
  margin: 0;
}

.day-checkbox span {
  font-size: 0.98rem;
  font-weight: 500;
  color: #333;
}

.day-checkbox input[type="checkbox"]:checked+span {
  color: #2563eb;
}

.text-right {
  text-align: right;
}

.categories-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.category-checkbox {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, border 0.2s;
}

.category-checkbox input[type="checkbox"] {
  accent-color: #2563eb;
  margin: 0;
}

.category-checkbox span {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-primary);
}

.category-checkbox input[type="checkbox"]:checked+span {
  color: #2563eb;
}

/* Products List Styling in Free Offers */
.products-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.product-checkbox {
  flex: 0 1 auto;
  min-width: 200px;
  max-width: calc(33.333% - 0.75rem);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.product-checkbox:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
}

.product-checkbox input[type="checkbox"] {
  margin-right: 0.75rem;
  accent-color: #2563eb;
  width: 16px;
  height: 16px;
}

.product-checkbox span {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: normal;
  line-height: 1.4;
}

.product-checkbox input[type="checkbox"]:checked+span {
  color: #2563eb;
}

/* Pickable Categories Styling */
.categories-row .category-checkbox {
  min-height: 40px;
  display: flex;
  align-items: center;
}

/* Special styling for pickable categories */
.categories-row[style*="flex-direction: column"] .category-checkbox {
  min-height: 56px;
  padding: 0rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.checkbox-label {
  align-items: center;
  display: flex;
}

.categories-row[style*="flex-direction: column"] .category-checkbox:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
}

.categories-row[style*="flex-direction: column"] .category-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 1rem;
  accent-color: #2563eb;
}

.categories-row[style*="flex-direction: column"] .category-checkbox span {
  font-size: 1rem;
  font-weight: 500;
}

/* Category checkbox header with select all switch */
.category-checkbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Switch styling */
.switch-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.switch-wrapper span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e5e7eb;
  transition: 0.4s;
  border-radius: 20px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked+.switch-slider {
  background-color: #2563eb;
}

input:checked+.switch-slider:before {
  transform: translateX(16px);
}

/* Form Controls */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--card-bg);
  transition: all 0.2s ease;
}

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

.form-control::placeholder {
  color: var(--text-secondary);
}

/* WYSIWYG Editor Styles */
.tox.tox-tinymce {
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  overflow: hidden;
}

.tox .tox-toolbar__primary {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.tox .tox-edit-area__iframe {
  background: var(--card-bg) !important;
}

.tox .tox-tbtn {
  color: var(--text-primary) !important;
}

.tox .tox-tbtn:hover {
  background: rgba(37, 99, 235, 0.1) !important;
}

/* Dark mode overrides for TinyMCE */
[data-theme="dark"] .tox.tox-tinymce {
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .tox .tox-toolbar__primary {
  background: var(--bg-secondary) !important;
}

[data-theme="dark"] .tox .tox-edit-area__iframe {
  background: var(--card-bg) !important;
}

[data-theme="dark"] .tox .tox-tbtn {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .tox .tox-tbtn svg {
  fill: var(--text-primary) !important;
}

/* Template Selection Grid */
.template-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 12px;
}

.template-row {
  display: flex;
  gap: 20px;
}

.template-card {
  flex: 1;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.template-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.template-card.selected {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.template-card.selected::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background: #2563eb;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.template-preview {
  width: 100%;
  height: 300px;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  position: relative;
}

.template-iframe {
  width: 200%;
  height: 200%;
  border: none;
  transform: scale(0.5);
  transform-origin: top left;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
}

.template-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

/* Schedule Type Selection Styles */
.schedule-type-selection {
  margin-top: 8px;
}

.radio-group {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}

.radio-option {
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.radio-option label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-primary);
  user-select: none;
  line-height: 1;
}

.radio-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.radio-option input[type="radio"]:checked+label .radio-custom {
  border-color: #2563eb;
  background: #2563eb;
}

.radio-option input[type="radio"]:checked+label .radio-custom::after {
  content: "";
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  display: block;
}

.radio-option:hover .radio-custom {
  border-color: #2563eb;
}

.radio-option input[type="radio"]:focus+label .radio-custom {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.radio-label {
  padding-top: 1px;
}

/* Days Selection Styles */
.days-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.days-selection .day-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.days-selection .day-checkbox:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
}

.days-selection .day-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  margin: 0;
}

.days-selection .day-checkbox input[type="checkbox"]:checked+span {
  color: #2563eb;
  font-weight: 600;
}

.days-selection .day-checkbox input[type="checkbox"]:checked {
  background: #2563eb;
}

.coupon-action-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: 1.25rem;
}

.coupon-action-cell .btn-outline {
  min-width: 110px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  border-radius: 6px;
  margin-left: 0.5rem;
}

/* Dashboard Icon Box Styles */
.stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon-box {
  margin-bottom: 10px;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.icon-box.orders {
  background-color: rgba(0, 123, 255, 0.1);
}

.icon-box.customers {
  background-color: rgba(40, 167, 69, 0.1);
}

.icon-box.menu {
  background-color: rgba(255, 193, 7, 0.1);
}

.stat-number {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 2px;
}

.stat-label {
  color: #6c757d;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Order Notification Popup */
.order-notification-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.popup-content {
  position: relative;
  background: var(--card-bg, #fff);
  border-radius: 12px;
  box-shadow: var(--shadow-heavy, 0 10px 40px rgba(0, 0, 0, 0.3));
  max-width: 400px;
  width: 90%;
  margin: 20px;
  animation: popupSlideIn 0.3s ease-out;
  z-index: 10001;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: var(--border-light, 1px solid #e9ecef);
}

.popup-header h3 {
  margin: 0;
  color: var(--text-primary, #333);
  font-size: 1.25rem;
  font-weight: 600;
}

.popup-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary, #666);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.popup-close:hover {
  background-color: var(--hover-bg, #f8f9fa);
}

.popup-body {
  padding: 20px 24px;
}

.popup-body p {
  margin: 8px 0;
  color: var(--text-primary, #333);
  font-size: 0.95rem;
}

.popup-body strong {
  color: var(--text-primary, #333);
}

.popup-actions {
  display: flex;
  gap: 12px;
  padding: 16px 24px 24px;
  justify-content: flex-end;
}

.popup-actions .btn-primary,
.popup-actions .btn-outline {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.popup-actions .btn-primary {
  background: var(--primary-color, #007bff);
  color: white;
  border: 1px solid var(--primary-color, #007bff);
}

.popup-actions .btn-primary:hover {
  background: var(--primary-hover, #0056b3);
}

.popup-actions .btn-outline {
  background: transparent;
  color: var(--text-secondary, #666);
  border: 1px solid var(--border-color, #dee2e6);
}

.popup-actions .btn-outline:hover {
  background: var(--hover-bg, #f8f9fa);
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 10001;
  animation: toastSlideIn 0.3s ease-out;
  max-width: 300px;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-success {
  background: #10b981;
}

.toast-error {
  background: #ef4444;
}

.toast-info {
  background: #3b82f6;
}

/* Audio settings styling */
.audio-settings {
  padding: 16px;
  text-align: center;
}

.audio-settings .btn-outline {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.audio-settings .btn-outline.active {
  background: var(--primary-color, #007bff);
  color: white;
  border-color: var(--primary-color, #007bff);
}