/* -----------------------
   Reset básico
------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* -----------------------
   Variables base (light)
------------------------ */
:root {
    --bg: radial-gradient(circle at top left, #fdf2ff 0%, #eef4ff 40%, #f9fafb 100%);
    --accent: #6366f1;
    --accent-strong: #4f46e5;
    --accent-soft: rgba(99, 102, 241, 0.1);
    --text-main: #0f172a;
    --text-soft: #6b7280;
    --border-soft: rgba(148, 163, 184, 0.5);
    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.18);
    --transition: all 0.2s ease;
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Roboto", "Segoe UI", sans-serif;
}

/* -----------------------
   Tema oscuro
------------------------ */
body.theme-dark {
    --bg: radial-gradient(circle at top left, #020617 0%, #020617 35%, #030712 100%);
    --accent: #38bdf8;
    --accent-strong: #0ea5e9;
    --accent-soft: rgba(56, 189, 248, 0.15);
    --text-main: #e5e7eb;
    --text-soft: #9ca3af;
    --border-soft: rgba(55, 65, 81, 0.8);
    --shadow-soft: 0 30px 70px rgba(0, 0, 0, 0.75);
}

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background 0.25s ease, color 0.25s ease;
}

/* -----------------------
   Layout general
------------------------ */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* -----------------------
   Top bar
------------------------ */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    backdrop-filter: blur(16px);
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.85),
        rgba(255, 255, 255, 0));
    position: sticky;
    top: 0;
    z-index: 20;
}

body.theme-dark .top-bar {
    background: linear-gradient(to bottom,
        rgba(15, 23, 42, 0.96),
        rgba(15, 23, 42, 0));
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo span {
    color: var(--accent);
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.top-nav {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-soft);
}

.top-nav span {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    transition: var(--transition);
}

.top-nav span:hover {
    border-color: var(--border-soft);
    background: rgba(255, 255, 255, 0.7);
}

body.theme-dark .top-nav span:hover {
    background: rgba(15, 23, 42, 0.85);
}

/* Botón tema */
.theme-toggle {
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.theme-dark .theme-toggle {
    background: rgba(15, 23, 42, 0.96);
    color: #e5e7eb;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.25);
}

/* -----------------------
   Contenido principal
------------------------ */
.main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 32px 16px 40px;
}

.content {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    /* SIN fondo ni borde: solo sirve para centrar */
}

.content h1 {
    font-size: 2rem;
    margin-bottom: 6px;
    letter-spacing: -0.03em;
}

.subtitle {
    color: var(--text-soft);
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* -----------------------
   Pasos en tarjetas
------------------------ */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin: 16px 0 24px;
}

.step-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    padding: 18px 16px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.theme-dark .step-card {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(30, 64, 175, 0.7);
}

.step-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.step-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.step-desc {
    font-size: 0.83rem;
    color: var(--text-soft);
}

/* -----------------------
   Alertas
------------------------ */
.alert {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.85rem;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

body.theme-dark .alert-error {
    background: rgba(248, 113, 113, 0.1);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.55);
}

.alert-success {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

body.theme-dark .alert-success {
    background: rgba(52, 211, 153, 0.12);
    color: #bbf7d0;
    border-color: rgba(52, 211, 153, 0.6);
}

/* -----------------------
   Formulario
------------------------ */
.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Dropzone */
.dropzone {
    position: relative;
    border-radius: 18px;
    border: 1.5px dashed var(--border-soft);
    background: rgba(249, 250, 251, 0.96);
    padding: 26px 20px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
}

body.theme-dark .dropzone {
    background: rgba(15, 23, 42, 0.95);
}

.dropzone:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-soft);
    transform: translateY(-1px);
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.drop-icon {
    font-size: 1.9rem;
    margin-bottom: 4px;
}

.drop-title {
    font-weight: 600;
    font-size: 1rem;
}

.drop-or {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
}

.drop-hint {
    font-size: 0.8rem;
    color: var(--text-soft);
}

.file-list {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-soft);
    text-align: center;
    word-break: break-word;
}

.file-list--filled {
    color: var(--accent-strong);
    font-weight: 500;
}

/* Campo genérico */
.field {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.field-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.field-value {
    font-size: 0.85rem;
    color: var(--text-soft);
}

.field input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.field-hint {
    font-size: 0.78rem;
    color: var(--text-soft);
}

/* -----------------------
   Botones
------------------------ */
.btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 11px 20px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.45);
}

.btn-full {
    width: 100%;
    margin-top: 6px;
}

.btn-secondary {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: rgba(255, 255, 255, 0.96);
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

body.theme-dark .btn-secondary {
    background: rgba(15, 23, 42, 0.9);
    color: var(--accent);
    border-color: var(--accent);
}

.btn-secondary:hover {
    background: var(--accent-soft);
}

/* -----------------------
   Resultados
------------------------ */
.results-list {
    margin-top: 8px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

body.theme-dark .result-item {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(30, 64, 175, 0.7);
}

.result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.result-meta {
    font-size: 0.8rem;
    color: var(--text-soft);
}

.error-list {
    margin-left: 18px;
    font-size: 0.83rem;
}

/* -----------------------
   Pie + footer
------------------------ */
.footnote {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-soft);
}

.footer {
    padding: 12px 24px 20px;
    font-size: 0.82rem;
    color: var(--text-soft);
    text-align: center;
}

/* -----------------------
   Responsivo
------------------------ */
@media (max-width: 768px) {
    .top-bar {
        padding: 14px 16px;
    }

    .top-nav {
        display: none;
    }

    .content h1 {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.25rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }
}