/* ═══════════════════════════════════════════════════════════
   TRANQUI PROFE — Premium Dark Theme
   Su portafolio en buenas manos
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ─── CSS Variables ──────────────────────────────────── */
:root {
    --bg-primary: #070b14;
    --bg-secondary: #0d1321;
    --bg-card: #111928;
    --bg-card-hover: #162032;
    --bg-input: #0f172a;
    --bg-input-focus: #131d30;
    --border-subtle: rgba(99, 102, 241, 0.15);
    --border-input: rgba(148, 163, 184, 0.2);
    --border-focus: rgba(99, 102, 241, 0.6);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-label: #cbd5e1;
    --accent-primary: #6366f1;
    --accent-primary-light: #818cf8;
    --accent-secondary: #f59e0b;
    --accent-teal: #2dd4bf;
    --accent-rose: #f43f5e;
    --accent-emerald: #10b981;
    --glass-bg: rgba(17, 25, 40, 0.75);
    --glass-border: rgba(255, 255, 255, 0.06);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ───────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ─── Background Gradient Orbs ───────────────────────── */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

body::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    top: -100px;
    right: -100px;
}

body::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-teal), transparent 70%);
    bottom: -50px;
    left: -100px;
}

/* ═══════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════ */

.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    text-align: center;
}

.landing-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary-light), var(--accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out;
}

.landing-tagline {
    font-size: 1.35rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.landing-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    width: 100%;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.feature-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15));
    opacity: 0;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-input);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary-light);
    background: rgba(99, 102, 241, 0.05);
}

/* ═══════════════════════════════════════════════════════════
   FORM WIZARD
   ═══════════════════════════════════════════════════════════ */

.form-app {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

/* ─── Header ─────────────────────────────────────────── */
.form-header {
    text-align: center;
    padding: 2rem 0 1.5rem;
}

.form-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary-light), var(--accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.form-brand:hover {
    opacity: 0.8;
}

.save-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.save-indicator.visible {
    opacity: 1;
}

.save-indicator.saving {
    color: var(--accent-secondary);
}

.save-indicator.saved {
    color: var(--accent-emerald);
}

.save-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ─── Progress Bar ───────────────────────────────────── */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar-wrapper {
    background: var(--bg-card);
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
}

.progress-bar-fill {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-teal));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    border-radius: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.progress-step-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ─── Step Container ─────────────────────────────────── */
.step {
    display: none;
    animation: fadeInStep 0.4s ease-out;
}

.step.active {
    display: block;
}

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

.step-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

.step-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1.5rem;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.step-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ─── Form Fields ────────────────────────────────────── */
.field-group {
    margin-bottom: 1.5rem;
}

.field-group.hidden {
    display: none;
}

.field-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-label);
    margin-bottom: 0.5rem;
}

.field-label .required {
    color: var(--accent-rose);
    margin-left: 2px;
}

.field-tooltip {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-style: italic;
    line-height: 1.5;
    padding-left: 0.75rem;
    border-left: 2px solid var(--accent-primary);
    opacity: 0.8;
}

.field-input,
.field-select,
.field-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.field-input::placeholder,
.field-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
    background: var(--bg-input-focus);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.field-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8.825L.35 3.175l.7-.7L6 7.425l4.95-4.95.7.7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.field-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.field-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.field-textarea.tall {
    min-height: 150px;
}

/* Radio & Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.radio-option:hover,
.checkbox-option:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.radio-option input,
.checkbox-option input {
    accent-color: var(--accent-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.radio-option.selected,
.checkbox-option.selected {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-primary-light);
}

/* ─── Experience Cards ───────────────────────────────── */
.experience-card {
    background: rgba(99, 102, 241, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.experience-card-title {
    font-weight: 600;
    color: var(--accent-primary-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ─── Navigation Buttons ─────────────────────────────── */
.step-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    gap: 1rem;
}

.btn-prev,
.btn-next {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    border: none;
}

.btn-prev {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-input);
}

.btn-prev:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.btn-next {
    background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
    color: white;
    margin-left: auto;
}

.btn-next:hover {
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.btn-submit {
    background: linear-gradient(135deg, var(--accent-emerald), #059669);
}

.btn-submit:hover {
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.35);
}

/* ─── Step 10: Summary ───────────────────────────────── */
.summary-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(99, 102, 241, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.summary-section-title {
    font-weight: 600;
    color: var(--accent-primary-light);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-field {
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
}

.summary-field-label {
    color: var(--text-muted);
    font-weight: 500;
}

.summary-field-value {
    color: var(--text-primary);
    margin-left: 0.25rem;
}

.summary-field-value.empty {
    color: var(--text-muted);
    font-style: italic;
}

.summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    border: none;
}

.btn-copy {
    background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
    color: white;
}

.btn-download {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-input);
}

.btn-copy:hover {
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.3);
}

.btn-download:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary-light);
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--accent-emerald);
    color: var(--accent-emerald);
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════════════════════ */

.admin-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

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

.admin-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.admin-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(20px);
    flex: 1;
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary-light);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.submission-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.submission-table th {
    text-align: left;
    padding: 1rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
}

.submission-table td {
    padding: 0.9rem 1.25rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.submission-table tr:last-child td {
    border-bottom: none;
}

.submission-table tr:hover td {
    background: rgba(99, 102, 241, 0.03);
}

.status-badge {
    display: inline-flex;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.borrador {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-secondary);
}

.status-badge.completado {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    border: 1px solid var(--border-input);
    background: transparent;
    color: var(--text-secondary);
}

.btn-sm:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary-light);
}

.btn-sm.danger:hover {
    border-color: var(--accent-rose);
    color: var(--accent-rose);
}

/* Admin Login */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-login-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(20px);
    text-align: center;
}

.admin-login-card h2 {
    font-family: 'Outfit', sans-serif;
    margin-bottom: 2rem;
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.saving-animation {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .landing-logo {
        font-size: 2.5rem;
    }

    .landing-tagline {
        font-size: 1.1rem;
    }

    .landing-features {
        grid-template-columns: 1fr;
    }

    .step-card {
        padding: 1.5rem;
    }

    .step-title {
        font-size: 1.3rem;
    }

    .step-nav {
        flex-direction: column;
    }

    .btn-next {
        margin-left: 0;
        justify-content: center;
    }

    .btn-prev {
        justify-content: center;
    }

    .radio-group {
        flex-direction: column;
    }

    .summary-actions {
        flex-direction: column;
    }

    .admin-stats {
        flex-direction: column;
    }

    .admin-header {
        flex-direction: column;
        gap: 1rem;
    }

    .submission-table {
        font-size: 0.85rem;
    }

    .submission-table th,
    .submission-table td {
        padding: 0.7rem;
    }
}

@media (max-width: 480px) {
    .form-app {
        padding: 0.75rem;
    }

    .step-card {
        padding: 1.25rem;
        border-radius: var(--radius-lg);
    }

    body::before,
    body::after {
        display: none;
    }
}
