/* --- Variables y Reset --- */
:root {
  --primary: #2563eb; /* Azul corporativo moderno */
  --primary-hover: #1d4ed8;
  --bg-body: #f3f4f6; /* Gris muy suave, no negro */
  --bg-card: #ffffff;
  --text-main: #1f2937;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --success: #10b981;
  --radius: 16px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* --- Tabs --- */
.tab-switcher {
  margin-bottom: 32px;
  display: flex;
  justify-content: center;
  gap: 0;
}

.tab-btn {
  padding: 12px 32px;
  border: 1px solid var(--border-color);
  background: #f3f4f6 !important; /* gris claro para inactiva */
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: 8px 8px 0 0;
  transition: background 0.2s, color 0.2s;
}

.tab-btn.active {
  background: #fff !important; /* blanco para activa */
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  z-index: 2;
  font-weight: 700;
}

/* Progress Bar Styles */
.progress-container {
  width: 100%;
  background-color: #e5e7eb;
  border-radius: 8px;
  height: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background-color: #2563eb;
  transition: width 0.3s ease;
}


body {
  font-family: "Inter", sans-serif;
  background-color: --bg-body;
  background: radial-gradient(circle at top left, #eff6ff, #f3f4f6);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* --- Contenedor Principal (Tarjeta) --- */
.app-wrapper {
  width: 100%;
  max-width: 520px;
}

.card {
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

/* --- Header y Logo --- */
header {
  margin-bottom: 32px;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.company-logo {
  height: 80px; /* Ajusta según tu logo real */
  width: auto;
}

.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.025em;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --- Área de Upload --- */
.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 40px 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  background-color: #f9fafb;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background-color: #eff6ff; /* Azul muy pálido al hacer hover */
}

.icon-circle {
  width: 64px;
  height: 64px;
  background: #dbeafe;
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  font-size: 32px;
}

.upload-area h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.upload-area p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* --- Botones --- */
button {
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 8px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
}

.btn-outline {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--text-main);
  background: white;
}

.btn-primary {
  width: 100%;
  padding: 12px 24px;
  background-color: #fcd02a;
  color: #222;
  font-weight: bold;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background-color: #222;
  color: white;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px;
  margin-top: 10px;
}

.btn-ghost:hover {
  color: var(--text-main);
  text-decoration: underline;
}

/* --- Status Area (Loader) --- */
.status-area {
  padding: 40px 0;
}

.loader {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-bottom-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  animation: rotation 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#status-text {
  font-weight: 500;
  color: var(--text-main);
}

/* --- Result Area --- */
.result-area {
  padding: 20px 0;
  animation: fadeIn 0.5s ease;
}

.success-icon {
  font-size: 64px;
  color: var(--success);
  margin-bottom: 16px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

/* --- Footer --- */
footer {
  margin-top: 32px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

footer p {
  font-size: 0.8rem;
  color: #9ca3af;
}

.brand-highlight {
  color: #fcd02a;
  font-weight: bolder;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
