* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

.container {
  max-width: 98%;
  margin: 0 auto;
  padding: 15px;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.header-nav {
  position: absolute;
  top: 15px;
  right: 15px;
}

header h1 {
  color: #2c3e50;
  margin-bottom: 8px;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.3px;
}

header p {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 400;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
}

.upload-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1.25rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.upload-section.hidden {
  display: none;
}

.section-content {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

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

.section-content h3 {
  margin-bottom: 0.75rem;
  color: #374151;
  font-size: 1rem;
  font-weight: 600;
}

.section-description {
  color: #64748b;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.orders-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.upload-section h2,
.orders-section h2 {
  margin-bottom: 1rem;
  color: #2c3e50;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.2px;
}

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

.upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 1rem;
  background: rgba(248, 250, 252, 0.5);
}

.upload-area:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
  transform: translateY(-1px);
}

.upload-area.dragover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  transform: scale(1.01);
}

.upload-content svg {
  color: #64748b;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.upload-area:hover .upload-content svg {
  color: #3b82f6;
}

.upload-content p {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-actions .btn {
  align-self: flex-start;
}

.btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #64748b;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.2);
}

.btn-secondary:hover {
  background: #475569;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.btn-success {
  background: #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-small {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
}

.btn-primary {
  background: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Orders section with scroll */
.orders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0.5rem 0;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.orders-header h2 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.2rem;
  font-weight: 600;
}

#ordersList {
  flex: 1;
  overflow-y: auto;
  padding: 0 0.5rem 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  min-height: 400px;
  /* Remove any conflicting styles that might interfere with grid */
  display: block;
}

#ordersList::-webkit-scrollbar {
  width: 6px;
}

#ordersList::-webkit-scrollbar-track {
  background: transparent;
}

#ordersList::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

#ordersList::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Grid container for orders */
.orders-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1.2rem !important;
  margin: 1rem 0 !important;
  width: 100% !important;
  padding: 0 !important;
}

/* Responsive grid - 3 columns on large screens */
@media (max-width: 1800px) {
  .orders-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Responsive grid - 2 columns on medium screens */
@media (max-width: 1400px) {
  .orders-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
}

/* Responsive grid - 1 column on small screens */
@media (max-width: 900px) {
  .orders-grid {
    grid-template-columns: 1fr !important;
    gap: 0.8rem !important;
  }
}

/* Bulk actions styling */
.bulk-actions {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
  margin-bottom: 1.5rem !important;
}

.order-card {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: fit-content;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

/* Remove cursor pointer when card is in editing mode */
.order-card.editing {
  cursor: default;
}

/* Ensure buttons and inputs maintain their proper cursor */
.order-card .btn,
.order-card input,
.order-card select,
.order-card textarea {
  cursor: pointer;
}

.order-card input[type="text"],
.order-card input[type="number"],
.order-card textarea {
  cursor: text;
}

.order-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Selected order card styles */
.order-card.selected {
  background: rgba(59, 130, 246, 0.08) !important;
  border: 2px solid rgba(59, 130, 246, 0.4) !important;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15) !important;
  transform: scale(1.02);
}

.order-card.selected:hover {
  transform: scale(1.02) translateY(-1px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.2) !important;
}

.order-header {
  background: rgba(241, 245, 249, 0.9);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.order-header h3 {
  margin: 0;
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.order-actions .btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.order-table {
  padding: 1rem;
}

.order-table table {
  width: 100%;
  border-collapse: collapse;
}

.order-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  vertical-align: top;
  font-size: 0.8rem;
  line-height: 1.4;
}

.order-table td:first-child {
  font-weight: 600;
  background-color: rgba(248, 250, 252, 0.8);
  color: #475569;
  width: 100px;
  font-size: 0.75rem;
  border-radius: 6px 0 0 6px;
}

.order-table td:last-child {
  border-radius: 0 6px 6px 0;
}

.no-orders {
  text-align: center;
  color: #64748b;
  font-style: italic;
  padding: 2.5rem;
  font-size: 1rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  margin: 5% auto;
  padding: 1.5rem;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.close {
  color: #64748b;
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 15px;
  top: 12px;
  transition: color 0.3s ease;
}

.close:hover {
  color: #ef4444;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: white;
}

/* Loading Animation */
.loading {
  display: none;
  text-align: center;
  padding: 2rem;
}

.spinner {
  border: 3px solid rgba(59, 130, 246, 0.1);
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Debug Styles */
.debug-checkbox {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 243, 205, 0.7);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.debug-checkbox label {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #92400e;
  cursor: pointer;
  margin: 0;
  font-weight: 500;
}

.debug-checkbox input[type="checkbox"] {
  margin-right: 0.4rem;
  transform: scale(1.1);
  accent-color: #f59e0b;
}

/* Inline Edit Styles */
.edit-input {
  width: 100%;
  padding: 0.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.edit-input:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
  background: rgba(255, 255, 255, 1);
}

.edit-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.edit-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  min-width: auto;
}

.order-card.editing {
  border: 2px solid #e5e7eb;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.order-card.editing .order-header {
  background: rgba(241, 245, 249, 0.9);
  color: #1e293b;
}

.order-card.editing .order-actions .edit-btn {
  background: rgba(100, 116, 139, 0.8);
  color: white;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.order-card.editing .order-actions .edit-btn:hover {
  background: rgba(71, 85, 105, 0.9);
}

/* Edit mode table cell styling */
.order-table tr td:last-child {
  position: relative;
}

.display-value {
  display: inline-block;
  min-height: 1.5rem;
  line-height: 1.5rem;
}

/* Loading animation for save */
.btn.saving {
  position: relative;
  color: transparent;
}

.btn.saving::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  color: white;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Success animation */
.btn.success {
  background: #27ae60 !important;
  transform: scale(1.05);
  transition: all 0.3s ease;
}

.btn.success::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0.75rem;
    height: 100vh;
  }

  header {
    padding: 1.25rem;
  }

  header h1 {
    font-size: 1.6rem;
  }

  .upload-section,
  .orders-section {
    padding: 1rem;
  }

  .upload-area {
    padding: 1.5rem 1rem;
  }

  .order-header {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .header-actions {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .header-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .order-actions {
    justify-content: center;
  }

  .modal-content {
    margin: 10% auto;
    width: 95%;
    padding: 1.25rem;
  }

  .orders-header {
    padding: 1rem 1rem 0;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  #ordersList {
    padding: 0 1rem 1rem;
  }
}

/* Responsive design for settings */
@media (max-width: 768px) {
  .settings-container {
    padding: 0.75rem;
  }
  
  .settings-nav {
    padding: 1rem;
  }
  
  .tab-nav {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  
  .tab-button {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }
  
  .settings-nav a:not(.tab-button) {
    display: block;
    margin: 0 0 0.75rem 0;
    text-align: center;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .form-group {
    min-width: auto;
  }
  
  .settings-table {
    font-size: 0.8rem;
  }
  
  .settings-table th,
  .settings-table td {
    padding: 0.6rem 0.4rem;
  }
}

/* Settings page styles */
.settings-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

.back-button-section {
  margin-bottom: 1rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #374151;
  text-decoration: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-back:hover {
  background: rgba(248, 250, 252, 0.98);
  transform: translateX(-2px);
  color: #1f2937;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.settings-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1.25rem;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.tab-nav::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, transparent, #e74c3c);
  margin-left: 20px;
  border-radius: 1px;
}

/* Regular tab buttons styling */
.tab-button:not(.field-mapping-tab) {
  border: 2px solid #3498db;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.tab-button:not(.field-mapping-tab):hover {
  background: linear-gradient(135deg, #2980b9, #1f618d);
}

.tab-button:not(.field-mapping-tab).active {
  background: linear-gradient(135deg, #2980b9, #1f618d);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.tab-button {
  padding: 0.65rem 1rem;
  text-decoration: none;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tab-button.active,
.tab-button:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-1px);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.settings-nav a:not(.tab-button) {
  margin-right: 1rem;
  padding: 0.65rem 1rem;
  text-decoration: none;
  background: #3b82f6;
  color: white;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.settings-nav a:not(.tab-button):hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.category-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  margin-bottom: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.category-header {
  background: #2c3e50;
  color: white;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
}

.settings-table th,
.settings-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.settings-table th {
  background: rgba(248, 250, 252, 0.8);
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.settings-table td {
  font-size: 0.85rem;
}

.settings-table tr:hover {
  background: rgba(248, 250, 252, 0.6);
}

.add-setting-form {
  background: rgba(248, 250, 252, 0.6);
  padding: 1.25rem;
  border-top: 2px solid rgba(59, 130, 246, 0.3);
}

.add-setting-form h4 {
  margin-bottom: 1rem;
  color: #374151;
  font-weight: 600;
  font-size: 1rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  align-items: end;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 180px;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: #374151;
  font-size: 0.85rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: white;
}

.message {
  padding: 0.85rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 8px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  font-size: 0.9rem;
}

.message.success {
  background: rgba(209, 250, 229, 0.9);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.message.error {
  background: rgba(254, 226, 226, 0.9);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-delete {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
}

.btn-delete:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

/* User info and navigation styles */
.user-info {
  color: #666;
  font-size: 0.9rem;
  margin-right: 15px;
  background: rgba(255, 255, 255, 0.8);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #e1e5e9;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-nav .btn {
  font-size: 0.85rem;
  padding: 8px 12px;
}

.header-nav .btn-small {
  font-size: 0.8rem;
  padding: 6px 10px;
}

/* Login page specific styles */
.login-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Responsive navigation */
@media (max-width: 768px) {
  .header-nav {
    position: relative;
    top: auto;
    right: auto;
    margin-top: 15px;
    justify-content: center;
  }
  
  .user-info {
    width: 100%;
    text-align: center;
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  header {
    text-align: center;
    padding-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .header-nav .btn {
    font-size: 0.75rem;
    padding: 6px 8px;
  }
  
  .user-info {
    font-size: 0.8rem;
    padding: 6px 8px;
  }
}

/* Font Awesome icon styles */
.fas, .far, .fab {
  margin-right: 6px;
}

/* Button icons - reduce margin for better spacing */
.btn .fas, 
.btn .far, 
.btn .fab {
  margin-right: 4px;
}

/* Small button icons */
.btn-small .fas, 
.btn-small .far, 
.btn-small .fab {
  margin-right: 3px;
}

/* Login button icon */
.login-btn .fas {
  margin-right: 8px;
}

/* Header navigation icons */
.header-nav .fas {
  margin-right: 5px;
}

/* Settings tab icons */
.tab-nav .fas {
  margin-right: 6px;
}

/* Form label icons */
label .fas {
  margin-right: 6px;
  color: #666;
}

/* Debug section icons */
.debug-section .fas {
  margin-right: 6px;
  color: #007bff;
}

/* Spinning animation for loading */
.fa-spin {
  animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Field Mapping Tab Styles */
.field-mapping-tab {
  background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
  color: white !important;
  border: none !important;
  margin-left: 20px;
  position: relative;
}

.field-mapping-tab:hover {
  background: linear-gradient(135deg, #c0392b, #a93226) !important;
  transform: translateY(-1px);
}

.field-mapping-tab.active {
  background: linear-gradient(135deg, #c0392b, #a93226) !important;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.field-mapping-tab::before {
  content: "⚠️";
  margin-right: 5px;
  font-size: 0.9em;
}

/* Field Mapping Content Styles */
.field-mapping-content {
  border: 2px solid #e74c3c;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff5f4, #fdf2f2);
}

.field-mapping-section {
  background: transparent;
}

.field-mapping-header {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  padding: 15px 20px;
  border-radius: 8px 8px 0 0;
  margin: -1px -1px 20px -1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.advanced-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8em;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.field-mapping-info {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  color: #856404;
}

.field-mapping-info p {
  margin: 0;
  font-size: 0.9em;
}

.field-mapping-table {
  border: 2px solid #e74c3c;
}

.field-mapping-table th {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

.field-mapping-table tbody tr:hover {
  background: rgba(231, 76, 60, 0.1);
}

.field-mapping-table code {
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e9ecef;
  font-family: 'Courier New', monospace;
  color: #e74c3c;
  font-weight: bold;
}

.field-mapping-form {
  border-top: 2px solid #e74c3c;
  background: rgba(231, 76, 60, 0.05);
  margin: 20px -20px -20px -20px;
  padding: 20px;
}

.field-mapping-form h4 {
  color: #c0392b;
  margin-bottom: 15px;
}

.field-mapping-form .btn-primary {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border: none;
}

.field-mapping-form .btn-primary:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  transform: translateY(-1px);
}
