/**
 * Excel Import/Export Styles
 */

/* Import Dialog */
.import-dialog {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  background: transparent;
}

.import-dialog-content {
  background: white;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.import-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.import-header h3 {
  margin: 0;
  font-size: 18px;
  color: #1f2937;
}

.dialog-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.dialog-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.import-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.import-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.import-step.hidden {
  display: none;
}

.import-step h4 {
  margin: 0;
  font-size: 16px;
  color: #374151;
}

/* File Drop Zone */
.file-drop-zone {
  position: relative;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.file-drop-zone:hover {
  border-color: #6f86cf;
  background: #eff6ff;
}

.file-drop-zone.drag-over {
  border-color: #6f86cf;
  background: #dbeafe;
}

.file-drop-zone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.file-icon {
  font-size: 48px;
}

.file-drop-content p {
  margin: 0;
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.file-drop-content small {
  color: #9ca3af;
  font-size: 12px;
}

/* Field Mapping */
.mapping-info {
  padding: 12px 16px;
  background: #eff6ff;
  border-radius: 8px;
  border-left: 4px solid #6f86cf;
}

.mapping-info p {
  margin: 0;
  font-size: 13px;
  color: #1e40af;
}

.mapping-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mapping-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.mapping-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.column-name {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.column-sample {
  font-size: 12px;
  color: #9ca3af;
}

.mapping-arrow {
  font-size: 20px;
  color: #6b7280;
}

.mapping-select {
  flex: 1;
}

.mapping-select select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: white;
  cursor: pointer;
}

.mapping-select select:focus {
  outline: none;
  border-color: #6f86cf;
  box-shadow: 0 0 0 3px rgba(111, 134, 207, 0.1);
}

/* Preview Table */
.preview-info {
  padding: 12px 16px;
  background: #fef3c7;
  border-radius: 8px;
  border-left: 4px solid #f59e0b;
}

.preview-info p {
  margin: 0;
  font-size: 13px;
  color: #92400e;
}

.preview-info strong {
  color: #78350f;
}

.preview-table-container {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.preview-table thead {
  background: #f9fafb;
}

.preview-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
}

.preview-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #f3f4f6;
  color: #6b7280;
}

.preview-table tr:last-child td {
  border-bottom: none;
}

/* Import Footer */
.import-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.import-footer button {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.import-footer button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-cancel {
  background: white;
  border: 1px solid #d1d5db;
  color: #6b7280;
}

.btn-cancel:hover {
  background: #f3f4f6;
}

.btn-back {
  background: white;
  border: 1px solid #d1d5db;
  color: #6b7280;
}

.btn-back:hover {
  background: #f3f4f6;
}

.btn-next {
  background: #6f86cf;
  border: none;
  color: white;
}

.btn-next:hover:not(:disabled) {
  background: #5671c0;
}

.btn-import {
  background: #10b981;
  border: none;
  color: white;
}

.btn-import:hover {
  background: #059669;
}

/* Export Button in Toolbar */
.toolbar-export-menu {
  position: relative;
}

.export-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 8px;
  min-width: 200px;
  z-index: 1000;
}

.export-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.export-dropdown-item:hover {
  background: #f3f4f6;
}

.export-dropdown-icon {
  font-size: 18px;
}

.export-dropdown-label {
  flex: 1;
  font-size: 13px;
  color: #374151;
  font-weight: 500;
}

.export-dropdown-desc {
  font-size: 11px;
  color: #9ca3af;
}

/* Dark Theme */
body.dark-theme .import-dialog-content {
  background: #1e293b;
}

body.dark-theme .import-header {
  border-bottom-color: #334155;
}

body.dark-theme .import-header h3 {
  color: #e2e8f0;
}

body.dark-theme .dialog-close {
  color: #94a3b8;
}

body.dark-theme .dialog-close:hover {
  background: #334155;
  color: #e2e8f0;
}

body.dark-theme .import-body {
  background: #1e293b;
}

body.dark-theme .import-step h4 {
  color: #e2e8f0;
}

body.dark-theme .file-drop-zone {
  border-color: #475569;
  background: #0f172a;
}

body.dark-theme .file-drop-zone:hover,
body.dark-theme .file-drop-zone.drag-over {
  border-color: #6f86cf;
  background: #1e3a5f;
}

body.dark-theme .file-drop-content p {
  color: #e2e8f0;
}

body.dark-theme .mapping-info {
  background: #1e3a5f;
  border-left-color: #6f86cf;
}

body.dark-theme .mapping-info p {
  color: #93c5fd;
}

body.dark-theme .mapping-row {
  background: #0f172a;
  border-color: #334155;
}

body.dark-theme .column-name {
  color: #e2e8f0;
}

body.dark-theme .column-sample {
  color: #64748b;
}

body.dark-theme .mapping-arrow {
  color: #94a3b8;
}

body.dark-theme .mapping-select select {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-theme .mapping-select select:focus {
  border-color: #6f86cf;
}

body.dark-theme .preview-info {
  background: #422006;
  border-left-color: #f59e0b;
}

body.dark-theme .preview-info p {
  color: #fcd34d;
}

body.dark-theme .preview-info strong {
  color: #fde68a;
}

body.dark-theme .preview-table-container {
  border-color: #334155;
}

body.dark-theme .preview-table thead {
  background: #0f172a;
}

body.dark-theme .preview-table th {
  color: #e2e8f0;
  border-bottom-color: #475569;
}

body.dark-theme .preview-table td {
  color: #94a3b8;
  border-bottom-color: #1e293b;
}

body.dark-theme .import-footer {
  border-top-color: #334155;
  background: #0f172a;
}

body.dark-theme .btn-cancel,
body.dark-theme .btn-back {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

body.dark-theme .btn-cancel:hover,
body.dark-theme .btn-back:hover {
  background: #475569;
}
