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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: #e0e0e0;
  min-height: 100vh;
  padding: 50px 20px 20px;
}

.app { max-width: 720px; margin: 0 auto; }

.header { text-align: center; margin-bottom: 28px; }
.header h1 { font-size: 2rem; color: #f4d03f; margin-bottom: 6px; }
.subtitle { color: #a0b4d0; font-size: 1rem; margin-bottom: 16px; }

.counter-hidden { display: none; }

.card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 24px; margin-bottom: 20px;
  animation: fadeIn 0.35s ease;
}
.card h2 { font-size: 1.2rem; color: #f4d03f; margin-bottom: 18px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* SELECTOR DE TIPO */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-btn {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 18px 14px; cursor: pointer;
  text-align: center; transition: all 0.2s; color: #e0e0e0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: inherit; font-size: 0.95rem;
}
.type-btn:hover { background: rgba(255,255,255,0.1); border-color: #8ab4f8; transform: translateY(-2px); }
.type-btn.selected { border-color: #f4d03f; background: rgba(244,208,63,0.1); }
.type-icon { font-size: 1.8rem; }
.type-title { font-weight: 700; font-size: 1rem; }
.type-desc { font-size: 0.75rem; color: #8a9bb8; }

/* FORMULARIOS */
.form-group { display: flex; flex-direction: column; gap: 10px; }
.form-group label { font-size: 0.9rem; color: #a0b4d0; font-weight: 600; }

input, select, textarea {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 1rem;
  outline: none; transition: border-color 0.2s; font-family: inherit;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: #f4d03f; }
textarea { resize: vertical; min-height: 60px; }
select { cursor: pointer; }
select option { background: #24243e; color: #fff; }

.dms-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dms-row label { min-width: 80px; }
.dms-row input { width: 70px; flex: none; text-align: center; }
.dms-row select { width: 60px; flex: none; }
.dms-label { color: #f4d03f; font-weight: 700; font-size: 1rem; }

.help-text { font-size: 0.85rem; color: #8a9bb8; margin-bottom: 12px; }

.btn-primary {
  background: #f4d03f; color: #1a1a2e; border: none; padding: 12px 24px;
  border-radius: 10px; font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: background 0.2s; margin-top: 14px; width: 100%;
}
.btn-primary:hover { background: #e5c13a; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; background: #8a7a2a; }

.btn-secondary {
  background: rgba(255,255,255,0.08); color: #e0e0e0; border: 1px solid rgba(255,255,255,0.15);
  padding: 10px 20px; border-radius: 8px; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.14); }

/* RESULTADOS */
.result-box {
  background: rgba(0,0,0,0.2); border-radius: 10px; padding: 16px;
  font-family: 'Courier New', monospace; font-size: 0.95rem;
  line-height: 1.8; overflow-x: auto;
}
.result-box .res-line { padding: 2px 0; }
.result-box .res-label { color: #8ab4f8; }
.result-box .res-value { color: #fff; font-weight: 600; }

.result-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.result-actions button { flex: 1; min-width: 120px; }

/* BATCH */
.file-input { margin-bottom: 10px; }
.file-input::file-selector-button {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; padding: 8px 16px; border-radius: 6px; cursor: pointer; margin-right: 12px;
}
.batch-preview { margin: 12px 0; font-size: 0.85rem; color: #8a9bb8; }

/* TABLA RESULTADOS BATCH */
.result-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.85rem; }
.result-table th { background: rgba(244,208,63,0.1); color: #f4d03f; padding: 8px 10px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); }
.result-table td { padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.result-table tr:hover { background: rgba(255,255,255,0.03); }

.error-msg { color: #f28b82; font-size: 0.9rem; margin-top: 8px; padding: 8px 12px; background: rgba(242,136,130,0.1); border-radius: 6px; }

/* RESPONSIVE */
/* SOPORTE */
.support-section { border-color: rgba(138, 180, 248, 0.2); }
.support-content { display: flex; align-items: flex-start; gap: 14px; }
.support-icon { font-size: 1.5rem; line-height: 1.4; }
.support-title { font-weight: 700; color: #c0d0e0; margin-bottom: 4px; }
.support-text { font-size: 0.85rem; color: #8a9bb8; margin-bottom: 6px; }
.support-link {
  display: inline-block; color: #8ab4f8; font-size: 0.9rem;
  text-decoration: none; font-weight: 600; transition: color 0.2s;
}
.support-link:hover { color: #f4d03f; text-decoration: underline; }

@media (max-width: 600px) {
  body { padding: 12px; }
  .header h1 { font-size: 1.5rem; }
  .card { padding: 16px; }
  .type-grid { grid-template-columns: 1fr; }
  .dms-row input { width: 55px; }
  .result-actions { flex-direction: column; }
}
