/* ================================================================
   ALIEN STYLE 51 — Sistema editorial minimalista (tema claro)
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root, :root[data-theme="light"] {
    /* Superficies (light) */
    --bg: #fbfaf7;
    --surface: #ffffff;
    --surface-2: #f5f2ec;
    --surface-3: #ede9e0;

    /* Tinta y texto (light) */
    --ink: #131313;
    --ink-2: #3a3a37;
    --ink-3: #67665f;
    --muted: #8a8880;
    --white: #ffffff;

    /* Bordes (light) */
    --border: #e9e5dc;
    --border-strong: #cfc8b8;
    --border-hover: #a8a294;

    /* Acentos (light) */
    --accent: #131313;
    --accent-hover: #2a2a26;
    --brand: #0e6b7f;
    --brand-soft: #eaf4f6;
    --brand-hover: #085563;

    --rose: #b53a54;
    --rose-soft: #f7e6ea;
    --sage: #4a7c59;
    --sage-soft: #e8f0e9;
    --gold: #a17b2c;
    --gold-soft: #f6ecd8;

    --success: #3f6f4a;
    --warning: #a17b2c;
    --error: #a63a3a;
    --error-soft: #f6e5e5;

    --loader-bg: var(--bg);
    --topnav-bg: rgba(251,250,247,0.88);
    --sidebar-bg: var(--surface);
    --stroke-strong: #1c1d1a;
    --stroke-soft: #8a8880;
    color-scheme: light;
}

/* ═══════════════ DARK THEME ═══════════════ */
:root[data-theme="dark"] {
    --bg: #0f0e0d;
    --surface: #1a1917;
    --surface-2: #22201d;
    --surface-3: #2c2925;

    --ink: #ededea;
    --ink-2: #c8c4bd;
    --ink-3: #9e9a92;
    --muted: #706c65;
    --white: #ffffff;

    --border: #2f2b26;
    --border-strong: #3d3831;
    --border-hover: #504a41;

    --accent: #ededea;
    --accent-hover: #ffffff;
    --brand: #4fbdd4;
    --brand-soft: rgba(79,189,212,0.10);
    --brand-hover: #7dd0e2;

    --rose: #e07689;
    --rose-soft: rgba(224,118,137,0.10);
    --sage: #7fb08d;
    --sage-soft: rgba(127,176,141,0.10);
    --gold: #d1a659;
    --gold-soft: rgba(209,166,89,0.10);

    --success: #7fb08d;
    --warning: #d1a659;
    --error: #e07689;
    --error-soft: rgba(224,118,137,0.10);

    --loader-bg: var(--bg);
    --topnav-bg: rgba(15,14,13,0.88);
    --sidebar-bg: #16151300;
    --stroke-strong: #ededea;
    --stroke-soft: #706c65;
    color-scheme: dark;
}

html {
    background: var(--bg);
    transition: background-color .35s cubic-bezier(0.22, 1, 0.36, 1);
}
body {
    transition: background-color .35s cubic-bezier(0.22, 1, 0.36, 1),
                color .35s cubic-bezier(0.22, 1, 0.36, 1);
}
.card, .stat-card, .table-wrapper, .studio-stage, .studio-controls,
.sidebar, .topnav, .form-control, .product-card, .btn, .badge, .chip {
    transition:
        background-color .3s cubic-bezier(0.22, 1, 0.36, 1),
        border-color .3s cubic-bezier(0.22, 1, 0.36, 1),
        color .3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Toggle sun/moon */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--ink-2);
    width: 38px; height: 38px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, transform .2s;
    position: relative;
    overflow: hidden;
}
.theme-toggle:hover { background: var(--surface-2); border-color: var(--border-hover); color: var(--ink); transform: scale(1.05); }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    transition: opacity .3s, transform .4s cubic-bezier(0.22, 1, 0.36, 1);
    font-size: .9rem;
}
:root[data-theme="light"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="light"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
:root[data-theme="dark"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
:root[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }

/* ═══════════════ PAGE LOADER (splash premium) ═══════════════ */
#page-loader {
    position: fixed; inset: 0; z-index: 99999;
    background: var(--loader-bg);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 1;
    transition: opacity .55s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: all;
    overflow: hidden;
}
#page-loader::before {
    content: '';
    position: absolute; inset: -20% -20% auto -20%;
    height: 80%;
    background: radial-gradient(ellipse at center top, var(--brand-soft) 0%, transparent 60%);
    opacity: .55;
    pointer-events: none;
    animation: loader-ambient 6s ease-in-out infinite alternate;
}
@keyframes loader-ambient {
    0%   { opacity: .35; transform: translateY(-20px) scale(1); }
    100% { opacity: .70; transform: translateY(0)    scale(1.08); }
}
#page-loader.done {
    opacity: 0;
    pointer-events: none;
}

#page-loader .loader-inner {
    display: flex; flex-direction: column; align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
    animation: loader-fade-in .6s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes loader-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

#page-loader .loader-logo-wrap {
    position: relative;
    padding: 8px;
}
#page-loader .loader-logo-wrap::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: 30%;
    background: conic-gradient(from 0deg, transparent 0deg, var(--brand) 90deg, transparent 180deg, var(--brand) 270deg, transparent 360deg);
    animation: loader-ring 3s linear infinite;
    opacity: .35;
    filter: blur(6px);
}
@keyframes loader-ring {
    to { transform: rotate(360deg); }
}
#page-loader .loader-logo {
    width: 96px; height: 96px;
    border-radius: 26px;
    object-fit: cover;
    background: #ffffff;
    padding: 4px;
    box-shadow:
        0 24px 60px rgba(14,107,127,0.20),
        0 4px 12px rgba(0,0,0,0.08),
        0 0 0 1px rgba(255,255,255,0.06) inset;
    position: relative;
    z-index: 1;
    animation: loader-logo-breathe 2.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
:root[data-theme="dark"] #page-loader .loader-logo {
    box-shadow:
        0 24px 60px rgba(79,189,212,0.30),
        0 4px 12px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.10) inset;
}
@keyframes loader-logo-breathe {
    0%,100% { transform: scale(1) rotate(0); }
    50%     { transform: scale(1.04) rotate(-1deg); }
}

#page-loader .loader-wordmark {
    text-align: center;
    line-height: 1;
}
#page-loader .loader-wordmark .brand-line {
    font-family: 'Fraunces', serif;
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.025em;
    display: block;
}
#page-loader .loader-wordmark .brand-line em {
    font-style: italic;
    color: var(--brand);
    font-weight: 400;
}
#page-loader .loader-wordmark .brand-tag {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--muted);
    margin-top: .7rem;
    font-weight: 500;
}

#page-loader .loader-dots {
    display: flex; gap: .5rem;
    align-items: center;
    margin-top: .25rem;
}
#page-loader .loader-dots span {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--brand);
    animation: loader-dot 1.35s cubic-bezier(0.4, 0, 0.6, 1) infinite both;
}
#page-loader .loader-dots span:nth-child(1) { animation-delay: 0s; }
#page-loader .loader-dots span:nth-child(2) { animation-delay: .18s; }
#page-loader .loader-dots span:nth-child(3) { animation-delay: .36s; }
@keyframes loader-dot {
    0%, 65%, 100% { transform: translateY(0);    opacity: .28; }
    30%           { transform: translateY(-6px); opacity: 1; }
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
@media (prefers-reduced-motion: reduce) {
    #page-loader .loader-logo,
    #page-loader .loader-dots span,
    #page-loader::before,
    #page-loader .loader-logo-wrap::before { animation: none; }
}

    /* Retrocompatibilidad de tokens antiguos (mapean al tema claro) */
    --dark: var(--bg);
    --dark2: var(--surface);
    --dark3: var(--surface-2);
    --card: var(--surface);
    --card2: var(--surface-2);
    --text: var(--ink);
    --text-dim: var(--ink-3);
    --text-soft: var(--muted);
    --cyan: var(--brand);
    --cyan2: var(--brand-hover);
    --cyan-glow: rgba(14,107,127,0.15);
    --green: var(--sage);
    --purple: var(--brand);
    --pink: var(--rose);
    --orange: var(--gold);

    /* Sombras editoriales suaves */
    --shadow-xs: 0 1px 2px rgba(19,19,19,0.04);
    --shadow-sm: 0 2px 6px rgba(19,19,19,0.06);
    --shadow-md: 0 8px 24px rgba(19,19,19,0.07);
    --shadow-lg: 0 24px 64px rgba(19,19,19,0.10);

    /* Radios */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'ss01','cv11';
    letter-spacing: -0.011em;
    line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--ink); color: var(--surface); }

/* ── Tipografía editorial ── */
h1, h2, h3, h4, .font-display,
.section-title, .page-title, .hero-title, .auth-form h1, .auth-hero h2 {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-optical-sizing: auto;
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
    letter-spacing: -0.028em;
    line-height: 1.05;
    color: var(--ink);
    font-weight: 500;
}
h1 { font-weight: 500; }
h2 { font-weight: 500; }
.font-editorial,
.stat-card .value, .hero-stat-num, .pc-price,
.step-num, .grand-value {
    font-family: 'Fraunces', Georgia, serif;
    font-optical-sizing: auto;
    font-variation-settings: 'opsz' 144;
    letter-spacing: -0.02em;
    font-weight: 500;
}
code, .font-mono {
    font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
    letter-spacing: 0;
    font-size: .88em;
}

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: .68rem;
    color: var(--muted);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

/* ── Reveal (animaciones scroll) ── */
.reveal, .reveal-up, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 0;
    transition:
        opacity .95s cubic-bezier(0.22, 1, 0.36, 1),
        transform .95s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
    transition-delay: var(--reveal-delay, 0s);
}
.reveal, .reveal-up { transform: translateY(24px); }
.reveal-left      { transform: translateX(-32px); }
.reveal-right     { transform: translateX(32px); }
.reveal-scale     { transform: scale(0.96); }
.reveal-in { opacity: 1 !important; transform: translate(0,0) scale(1) !important; }
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-up, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1; transform: none; transition: none;
    }
}

/* ── NAVBAR editorial ── */
.topnav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: var(--topnav-bg);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 max(1.5rem, 5%);
    height: 72px;
}
.topnav-logo {
    display: inline-flex; align-items: center; gap: .8rem;
    text-decoration: none;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500; font-size: 1.15rem;
    color: var(--ink); letter-spacing: -0.03em;
}
.topnav-logo .brand-mark {
    width: 40px; height: 40px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform .3s cubic-bezier(0.22,1,0.36,1);
}
.topnav-logo:hover .brand-mark { transform: rotate(-4deg) scale(1.04); }
.topnav-logo .brand-text {
    font-family: 'Fraunces', serif;
    font-size: 1.05rem;
    font-weight: 500;
}
.topnav-logo .brand-text span { font-style: italic; color: var(--ink-3); font-weight: 400; }
@media (max-width: 640px) { .topnav-logo .brand-text { display: none; } }

.topnav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.topnav-links a {
    color: var(--ink-2); font-size: .92rem; font-weight: 400;
    transition: color .2s;
    position: relative;
}
.topnav-links a:hover { color: var(--ink); }
.topnav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
    height: 1px; background: currentColor; transform: scaleX(0);
    transform-origin: left; transition: transform .3s cubic-bezier(0.22,1,0.36,1);
}
.topnav-links a:not(.topnav-cta):hover::after { transform: scaleX(1); }
.topnav-cta {
    background: var(--ink);
    color: var(--surface) !important;
    padding: .55rem 1.3rem;
    border-radius: 999px;
    font-weight: 500 !important;
    transition: background .2s, transform .2s;
    display: inline-flex; align-items: center; gap: .45rem;
}
.topnav-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }
.topnav-cta::after { display: none !important; }

.topnav-user {
    display: flex; align-items: center; gap: .6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: .3rem .9rem .3rem .35rem;
    border-radius: 999px;
    transition: border-color .2s;
}
.topnav-user:hover { border-color: var(--border-hover); }
.topnav-user .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--ink);
    color: var(--surface);
    display: flex; align-items: center; justify-content: center;
    font-weight: 500; font-size: .82rem;
    font-family: 'Fraunces', serif;
}
.topnav-user-name { font-size: .84rem; font-weight: 500; color: var(--ink); }

/* ── LAYOUT paneles ── */
.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    padding-top: 72px;
}
.sidebar {
    position: fixed;
    top: 72px; left: 0; bottom: 0;
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
    overflow-y: auto;
    z-index: 90;
}
.sidebar-section {
    font-size: .66rem; color: var(--muted);
    letter-spacing: 2.5px; text-transform: uppercase;
    padding: 0 .9rem; margin-bottom: .7rem; margin-top: 1.8rem;
    font-weight: 500;
}
.sidebar-section:first-child { margin-top: 0; }
.sidebar a {
    display: flex; align-items: center; gap: .8rem;
    padding: .65rem .9rem;
    color: var(--ink-2);
    border-radius: var(--radius-sm);
    transition: background .18s, color .18s;
    font-size: .9rem;
    margin-bottom: .18rem;
}
.sidebar a i { width: 18px; font-size: .95rem; text-align: center; color: var(--ink-3); transition: color .18s; }
.sidebar a:hover { background: var(--surface-2); color: var(--ink); }
.sidebar a:hover i { color: var(--ink); }
.sidebar a.active {
    background: var(--ink);
    color: var(--surface);
    font-weight: 500;
}
.sidebar a.active i { color: var(--surface); }

.main {
    grid-column: 2;
    padding: 3rem 3rem 4rem;
    min-width: 0;
}
.page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 3rem; flex-wrap: wrap; gap: 1.5rem;
}
.page-title {
    font-family: 'Fraunces', serif;
    font-size: 2.4rem; font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.03em;
    line-height: 1.05;
}
.page-subtitle { color: var(--ink-3); font-size: .95rem; margin-top: .5rem; max-width: 60ch; }

/* ── Cards ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    transition: border-color .25s, box-shadow .25s;
    box-shadow: var(--shadow-xs);
}
.card:hover { border-color: var(--border-hover); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    position: relative; overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: border-color .25s, transform .25s;
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.stat-card .label {
    font-size: .7rem; color: var(--muted);
    letter-spacing: 2px; text-transform: uppercase;
    font-weight: 500;
}
.stat-card .value {
    font-size: 2.4rem;
    color: var(--ink);
    margin: .6rem 0 .2rem;
    letter-spacing: -0.03em;
}
.stat-card .value small { font-size: .95rem; color: var(--muted); font-weight: 400; margin-right: .15rem; }
.stat-card .desc { font-size: .8rem; color: var(--ink-3); }
.stat-card .icon {
    position: absolute; top: 1.4rem; right: 1.4rem;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--ink-2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .55rem;
    padding: .75rem 1.5rem;
    border-radius: 999px;
    font-size: .9rem; font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, background .18s, border-color .18s;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.005em;
}
.btn-primary {
    background: var(--ink);
    color: var(--surface);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
    background: transparent;
    color: var(--ink);
    border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--ink); background: var(--surface); }
.btn-ghost {
    background: var(--surface-2);
    color: var(--ink-2);
    border-color: transparent;
}
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn-danger {
    background: var(--error-soft);
    color: var(--error);
    border-color: transparent;
}
.btn-danger:hover { background: #f2d5d5; }
.btn-brand {
    background: var(--brand);
    color: var(--white);
}
.btn-brand:hover { background: var(--brand-hover); }
.btn-sm { padding: .5rem 1.05rem; font-size: .82rem; }
.btn-block { width: 100%; }

/* ── Forms ── */
.form-group { margin-bottom: 1.3rem; }
.form-group label {
    display: block; font-size: .78rem; font-weight: 500;
    color: var(--ink-2); letter-spacing: 0.2px;
    margin-bottom: .5rem;
}
.form-control {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--ink);
    padding: .78rem 1rem;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: .93rem;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.form-control:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 4px rgba(19,19,19,0.06);
}
.form-control::placeholder { color: var(--muted); }
textarea.form-control { resize: vertical; min-height: 110px; }
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23131313' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
select.form-control option { background: var(--surface); color: var(--ink); }
.form-row {
    display: grid; gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.form-help { font-size: .78rem; color: var(--muted); margin-top: .4rem; }

/* ── Alerts ── */
.alert {
    padding: .95rem 1.3rem; border-radius: var(--radius-sm);
    margin-bottom: 1.4rem; font-size: .9rem;
    display: flex; align-items: center; gap: .7rem;
    border: 1px solid;
}
.alert-success { background: var(--sage-soft); border-color: #cfe0d3; color: var(--sage); }
.alert-error   { background: var(--error-soft); border-color: #ecc9c9; color: var(--error); }
.alert-info    { background: var(--brand-soft); border-color: #cfe4e7; color: var(--brand); }

/* ── Tablas ── */
.table-wrapper {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}
.table { width: 100%; border-collapse: collapse; }
.table th {
    text-align: left;
    padding: 1rem 1.3rem;
    font-size: .68rem; font-weight: 500;
    color: var(--muted); letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}
.table td {
    padding: 1.2rem 1.3rem;
    font-size: .92rem; color: var(--ink);
    border-bottom: 1px solid var(--border);
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .18s; }
.table tbody tr:hover { background: var(--surface-2); }
.table-empty {
    padding: 4rem 1rem; text-align: center; color: var(--ink-3);
}
.table-empty i { font-size: 2.4rem; color: var(--muted); margin-bottom: 1.2rem; display: block; opacity: .5; }

/* ── Badges ── */
.badge {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    font-size: .74rem; font-weight: 500;
    letter-spacing: 0.4px;
    font-family: 'Inter', sans-serif;
}
.badge::before {
    content: ''; width: 6px; height: 6px;
    border-radius: 50%; background: currentColor;
}

/* ── AUTH pages ── */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 5fr 6fr;
    background: var(--bg);
}
.auth-side {
    background: var(--surface-2);
    padding: 3.5rem 3rem;
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative; overflow: hidden;
    border-right: 1px solid var(--border);
}
.auth-side::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(14,107,127,0.06) 0%, transparent 60%);
    pointer-events: none;
}
.auth-brand {
    display: inline-flex; align-items: center; gap: .8rem;
    font-family: 'Fraunces', serif;
    font-size: 1.3rem; font-weight: 500;
    color: var(--ink); letter-spacing: -0.03em;
    text-decoration: none; z-index: 1;
}
.auth-brand img {
    width: 44px; height: 44px; border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.auth-brand span { color: var(--ink-3); font-style: italic; font-weight: 400; }

.auth-mascot {
    width: 100%; max-width: 320px;
    margin: 2rem auto; z-index: 1; align-self: center;
}
.auth-mascot img {
    width: 100%;
    border-radius: var(--radius-lg);
    background: var(--white);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    animation: float-mascot 6s ease-in-out infinite;
}
@keyframes float-mascot { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.auth-hero { z-index: 1; }
.auth-hero h2 {
    font-family: 'Fraunces', serif;
    font-size: 2.4rem; font-weight: 400;
    color: var(--ink);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.3rem;
}
.auth-hero h2 .grad {
    font-style: italic;
    color: var(--brand);
    font-weight: 400;
}
.auth-hero p {
    color: var(--ink-3);
    font-size: .98rem;
    line-height: 1.65;
    max-width: 42ch;
}
.auth-features { list-style: none; margin-top: 2rem; z-index: 1; }
.auth-features li {
    display: flex; align-items: center; gap: .8rem;
    padding: .5rem 0;
    color: var(--ink-2); font-size: .9rem;
}
.auth-features li i { color: var(--brand); font-size: .95rem; width: 18px; }

.auth-form-wrap {
    display: flex; align-items: center; justify-content: center;
    padding: 3.5rem 3rem;
    background: var(--surface);
}
.auth-form { width: 100%; max-width: 400px; }
.auth-form h1 {
    font-family: 'Fraunces', serif;
    font-size: 2rem; font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.03em;
    margin-bottom: .6rem;
    line-height: 1.05;
}
.auth-form > p { color: var(--ink-3); font-size: .95rem; margin-bottom: 2.2rem; }
.auth-form .form-foot { text-align: center; margin-top: 1.5rem; font-size: .9rem; color: var(--ink-3); }
.auth-form .form-foot a { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ── Mockup Studio ── */
.studio-wrap {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.5rem;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
}
.studio-wrap > * { min-width: 0; }
.studio-stage {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}
.studio-canvas {
    position: relative;
    aspect-ratio: 1;
    width: 100%;
    background:
        radial-gradient(ellipse 70% 50% at 50% 45%, rgba(19,19,19,0.05) 0%, transparent 70%),
        var(--surface-2);
    border-radius: var(--radius);
    overflow: hidden;
    user-select: none;
    touch-action: none;
}
.studio-canvas svg { display: block; width: 100%; height: 100%; }

/* Strokes del mockup se adaptan al tema (los SVGs vienen con #1c1d1a / #8a8880) */
:root[data-theme="dark"] .studio-canvas svg [stroke="#1c1d1a"] { stroke: var(--stroke-strong); }
:root[data-theme="dark"] .studio-canvas svg [stroke="#8a8880"] { stroke: var(--stroke-soft); }
:root[data-theme="dark"] .studio-canvas svg [fill="#ffffff"]:not(.product-body) { fill: var(--surface-2); }

/* Product card previews */
:root[data-theme="dark"] .product-card .pc-preview svg [stroke="#1c1d1a"] { stroke: var(--stroke-strong); }
:root[data-theme="dark"] .product-card .pc-preview svg [stroke="#8a8880"] { stroke: var(--stroke-soft); }

/* Empty hint dentro del print zone */
.studio-empty-hint {
    position: absolute;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: .35rem;
    border: 1.5px dashed rgba(19,19,19,0.28);
    border-radius: 10px;
    pointer-events: none;
    background: rgba(255,255,255,0.35);
    backdrop-filter: blur(2px);
    mix-blend-mode: multiply;
    transition: opacity .3s ease;
}
:root[data-theme="dark"] .studio-empty-hint {
    border-color: rgba(237,237,234,0.35);
    background: rgba(15,14,13,0.35);
    mix-blend-mode: screen;
}
.studio-empty-hint .hint-icon {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem; font-weight: 300;
    color: var(--ink-3);
    line-height: 1;
}
.studio-empty-hint .hint-text {
    font-family: 'Inter', sans-serif;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--ink-3);
    font-weight: 500;
}
.studio-canvas .design-layer {
    position: absolute;
    cursor: grab;
    transform-origin: center;
    transition: outline .15s;
    display: none;
}
.studio-canvas .design-layer.has-design { display: block; }
.studio-canvas .design-layer img { display: block; max-width: 100%; pointer-events: none; }
.studio-canvas .design-layer:hover,
.studio-canvas .design-layer.active {
    outline: 1px dashed var(--brand);
    outline-offset: 2px;
}
.studio-canvas.dragging .design-layer { cursor: grabbing; }
.studio-canvas .handle {
    position: absolute;
    width: 12px; height: 12px;
    background: var(--white);
    border: 1.5px solid var(--brand);
    border-radius: 50%;
    cursor: nwse-resize;
    z-index: 10;
    display: none;
    box-shadow: var(--shadow-sm);
}
.studio-canvas .design-layer.active + .handle { display: block; }

.studio-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: .8rem 1rem 0;
    margin-top: .8rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}
.studio-toolbar-btns { display: flex; gap: .35rem; }
.studio-toolbar-btns button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--ink-2);
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    transition: all .18s;
}
.studio-toolbar-btns button:hover { border-color: var(--ink); color: var(--ink); background: var(--surface-2); }
.studio-toolbar-view { font-size: .8rem; color: var(--muted); }

.studio-controls {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: var(--shadow-xs);
}
.studio-section { margin-bottom: 1.6rem; }
.studio-section:last-child { margin-bottom: 0; }
.studio-section-title {
    font-family: 'Inter', sans-serif;
    font-size: .68rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: .8rem;
    display: flex; justify-content: space-between; align-items: center;
}

/* Product tabs */
.product-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
}
.product-picker button {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink-2);
    padding: .8rem .4rem;
    border-radius: var(--radius-sm);
    display: flex; flex-direction: column; align-items: center; gap: .35rem;
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    transition: all .2s;
    cursor: pointer;
}
.product-picker button i { font-size: 1.05rem; color: var(--ink-3); }
.product-picker button:hover { border-color: var(--border-hover); color: var(--ink); }
.product-picker button.active {
    background: var(--ink);
    color: var(--surface);
    border-color: var(--ink);
}
.product-picker button.active i { color: var(--surface); }

/* Color chips */
.color-chips { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; }
.chip {
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    border: 2px solid var(--surface);
    outline: 1px solid var(--border);
    outline-offset: -1px;
    transition: transform .18s, outline-color .18s;
    position: relative;
}
.chip:hover { transform: scale(1.08); }
.chip.active {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* Sliders */
.slider-row {
    display: flex; align-items: center; gap: .8rem;
    margin-bottom: .8rem;
}
.slider-row label {
    font-size: .82rem; color: var(--ink-2); width: 80px;
    margin-bottom: 0;
}
.slider-row input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--surface-3);
    border-radius: 999px;
    outline: none;
}
.slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px; height: 16px;
    background: var(--ink);
    border: 2px solid var(--surface);
    box-shadow: var(--shadow-sm);
    border-radius: 50%;
    cursor: grab;
}
.slider-row input[type="range"]::-moz-range-thumb {
    width: 16px; height: 16px;
    background: var(--ink);
    border: 2px solid var(--surface);
    box-shadow: var(--shadow-sm);
    border-radius: 50%;
    cursor: grab;
    border: none;
}
.slider-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: .78rem;
    color: var(--ink-3);
    width: 44px; text-align: right;
    font-variant-numeric: tabular-nums;
}

/* File drop */
.file-drop {
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .22s, background .22s;
    background: var(--surface-2);
}
.file-drop:hover, .file-drop.drag {
    border-color: var(--ink);
    background: var(--surface);
}
.file-drop i { font-size: 1.5rem; color: var(--ink-3); margin-bottom: .6rem; display: block; }
.file-drop p { color: var(--ink-3); font-size: .88rem; line-height: 1.5; }
.file-drop p strong { color: var(--ink); font-weight: 500; }
.file-drop input[type="file"] { display: none; }
.file-preview { margin-top: .8rem; }
.file-preview img { max-width: 90px; border-radius: 8px; margin: 0 auto; border: 1px solid var(--border); }

/* ── LANDING ── */
.landing-hero {
    min-height: calc(100vh - 72px);
    padding: 120px max(2rem, 6%) 6rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-items: stretch;
    gap: 5rem;
    max-width: 1440px;
    margin: 0 auto;
    background: var(--bg);
    position: relative;
}
.landing-hero > * { min-width: 0; }
.hero-tag {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink-2); font-size: .78rem; font-weight: 500;
    letter-spacing: 0.5px;
    padding: .38rem 1rem; border-radius: 999px;
    margin-bottom: 1.8rem;
    box-shadow: var(--shadow-xs);
}
.hero-tag .live-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--sage);
    box-shadow: 0 0 0 3px rgba(74,124,89,0.15);
    animation: pulse-dot 1.8s infinite;
}
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.hero-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(2.6rem, 5.8vw, 4.5rem);
    font-weight: 500; line-height: 0.98;
    color: var(--ink);
    letter-spacing: -0.035em;
    margin-bottom: 1.5rem;
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.hero-title .grad {
    font-style: italic;
    color: var(--brand);
    font-weight: 400;
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

/* Count-up en hero stats */
.hero-stat-num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'ss01';
}
.hero-desc {
    font-size: 1.08rem; line-height: 1.7;
    color: var(--ink-3); margin-bottom: 2.5rem;
    max-width: 52ch;
}
.hero-btns { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.hero-stats {
    display: flex; gap: 3rem;
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.hero-stat-num {
    font-family: 'Fraunces', serif;
    font-size: 2rem; font-weight: 400;
    color: var(--ink); display: block;
    letter-spacing: -0.03em;
}
.hero-stat-lbl {
    font-size: .74rem; color: var(--muted);
    text-transform: uppercase; letter-spacing: 2px;
    margin-top: .3rem;
}

.section { padding: 7rem max(1.5rem, 5%); }
.section-header { max-width: 640px; margin: 0 auto 4rem; }
.section-header.centered { text-align: center; }
.section-tag {
    display: inline-block;
    color: var(--muted); font-size: .72rem; font-weight: 500;
    letter-spacing: 3px; text-transform: uppercase;
    margin-bottom: 1.1rem;
}
.section-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.9rem, 3.3vw, 2.8rem);
    font-weight: 400; color: var(--ink);
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    line-height: 1.05;
}
.section-sub { color: var(--ink-3); font-size: 1.02rem; line-height: 1.6; }

/* Products grid — 4 columnas fijas en desktop */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px; margin: 0 auto;
}
@media (max-width: 1024px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px)  { .products-grid { grid-template-columns: 1fr; } }

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.8rem 1.6rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: border-color .3s, transform .3s, box-shadow .3s;
    position: relative;
    box-shadow: var(--shadow-xs);
}
.product-card .btn { margin-top: auto; align-self: flex-start; }
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}
.product-card .pc-preview {
    width: 100%; aspect-ratio: 1;
    background: var(--surface-2);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-3);
    font-size: 3.5rem;
}
.product-card .pc-preview svg { max-width: 70%; max-height: 70%; }
.product-card .pc-name {
    font-family: 'Fraunces', serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin-bottom: .35rem;
}
.product-card .pc-desc {
    font-size: .88rem; color: var(--ink-3);
    line-height: 1.6; margin-bottom: 1.5rem;
    min-height: 42px;
}
.product-card .pc-price {
    font-family: 'Fraunces', serif;
    font-size: 1.15rem; font-weight: 500;
    color: var(--ink); margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.product-card .pc-price small { font-size: .78rem; color: var(--muted); font-weight: 400; margin-right: .2rem; }

/* Steps (proceso) */
.step-num {
    width: 44px; height: 44px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1rem;
    font-family: 'Fraunces', serif;
    font-size: 1.1rem; font-weight: 400;
    box-shadow: var(--shadow-xs);
}

/* Chart bars */
.bar-fill { border-radius: 4px; transition: width 1s cubic-bezier(0.22, 1, 0.36, 1); }

/* WhatsApp float */
.wa-float {
    position: fixed; bottom: 24px; right: 24px; z-index: 200;
    width: 54px; height: 54px;
    background: #25d366;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; color: #fff;
    box-shadow: 0 6px 18px rgba(37,211,102,0.35);
    transition: transform .22s, box-shadow .22s;
}
.wa-float:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 32px rgba(37,211,102,0.5); }

/* Footer */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 4rem max(1.5rem, 5%) 2rem;
}
.site-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    max-width: 1200px; margin: 0 auto;
}
.site-footer h4 {
    font-family: 'Fraunces', serif;
    color: var(--ink); font-size: 1rem; margin-bottom: 1rem;
    font-weight: 500; letter-spacing: -0.02em;
}
.site-footer ul { list-style: none; }
.site-footer li { padding: .28rem 0; }
.site-footer a { color: var(--ink-3); font-size: .9rem; transition: color .2s; }
.site-footer a:hover { color: var(--ink); }
.site-footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 3rem; padding-top: 1.8rem;
    text-align: center; color: var(--muted); font-size: .82rem;
    max-width: 1200px; margin-left: auto; margin-right: auto;
    font-family: 'Fraunces', serif;
    font-style: italic;
}

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .layout { grid-template-columns: 1fr; }
    .sidebar { transform: translateX(-100%); transition: transform .3s; }
    .sidebar.open { transform: translateX(0); }
    .main { grid-column: 1; padding: 1.5rem; }
    .topnav-links { display: none; }
    .studio-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .landing-hero { grid-template-columns: 1fr; text-align: left; padding-top: 100px; padding-bottom: 3rem; }
    .site-footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .stat-card .value { font-size: 2rem; }
    .product-picker { grid-template-columns: repeat(2, 1fr); }
}

/* Menu toggle (móvil) */
.menu-toggle { display: none; background: transparent; border: none; color: var(--ink); font-size: 1.3rem; }
@media (max-width: 900px) { .menu-toggle { display: block; } }
