:root {
  --bg-color: #0b0f19;
  --card-bg: rgba(18, 24, 38, 0.85);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --success-color: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --error-color: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.12);
  --input-bg: rgba(15, 23, 42, 0.6);
  --border-radius: 16px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  padding: 20px;
}

/* Decoraciones de fondo */
.background-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
}

.circle-1 {
  width: 450px;
  height: 450px;
  background: #3b82f6;
  top: -100px;
  right: -100px;
}

.circle-2 {
  width: 500px;
  height: 500px;
  background: #8b5cf6;
  bottom: -150px;
  left: -150px;
}

/* Contenedor Principal */
.main-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 10;
}

/* Tarjeta de estilo Glassmorphism */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 36px 32px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 0 30px 0 rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.card.hidden {
  display: none !important;
}

.card.active {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Barra superior */
.card-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.user-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: var(--transition);
}

.btn-text:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

/* Encabezado */
.card-header {
  text-align: center;
  margin-bottom: 28px;
}

.icon-badge {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  box-shadow: 0 8px 16px -4px var(--accent-glow);
}

.icon-upload {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(59, 130, 246, 0.1));
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

h1, h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Formulario */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 14px 44px 14px 16px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}

input[type="password"]:focus,
input[type="text"]:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background: rgba(15, 23, 42, 0.85);
}

.btn-icon {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Botón Principal */
.btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #2563eb);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Zona Drop */
.drop-zone {
  position: relative;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  background: rgba(15, 23, 42, 0.4);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 20px;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.06);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.cloud-icon {
  color: #60a5fa;
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}

.drop-zone:hover .cloud-icon {
  transform: translateY(-3px);
}

.drop-text {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 4px;
}

.drop-text .highlight {
  color: #60a5fa;
  text-decoration: underline;
}

.drop-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Vista previa de archivo */
.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.file-icon {
  color: #60a5fa;
  display: flex;
}

.file-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.file-size {
  font-size: 12px;
  color: var(--text-muted);
}

/* Barra de Progreso */
.progress-container {
  margin-bottom: 20px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 6px;
  transition: width 0.15s ease-out;
}

/* Alertas */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}

.alert-error {
  background: var(--error-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.hidden {
  display: none !important;
}
