/* Mobile-First Ultraligero: Tarjetas NFC Smart v1.0 */
:root {
  --primary: #f95d08;
  --secondary: #871d8e;
  --success: #229230;
  --danger: #dc2626;
  --bg: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.9);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html, body { width: 100%; height: 100%; }

body {
  font-family: var(--font);
  background: linear-gradient(135deg, var(--bg) 0%, #1a2942 100%);
  color: var(--text);
  min-height: 100vh;
  padding: 1rem;
  overflow-x: hidden;
}

.app-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.card-container {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ===== PROFILE SECTION ===== */
.profile-section {
  padding: 2rem 1.5rem;
  background: linear-gradient(180deg, rgba(249, 93, 8, 0.05) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.profile-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: white;
  box-shadow: 0 8px 24px rgba(249, 93, 8, 0.3);
}

.name {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.title {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.company {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  cursor: pointer;
}

.contact-btn:hover {
  background: rgba(249, 93, 8, 0.15);
  border-color: var(--primary);
  transform: translateX(4px);
}

.contact-btn .icon {
  font-size: 18px;
  flex-shrink: 0;
}

.contact-btn .text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== CAPTURE SECTION ===== */
.capture-section {
  padding: 2rem 1.5rem;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.capture-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 0.25rem;
  display: none;
}

.form-error.show {
  display: block;
}

.submit-btn {
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, #ea580c 100%);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.5rem;
  box-shadow: 0 4px 14px rgba(249, 93, 8, 0.3);
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 93, 8, 0.4);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.submit-btn.loading {
  position: relative;
  color: transparent;
}

.submit-btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-status {
  font-size: 12px;
  text-align: center;
  min-height: 1.2em;
  display: none;
  margin-top: -0.5rem;
}

.form-status.show {
  display: block;
}

.form-status.success {
  color: var(--success);
}

.form-status.error {
  color: var(--danger);
}

/* ===== FOOTER ===== */
.card-footer {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
}

.footer-text {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.footer-version {
  color: var(--text-muted);
  opacity: 0.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .card-container {
    border-radius: 16px;
    max-width: 100%;
  }

  .profile-section,
  .capture-section {
    padding: 1.5rem 1rem;
  }

  .avatar {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .name {
    font-size: 20px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
