* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

#app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
  /*font-size: 24px;*/
  margin-bottom: 5px;
}

.progress-bar {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.step {
  flex: 1;
  padding: 10px;
  background: #e0e0e0;
  text-align: center;
  border-radius: 10px;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.3s;
}

.step.active {
  background: #008dba;
  color: white;
  font-size: 20px;
  font-weight: bold;
}

.step.completed {
  background: #28a745;
  color: white;
}

main {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  min-height: 600px;
}

.logo {
    height: 70px;
    width: auto;
    padding: 1px;
    display: block;
    margin-left: auto;    
}


.window {
  display: none;
}

.window.active {
  display: block;
}

.window h2 {
  margin-bottom: 20px;
  /*color: #007bff;*/
  color: black;
}

/* Upload section */
.upload-section {
  margin: 20px 0;
}

.footer_heading, .footer_heading_2{
      color: #666; 
      font-size: 13px;
      margin-top: 0;
}

.footer_heading_2{
  text-align: right;
}

.file-input-group {
  margin: 15px 0;
  padding: 15px;
  border: 2px dashed #ccc;
  border-radius: 12px;
}

.file-input-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.file-input-group input[type="file"] {
  margin: 10px 0;
}

.file-info {
  display: block;
  font-size: 15px;
  color: #28a745;
  margin-top: 5px;
}


.file-input-wrapper {
  position: relative;
  display: inline-block;
  margin: 20px 0;
}

.file-label {
  background: #3498db;
  color: white;
  padding: 15px 30px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.3s;
  display: inline-block;
}

.file-label:hover {
  background: #2980b9;
}

/* Global Search Panel */
.global-search-panel {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  border: 2px solid #007bff;
}

.global-search-panel h3 {
  margin-bottom: 15px;
  color: #007bff;
}

.search-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.search-inputs input {
  flex: 1;
  min-width: 150px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 15px;
  height: 50px;
}

.search-inputs button {
  padding: 15px 25px;
  white-space: nowrap;
}

#global-search-results {
  margin-top: 20px;
}

#global-search-results h4 {
  margin: 15px 0 10px 0;
  color: #333;
}

/* Skipped badge */
.badge.skipped {
  background: #6c757d;
  color: white;
}

/* Skipped items container */
#skipped-container {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
  border-left: 4px solid #6c757d;
}

#skipped-items-list {
  margin-top: 10px;
}

.skipped-item {
  background: white;
  padding: 10px;
  margin: 5px 0;
  border-radius: 4px;
  border: 1px solid #ddd;
  font-size: 13px;
}

/* Manual fix form */
.manual-fix-form {
  background: #fff;
  padding: 15px;
  border-radius: 4px;
  border: 1px solid #007bff;
  margin: 15px 0;
}

.manual-fix-form h5 {
  margin-bottom: 10px;
  color: #007bff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 3px;
  color: #555;
}

.form-field input {
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 15px;
}

.form-field input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

/* Results tables */
#promail-results-table table,
#lookup-results-table table {
  width: 100%;
  font-size: 15px;
}

#promail-results-table th,
#lookup-results-table th {
  text-align: left;
  position: sticky;
  top: 0;
  background: #006fab;
  color: white;
  padding: 8px;
  font-size: 15px;
}

#promail-results-table td,
#lookup-results-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #eee;
}


/* Summary card */
.summary-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 4px;
  margin: 20px 0;
}

.badge {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 14px;
  margin-right: 10px;
}

.badge.success {
  background: #28a745;
  color: white;
}

.badge.error {
  background: #dc3545;
  color: white;
}

.badge.warning {
  background: #ffc107;
  color: #333;
}

/* Error container */
#error-container {
  margin: 20px 0;
}

.error-item {
  border: 1px solid #dc3545;
  border-radius: 4px;
  padding: 15px;
  margin: 10px 0;
  background: #fff5f5;
}

.error-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: bold;
}

.error-type {
  color: #dc3545;
}

.error-details {
  margin: 10px 0;
}

.original-data {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
  font-family: monospace;
  font-size: 14px;
}

.original-data span {
  display: block;
  margin: 3px 0;
}

.fix-options {
  margin: 15px 0;
}

.fix-options label {
  display: block;
  margin: 10px 0;
}

.fix-options input[type="radio"] {
  margin-right: 5px;
}

.search-form {
  display: inline-flex;
  gap: 5px;
  margin-left: 20px;
}

.search-form input {
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.search-form button {
  padding: 5px 10px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

.fix-options select {
  display: block;
  margin: 10px 0 10px 20px;
  padding: 8px;
  width: calc(100% - 20px);
  max-width: 600px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.actions {
  margin-top: 10px;
}

.btn-apply {
  padding: 8px 15px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.btn-apply:hover {
  background: #218838;
}

/* Toolbar */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
}

.toolbar button {
  padding: 8px 15px;
  background: #008abb;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

.toolbar select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.edit-count {
  margin-left: auto;
  font-weight: bold;
}

/* Tables */
.table-wrapper {
  overflow: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin: 20px 0;
}

.data-table table,
.preview-table table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.preview-table th {
  background: #006fab;
  color: white;
  font-size: 17px;
  padding: 12px;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table td,
.preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
}

.data-table tr:hover,
.preview-table tr:hover {
  background: #f8f9fa;
}

.gangfolge-cell {
  cursor: pointer;
  background: #e3f2fd;
  font-weight: bold;
  color: #0066cc;
}

.gangfolge-cell:hover {
  background: #bbdefb;
}

.gangfolge-input {
  width: 60px;
  padding: 4px;
  font-weight: bold;
  font-size: 14px;
  border: 2px solid #007bff;
}

.row-edited {
  background: #fff3cd !important;
}

.row-affected {
  background: #d4edda !important;
}

/* Navigation buttons */
.nav-buttons {
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

button {
  padding: 13px 20px;
  font-size: 16px;
  border: none;
  margin-bottom: 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #007fab;
  color: white;
  font-weight: bold;
}

.btn-primary:hover:not(:disabled) {
  background: #265b94;
}

.btn-large {
  padding: 15px 40px;
  font-size: 18px;
}

/* Loader */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader.hidden {
  display: none;
}

.loader-content {
  background: white;
  padding: 40px;
  border-radius: 8px;
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
}

.modal-content h3 {
  margin-bottom: 20px;
}

.modal-content form label {
  display: block;
  margin: 10px 0;
  font-weight: bold;
}

.modal-content form input {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.modal-buttons {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Validation checks */
.validation-checks p {
  margin: 10px 0;
  font-size: 16px;
}

/* Export section */
.export-section {
  text-align: center;
  margin: 30px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .progress-bar {
    flex-direction: column;
  }
  
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .nav-buttons {
    flex-direction: column;
  }
}

.hidden {
  display: none !important;
}
