* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f0f2f5;
  color: #333;
  min-height: 100vh;
}

header {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 28px;
  margin-bottom: 5px;
}

header p {
  font-size: 14px;
  opacity: 0.9;
}

main {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card h2 {
  color: #1e40af;
  margin-bottom: 15px;
  font-size: 20px;
}

.card p {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 5px;
}

.form-group input {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group small.ayuda {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.preview-fecha {
  background: #ecfdf5;
  border-left: 4px solid #10b981;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 14px;
  color: #065f46;
  margin-top: 10px;
}

.preview-fecha.error {
  background: #fef2f2;
  border-left-color: #ef4444;
  color: #991b1b;
}

input[type="file"] {
  display: block;
  margin: 15px 0;
  padding: 10px;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  background: #f8fafc;
  transition: border-color 0.2s;
}

input[type="file"]:hover {
  border-color: #3b82f6;
}

button {
  background: #1e40af;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
  margin: 5px 5px 5px 0;
  font-family: inherit;
}

button:hover:not(:disabled) {
  background: #3b82f6;
}

button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.btn-secundario {
  background: #059669;
  font-size: 14px;
  padding: 10px 18px;
}

.btn-secundario:hover:not(:disabled) {
  background: #10b981;
}

.btn-guardar {
  background: #7c3aed;
  font-size: 16px;
  padding: 14px 28px;
  width: 100%;
}

.btn-guardar:hover:not(:disabled) {
  background: #8b5cf6;
}

.botones-descarga {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

#resumen {
  background: #f8fafc;
  border-left: 4px solid #3b82f6;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
  max-height: 500px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
  color: #1e293b;
}