/* ============================================================================
   SPURA HUB v3 — Auth Pages (Login, Forgot, Reset, Landing)
   Concepto: Split-panel · Dark left · Clean right · High-end corporate
   ============================================================================ */

/* ── Reset y base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-primary);
    color: var(--ink-950);
    min-height: 100vh;
}

/* ── Auth Shell — split layout ───────────────────────────────────────── */
.auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ── Panel izquierdo — oscuro, branding ──────────────────────────────── */
.auth-panel-brand {
    background: var(--ink-900);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
    overflow: hidden;
}

/* Orbes de luz decorativos */
.auth-panel-brand::before {
    content: '';
    position: absolute;
    top: -100px; left: -100px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(20, 184, 166, .12) 0%, transparent 70%);
    pointer-events: none;
}
.auth-panel-brand::after {
    content: '';
    position: absolute;
    bottom: -80px; right: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(15, 118, 110, .1) 0%, transparent 70%);
    pointer-events: none;
}

.auth-brand-top {
    position: relative;
    z-index: 1;
}
.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}
.auth-brand-logo img {
    height: 28px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: .9;
}
.auth-brand-logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .92);
    letter-spacing: -.01em;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
}
.auth-brand-tagline {
    font-size: clamp(1.75rem, 3vw, 2.375rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -.035em;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.auth-brand-tagline span {
    background: linear-gradient(135deg, var(--brand-300), var(--brand-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-brand-desc {
    font-size: .9375rem;
    color: rgba(255, 255, 255, .45);
    line-height: 1.6;
    max-width: 36ch;
    margin-bottom: 2.5rem;
}

/* Feature highlights */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: .875rem;
}
.auth-feature {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.auth-feature-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(20, 184, 166, .12);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.auth-feature-icon svg {
    width: 16px; height: 16px;
    fill: var(--brand-400);
}
.auth-feature-text {
    font-size: .875rem;
    color: rgba(255, 255, 255, .55);
    line-height: 1.4;
}
.auth-feature-text strong {
    color: rgba(255, 255, 255, .8);
    font-weight: 500;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
}
.auth-brand-footer p {
    font-size: .75rem;
    color: rgba(255, 255, 255, .2);
}

/* ── Panel derecho — formulario ──────────────────────────────────────── */
.auth-panel-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background: var(--bg-surface);
}
.auth-form-box {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    margin-bottom: 2rem;
}
.auth-form-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--ink-950);
    letter-spacing: -.025em;
    margin-bottom: .375rem;
}
.auth-form-subtitle {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Campos */
.auth-field {
    margin-bottom: 1rem;
}
.auth-label {
    display: block;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--ink-600);
    margin-bottom: .375rem;
    letter-spacing: -.005em;
}
.auth-input {
    display: block;
    width: 100%;
    padding: .625rem .875rem;
    font-size: .9375rem;
    font-family: inherit;
    color: var(--ink-950);
    background: var(--bg-surface);
    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.auth-input::placeholder { color: var(--text-muted); }
.auth-input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .12), var(--shadow-xs);
}

/* Checkbox remember */
.auth-checkbox-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
}
.auth-checkbox-row input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: var(--brand-500);
    cursor: pointer;
}
.auth-checkbox-row label {
    font-size: .875rem;
    color: var(--text-secondary);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

/* Submit button */
.auth-btn {
    display: block;
    width: 100%;
    padding: .6875rem 1rem;
    font-size: .9375rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: -.01em;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all .15s ease;
    text-align: center;
    text-decoration: none;
}
.auth-btn-primary {
    background: var(--ink-900);
    color: #fff;
    box-shadow: 0 1px 2px rgba(10, 22, 40, .2), inset 0 1px 0 rgba(255,255,255,.06);
}
.auth-btn-primary:hover { background: var(--ink-700); }

/* Links */
.auth-links {
    margin-top: 1.25rem;
    text-align: center;
}
.auth-links a {
    font-size: .875rem;
    color: var(--brand-600);
    text-decoration: none;
    transition: color .15s;
}
.auth-links a:hover { color: var(--brand-700); text-decoration: underline; }
.auth-links .divider {
    display: inline-block;
    color: var(--border-color-strong);
    margin: 0 .5rem;
}

/* Forgot password link */
.auth-forgot {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.25rem;
}
.auth-forgot a {
    font-size: .8125rem;
    color: var(--brand-600);
    text-decoration: none;
}
.auth-forgot a:hover { text-decoration: underline; }

/* Alerts */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    padding: .75rem .875rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: .875rem;
    border-left: 3px solid transparent;
}
.auth-alert-danger {
    background: var(--danger-50);
    border-color: var(--danger-500);
    color: var(--danger-600);
}
.auth-alert-success {
    background: var(--success-50);
    border-color: var(--success-500);
    color: var(--success-600);
}
.auth-alert-icon {
    flex-shrink: 0; margin-top: 1px;
    width: 16px; height: 16px;
}

/* Success state */
.auth-success-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--success-50);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
}
.auth-success-icon svg {
    width: 24px; height: 24px;
    stroke: var(--success-600);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: .8125rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* ── Versión mobile — single column ──────────────────────────────────── */
@media (max-width: 768px) {
    .auth-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    .auth-panel-brand {
        padding: 1.5rem 1.25rem;
        min-height: 0;
    }
    .auth-brand-content { padding: 1.25rem 0 0; display: none; }
    .auth-features      { display: none; }
    .auth-brand-footer  { display: none; }
    .auth-panel-form {
        padding: 2rem 1.25rem;
        align-items: flex-start;
    }
    .auth-brand-tagline { font-size: 1.5rem; }
}

/* ============================================================
   LANDING PAGE — estilos específicos
   ============================================================ */

.landing-shell {
    min-height: 100vh;
    background:
        radial-gradient(900px 450px at 10% 0%, rgba(20, 184, 166, .1) 0%, transparent 60%),
        radial-gradient(800px 400px at 92% 5%, rgba(15, 118, 110, .12) 0%, transparent 60%),
        var(--bg-primary);
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 2rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 40;
}
.landing-nav-logo {
    display: flex; align-items: center; gap: .625rem;
    text-decoration: none;
}
.landing-nav-logo img {
    height: 24px;
    width: auto;
}
.landing-nav-logo span {
    font-size: .9375rem;
    font-weight: 700;
    color: var(--ink-950);
    letter-spacing: -.01em;
}
.landing-nav-actions {
    display: flex; align-items: center; gap: .5rem;
}
.landing-btn-ghost {
    padding: .4375rem .875rem;
    font-size: .875rem; font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    border: none; background: none;
    cursor: pointer; text-decoration: none;
    transition: all .15s;
}
.landing-btn-ghost:hover { background: var(--bg-secondary); color: var(--ink-900); text-decoration: none; }
.landing-btn-solid {
    padding: .4375rem 1rem;
    font-size: .875rem; font-weight: 600;
    color: #fff; /* Texto blanco */
    background: #111827; /* Fondo oscuro fijo (reemplaza la variable que falla) */
    border: none; border-radius: var(--radius-md);
    cursor: pointer; text-decoration: none;
    transition: background .15s;
    box-shadow: 0 1px 2px rgba(10,22,40,.2);
}
.landing-btn-solid:hover { 
    background: #374151; /* Un gris un poco más claro para el hover */
    text-decoration: none; 
}

.landing-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero section */
.landing-hero {
    padding: 5rem 0 4rem;
    text-align: center;
}
.landing-hero-badge {
    display: inline-flex; align-items: center; gap: .375rem;
    padding: .3125rem .875rem;
    background: var(--brand-50);
    color: var(--brand-700);
    border: 1px solid var(--brand-100);
    border-radius: var(--radius-full);
    font-size: .75rem; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.landing-hero-badge svg { width: 12px; height: 12px; fill: currentColor; }
.landing-hero-title {
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
    font-weight: 800;
    color: var(--ink-950);
    letter-spacing: -.04em;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}
.landing-hero-title span {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.landing-hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 54ch;
    margin: 0 auto 2.25rem;
    line-height: 1.65;
}
.landing-hero-actions {
    display: flex; align-items: center; justify-content: center;
    gap: .75rem; flex-wrap: wrap;
}
.landing-hero-cta-primary {
    padding: .75rem 1.625rem;
    font-size: .9375rem; font-weight: 600;
    color: #fff; /* Texto blanco */
    background: #111827; /* Reemplazamos var(--ink-900) por un gris/azul muy oscuro */
    border: none; border-radius: var(--radius-md);
    cursor: pointer; text-decoration: none;
    box-shadow: 0 1px 3px rgba(10,22,40,.25), inset 0 1px 0 rgba(255,255,255,.06);
    transition: background .15s;
}
.landing-hero-cta-primary:hover { 
    background: #374151; /* Reemplazamos var(--ink-700) por un tono un poco más claro */
    text-decoration: none; 
}
.landing-hero-cta-secondary {
    padding: .75rem 1.625rem;
    font-size: .9375rem; font-weight: 500;
    color: var(--ink-900);
    background: var(--bg-surface);
    border: 1px solid var(--border-color-strong);
    border-radius: var(--radius-md);
    cursor: pointer; text-decoration: none;
    box-shadow: var(--shadow-xs);
    transition: all .15s;
}
.landing-hero-cta-secondary:hover { background: var(--bg-secondary); text-decoration: none; }

/* Modules grid */
.landing-section {
    padding: 3.5rem 0;
}
.landing-section-header {
    margin-bottom: 2.5rem;
}
.landing-section-label {
    font-size: .75rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--brand-600);
    margin-bottom: .5rem;
}
.landing-section-title {
    font-size: 1.75rem; font-weight: 700;
    color: var(--ink-950); letter-spacing: -.025em;
    margin-bottom: .5rem;
}
.landing-section-desc {
    font-size: .9375rem; color: var(--text-muted);
    max-width: 54ch; line-height: 1.6;
}

.landing-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.landing-module-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.375rem;
    box-shadow: var(--shadow-xs);
    display: flex; flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}
.landing-module-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.landing-module-card-meta {
    display: flex; gap: .375rem; flex-wrap: wrap;
    margin-bottom: .75rem;
}
.landing-module-badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px;
    font-size: .6875rem; font-weight: 600;
    border-radius: var(--radius-full);
    letter-spacing: .01em;
}
.landing-module-badge-public   { background: var(--brand-50);   color: var(--brand-700); }
.landing-module-badge-client   { background: var(--info-50);    color: var(--info-600); }
.landing-module-badge-internal { background: var(--ink-50);     color: var(--ink-400); }
.landing-module-badge-ok       { background: var(--success-50); color: var(--success-600); }

.landing-module-icon {
    width: 38px; height: 38px;
    border-radius: var(--radius-md);
    background: var(--ink-50);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: .875rem;
    flex-shrink: 0;
}
.landing-module-icon svg {
    width: 18px; height: 18px;
    stroke: var(--ink-600);
    fill: none; stroke-width: 1.75;
    stroke-linecap: round; stroke-linejoin: round;
}
.landing-module-card.is-public .landing-module-icon {
    background: var(--brand-50);
}
.landing-module-card.is-public .landing-module-icon svg {
    stroke: var(--brand-600);
}

.landing-module-title {
    font-size: 1rem; font-weight: 600;
    color: var(--ink-950); letter-spacing: -.01em;
    margin-bottom: .3125rem;
}
.landing-module-desc {
    font-size: .875rem; color: var(--text-muted);
    line-height: 1.55; margin-bottom: .875rem;
    flex: 1;
}
.landing-module-bullets {
    list-style: none;
    margin-bottom: 1rem;
    display: flex; flex-direction: column; gap: .3rem;
}
.landing-module-bullets li {
    font-size: .8125rem; color: var(--text-secondary);
    display: flex; align-items: center; gap: .5rem;
}
.landing-module-bullets li::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--border-color-strong);
    flex-shrink: 0;
}
.landing-module-card.is-public .landing-module-bullets li::before {
    background: var(--brand-400);
}
.landing-module-action {
    display: inline-flex; align-items: center; gap: .375rem;
    padding: .4375rem .875rem;
    font-size: .8125rem; font-weight: 500;
    border-radius: var(--radius-sm);
    text-decoration: none; transition: all .15s;
    border: 1px solid var(--border-color-strong);
    background: var(--bg-surface); color: var(--ink-900);
    box-shadow: var(--shadow-xs);
    align-self: flex-start;
}
.landing-module-action:hover { background: var(--bg-secondary); text-decoration: none; }
.landing-module-action svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.landing-module-card.is-public .landing-module-action {
    background: var(--brand-500);
    color: #fff; border-color: var(--brand-600);
    box-shadow: 0 1px 3px rgba(13,148,136,.25);
}
.landing-module-card.is-public .landing-module-action:hover {
    background: var(--brand-600);
}

/* Footer landing */
.landing-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.75rem 0;
    text-align: center;
}
.landing-footer p {
    font-size: .8125rem;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .landing-hero { padding: 3rem 0 2.5rem; }
    .landing-hero-actions { flex-direction: column; }
    .landing-hero-cta-primary,
    .landing-hero-cta-secondary { width: 100%; text-align: center; }
    .landing-modules-grid { grid-template-columns: 1fr; }
    .landing-nav { padding: .875rem 1rem; }
}
