* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.app-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 20px 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.app-header h1 {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #1f2937;
  font-size: 28px;
  font-weight: 700;
}

.config-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-size: 20px;
  width: 45px;
  height: 45px;
  justify-content: center;
}

.config-btn:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.header-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-new {
  background: #10b981;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 600;
}

.btn-new:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.modal-content.small {
  max-width: 450px;
}

.modal-body {
  padding: 24px 30px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.message {
  background: white;
  padding: 16px 24px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease;
}

.message.success {
  border-left: 4px solid #10b981;
  color: #065f46;
}

.message.error {
  border-left: 4px solid #ef4444;
  color: #991b1b;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.upload-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.upload-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upload-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.upload-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 32px;
}

.upload-icon.excel {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.upload-icon.pdf {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.upload-icon.email {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.upload-card h3 {
  color: #1f2937;
  font-size: 22px;
  margin-bottom: 8px;
}

.upload-card p {
  color: #6b7280;
  margin-bottom: 20px;
  font-size: 14px;
}

.upload-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-weight: 600;
  border: none;
  font-size: 15px;
}

.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.upload-btn input {
  display: none;
}

.send-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-weight: 600;
  border: none;
  font-size: 15px;
}

.send-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.send-btn:disabled,
.upload-btn:disabled,
input:disabled + .upload-btn {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.file-status {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #10b981;
  font-weight: 600;
  font-size: 14px;
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.progress-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.progress-section h3 {
  color: #1f2937;
  margin-bottom: 20px;
  font-size: 20px;
}

.progress-bar {
  width: 100%;
  height: 30px;
  background: #e5e7eb;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 15px;
  transition: width 0.5s ease;
  width: 0%;
}

.progress-text {
  text-align: center;
  color: #1f2937;
  font-weight: 700;
  font-size: 18px;
}

.data-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.data-section h2 {
  color: #1f2937;
  margin-bottom: 20px;
  font-size: 24px;
}

.table-container {
  overflow-x: auto;
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  color: #1f2937;
}

tbody tr:hover {
  background: #f9fafb;
}

tbody tr:last-child td {
  border-bottom: none;
}

.pdf-list,
.results-list {
  display: grid;
  gap: 12px;
}

.pdf-item,
.result-item {
  background: white;
  padding: 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 4px solid #667eea;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pdf-item.clickable {
  cursor: pointer;
}

.pdf-item.clickable:hover,
.result-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.result-item.success {
  border-left-color: #10b981;
}

.result-item.error {
  border-left-color: #ef4444;
}

.pdf-info,
.result-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pdf-info strong,
.result-info strong {
  color: #1f2937;
  font-size: 15px;
}

.pdf-info small,
.result-info small {
  color: #6b7280;
  font-size: 13px;
}

.result-message {
  font-style: italic;
}

.pdf-item i,
.result-item i {
  font-size: 20px;
}

.pdf-view-icon {
  color: #667eea;
  font-size: 18px;
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.pdf-item.clickable:hover .pdf-view-icon {
  opacity: 1;
  transform: scale(1.1);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 30px;
  border-bottom: 2px solid #e5e7eb;
}

.modal-header h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #1f2937;
  font-size: 24px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 32px;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #1f2937;
}

.config-section {
  padding: 24px 30px;
  border-bottom: 1px solid #e5e7eb;
}

.config-section:last-of-type {
  border-bottom: none;
}

.config-section h3 {
  color: #1f2937;
  margin-bottom: 20px;
  font-size: 18px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #374151;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.form-group small {
  display: block;
  color: #6b7280;
  margin-top: 6px;
  font-size: 12px;
}

.modal-footer {
  padding: 20px 30px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 2px solid #e5e7eb;
}

.btn-cancel,
.btn-save {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 14px;
}

.btn-cancel {
  background: #e5e7eb;
  color: #1f2937;
}

.btn-cancel:hover {
  background: #d1d5db;
}

.btn-save {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .app-header h1 {
    font-size: 20px;
  }

  .upload-section {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-width: 100%;
  }

  table {
    font-size: 14px;
  }

  th, td {
    padding: 12px 8px;
  }
}

