:root {
    /* === Sesion 33: Brand navy (paleta lirotweb.com) ===
       Equivalencias con vars de lirotweb:
       --tg-theme-primary       = #012977
       --tg-color-blue-black    = #071038
       --tg-heading-color       = #0A165E
       --tg-color-blue-light-10 = #a8d4ff
       --tg-color-yellow-light  = #FFBA25
       --tg-color-blue-light-6  = #c00000
       --tg-color-blue-light-7  = #00b52e
       --tg-color-blue-light-2  = #3a71ff
       Aplica a TODO el frontend (hero, modal, live dashboard, resultado).
    */
    --seo-primary: #012977;
    --seo-primary-dark: #071038;
    --seo-primary-darker: #0A165E;
    --seo-primary-darkest: #050a26;
    --seo-primary-soft: #a8d4ff;
    --seo-bg: #f7f9fc;
    --seo-border: #e3e7ee;
    --seo-text: #2a3548;
    --seo-muted: #8492a6;
    --seo-success: #00b52e;
    --seo-error: #c00000;
    --seo-warning: #FFBA25;
    --seo-info: #3a71ff;
    --seo-on-primary: #ffffff;
    --seo-on-primary-muted: rgba(255, 255, 255, 0.92);
    --seo-on-primary-dim: rgba(255, 255, 255, 0.7);
    --seo-on-primary-overlay: rgba(255, 255, 255, 0.15);
    --seo-on-primary-overlay-soft: rgba(255, 255, 255, 0.12);
    --seo-on-primary-border: rgba(255, 255, 255, 0.3);
    --seo-on-primary-bg-code: rgba(0, 0, 0, 0.25);
    --seo-sidebar-width: 320px;
    --seo-radius: 12px;
    --seo-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    --seo-shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
    --seo-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --seo-font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--seo-font-sans);
    background: var(--seo-bg);
    color: var(--seo-text);
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============ Tipografia base ============ */
body { font-weight: 400; }

h1, h2, h3, h4, h5, h6,
.seo-title, .seo-subtitle, .seo-result-title, .seo-changelog h2,
.seo-hero-title, .seo-hero-subtitle, .seo-result-section-title {
    font-family: var(--seo-font-sans);
}

h1, .seo-title, .seo-hero-title, .seo-result-title {
    font-weight: 800;
    letter-spacing: -0.02em;
}

h2, .seo-subtitle, .seo-changelog h2, .seo-result-section-title {
    font-weight: 600;
    letter-spacing: -0.01em;
}

h3, .seo-modal-header h2, .ld-title { font-weight: 700; letter-spacing: -0.01em; }
h4 { font-weight: 600; letter-spacing: -0.005em; }

.btn, button, .seo-btn-start, .seo-btn-action, .seo-btn-config,
.ld-btn, .seo-hero-btn, .swal2-confirm, .swal2-cancel {
    font-family: var(--seo-font-sans);
    font-weight: 600;
    letter-spacing: 0.01em;
}

label, .seo-label,
.seo-field > label,
.seo-modal-field label,
.seo-result-label,
.seo-score-label,
.seo-score-suffix,
.seo-stat-label,
.seo-hero-brand {
    font-family: var(--seo-font-sans);
    font-weight: 500;
    letter-spacing: 0.02em;
}

p, span, li, td, th, div, small {
    font-family: var(--seo-font-sans);
}

.seo-url, code, pre,
.url-text, .filename,
.seo-result-error-msg,
.ld-current-urls li,
.seo-speed-filename,
.seo-detail-card-title-mono,
.seo-modal-field textarea.form-control {
    font-family: var(--seo-font-mono);
    font-weight: 400;
    font-size: 13px;
    letter-spacing: -0.01em;
}

.seo-table td,
.seo-metric-number,
.seo-score-num,
.seo-stat-num,
.seo-section-stat-num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
}

.seo-app { min-height: 100vh; }

/* ============ Topbar móvil ============ */
.seo-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid var(--seo-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.seo-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--seo-primary);
    font-size: 18px;
    font-weight: 500;
}

.seo-brand img { height: 28px; width: auto; }
.seo-brand strong { font-weight: 800; }

.seo-burger {
    background: none;
    border: 0;
    font-size: 24px;
    cursor: pointer;
    color: var(--seo-text);
    padding: 4px 10px;
    line-height: 1;
}

.seo-burger:hover { color: var(--seo-primary); }

.seo-wrapper { display: flex; min-height: 100vh; }

/* ============ Sidebar ============ */
.seo-sidebar {
    width: var(--seo-sidebar-width);
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid var(--seo-border);
    padding: 22px 16px;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}

.seo-sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--seo-primary);
    font-size: 14px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--seo-border);
}

.seo-gear { font-size: 18px; }

.seo-config-form { display: flex; flex-direction: column; }

.seo-field { margin-bottom: 16px; }

.seo-field > label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--seo-text);
    margin-bottom: 6px;
    line-height: 1.4;
}

.seo-field .form-control {
    font-size: 13px;
    padding: 7px 10px;
    border: 1px solid var(--seo-border);
    border-radius: 6px;
    width: 100%;
    background: #fff;
    color: var(--seo-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.seo-field .form-control:focus {
    outline: none;
    border-color: var(--seo-primary);
    box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.15);
}

.seo-field textarea.form-control { resize: vertical; min-height: 64px; }

/* ============ Toggle switch ============ */
.seo-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.seo-switch > label:first-child {
    flex: 1;
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.4;
}

.seo-toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
}

.seo-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.seo-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccd5e0;
    border-radius: 22px;
    transition: background-color 0.2s;
}

.seo-slider::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.seo-toggle input:checked + .seo-slider { background-color: var(--seo-primary); }
.seo-toggle input:checked + .seo-slider::before { transform: translateX(16px); }
.seo-toggle input:focus + .seo-slider { box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.2); }

/* ============ Contenido principal ============ */
.seo-content {
    flex: 1;
    padding: 40px 30px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.seo-card {
    background: #fff;
    border-radius: var(--seo-radius);
    box-shadow: var(--seo-shadow);
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
}

.seo-title {
    color: var(--seo-primary);
    font-size: 42px;
    margin: 0 0 10px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.seo-subtitle {
    color: var(--seo-text);
    font-size: 18px;
    margin: 0 0 30px;
    font-weight: 400;
}

.seo-url-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.seo-input-group { position: relative; }

.seo-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--seo-muted);
    font-size: 16px;
    pointer-events: none;
}

.seo-input-group .form-control {
    padding-left: 44px;
    height: 48px;
    border-radius: 24px;
    border: 1px solid var(--seo-border);
    font-size: 14px;
    background: #fff;
    color: var(--seo-text);
}

.seo-input-group .form-control:focus {
    border-color: var(--seo-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}

.seo-input-group .form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.seo-btn-start {
    background: var(--seo-primary);
    border: 0;
    padding: 12px 30px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    align-self: center;
    transition: background-color 0.15s, transform 0.05s;
    min-width: 180px;
}

.seo-btn-start:hover:not(:disabled) {
    background: var(--seo-primary-dark);
    color: #fff;
}

.seo-btn-start:active:not(:disabled) { transform: translateY(1px); }

.seo-btn-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============ Progreso ============ */
.seo-progress { margin-top: 30px; }

.seo-progress-bar {
    height: 14px;
    background: #e3e7ee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.seo-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--seo-primary) 0%, var(--seo-primary-dark) 100%);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

.seo-progress-fill.is-active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: seo-progress-shimmer 1.5s infinite;
}

@keyframes seo-progress-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.seo-progress-text {
    margin: 12px 0;
    color: var(--seo-muted);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.seo-progress-pulse {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--seo-primary);
    border-radius: 50%;
    animation: seo-pulse 1s infinite;
}

@keyframes seo-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.7); }
}
}

/* ============ Historial de Cambios ============ */
.seo-changelog {
    background: #fff;
    border-radius: var(--seo-radius);
    padding: 30px;
    box-shadow: var(--seo-shadow);
}

.seo-changelog h2 {
    color: var(--seo-primary);
    font-size: 22px;
    margin: 0 0 20px;
    font-weight: 700;
}

.seo-changelog ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.seo-changelog li {
    padding: 10px 0;
    border-bottom: 1px solid var(--seo-border);
    color: var(--seo-text);
    font-size: 14px;
    line-height: 1.5;
}

.seo-changelog li:last-child { border-bottom: 0; }

.seo-changelog strong {
    color: var(--seo-primary-dark);
    margin-right: 8px;
    font-weight: 700;
}

/* ============ Overlay móvil ============ */
.seo-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 50;
}

.seo-overlay.show { display: block; }

/* ============ Vista Resultado ============ */
.seo-content-wide { max-width: 1100px; }

.seo-result-header { margin-bottom: 28px; }
.seo-result-title {
    color: var(--seo-primary);
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}
.seo-result-url {
    margin: 0 0 4px;
    color: var(--seo-text);
    font-size: 15px;
    word-break: break-all;
}
.seo-result-label {
    color: var(--seo-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 6px;
    font-weight: 600;
}
.seo-result-meta {
    margin: 0;
    color: var(--seo-muted);
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

/* Banners de estado */
.seo-result-banner {
    padding: 14px 18px;
    border-radius: var(--seo-radius);
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid transparent;
}
.seo-result-banner-warn {
    background: #fff8e1;
    border-color: #ffe082;
    color: #7a5b00;
}
.seo-result-banner-cancel {
    background: #f1f3f5;
    border-color: #dee2e6;
    color: #495057;
}
.seo-result-banner-error {
    background: #fdecea;
    border-color: #f5c2c7;
    color: #842029;
}
.seo-result-error-msg {
    margin-top: 6px;
    font-size: 13px;
    color: #6f1d1f;
    font-family: var(--seo-font-mono);
    word-break: break-word;
}

/* Score cards */
.seo-score-card {
    background: #fff;
    border-radius: var(--seo-radius);
    box-shadow: var(--seo-shadow);
    padding: 22px 16px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--seo-border);
    transition: transform 0.15s, box-shadow 0.15s;
}
.seo-score-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.seo-score-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--seo-muted);
    font-weight: 600;
    margin-bottom: 6px;
}
.seo-score-num {
    font-size: 44px;
    font-weight: 800;
    color: var(--seo-primary);
    line-height: 1.1;
    letter-spacing: -1px;
}
.seo-score-suffix {
    font-size: 12px;
    color: var(--seo-muted);
    margin-top: 4px;
    font-weight: 500;
}
.seo-score-card-global {
    background: linear-gradient(135deg, var(--seo-primary) 0%, var(--seo-primary-dark) 100%);
    border-color: var(--seo-primary-dark);
}
.seo-score-card-global .seo-score-label,
.seo-score-card-global .seo-score-suffix { color: rgba(255, 255, 255, 0.85); }
.seo-score-card-global .seo-score-num { color: #fff; }

/* Sección de métricas */
.seo-result-section { margin-bottom: 30px; }
.seo-result-section-title {
    color: var(--seo-text);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--seo-border);
}
.seo-stat {
    background: #fff;
    border-radius: var(--seo-radius);
    box-shadow: var(--seo-shadow-sm);
    padding: 18px 12px;
    text-align: center;
    height: 100%;
    border: 1px solid var(--seo-border);
}
.seo-stat-num {
    font-size: 26px;
    font-weight: 800;
    color: var(--seo-text);
    line-height: 1.1;
    margin-bottom: 6px;
    word-break: break-word;
}
.seo-stat-label {
    font-size: 12px;
    color: var(--seo-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.seo-stat-ok { color: #2e7d32; }
.seo-stat-err { color: #c62828; }
.seo-stat-state { font-size: 18px; text-transform: capitalize; }

/* Acciones */
.seo-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.seo-btn-action {
    padding: 12px 26px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s, transform 0.05s;
}
.seo-btn-action:active { transform: translateY(1px); }

.seo-result-login-hint {
    color: var(--seo-muted);
    font-size: 13px;
    margin: 0;
}
.seo-result-login-hint a {
    color: var(--seo-primary);
    font-weight: 600;
    text-decoration: none;
}
.seo-result-login-hint a:hover { text-decoration: underline; }

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .seo-topbar { display: flex; }

    .seo-sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        height: 100vh;
        z-index: 200;
        transition: left 0.3s ease;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
    }

    .seo-sidebar.open { left: 0; }

    .seo-content { padding: 20px 16px; }
    .seo-card { padding: 24px 16px; }
    .seo-title { font-size: 32px; }
    .seo-subtitle { font-size: 16px; }
    .seo-changelog { padding: 20px 16px; }

    .seo-result-title { font-size: 26px; }
    .seo-score-num { font-size: 36px; }
    .seo-score-card { padding: 18px 10px; }
    .seo-stat-num { font-size: 22px; }
    .seo-btn-action { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
    .seo-title { font-size: 28px; }
    .seo-input-group .form-control { height: 44px; font-size: 13px; }
    .seo-btn-start { padding: 11px 24px; font-size: 14px; min-width: 160px; }

    .seo-result-title { font-size: 22px; }
    .seo-score-num { font-size: 30px; }
}

/* ============ Live Crawl Dashboard (Sesion 29) ============ */
#live-dashboard {
    max-width: 1100px;
    margin: 24px auto;
    padding: 32px 24px;
    background: #fff;
    border-radius: var(--seo-radius);
    text-align: center;
}

.ld-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}
.ld-title {
    font-size: 24px;
    color: var(--seo-primary-dark);
    margin: 0;
    font-weight: 700;
}
.ld-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e3eaf3;
    border-top-color: var(--seo-primary);
    border-radius: 50%;
    animation: ld-spin 1s linear infinite;
}
.ld-spinner.ld-paused {
    animation-play-state: paused;
    opacity: 0.4;
}
@keyframes ld-spin {
    to { transform: rotate(360deg); }
}

.ld-current-urls {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.ld-current-urls li {
    font-size: 14px;
    word-break: break-all;
    max-width: 90%;
    font-family: var(--seo-font-mono);
}
.ld-current-urls .ld-url-current {
    color: var(--seo-text);
    font-weight: 700;
    font-size: 15px;
}
.ld-current-urls .ld-url-done {
    color: #9aa6b8;
}

.ld-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.ld-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f6f8fb;
    border: 1px solid #e3eaf3;
    border-radius: 8px;
    padding: 16px 20px;
    text-align: left;
    transition: transform 0.15s, box-shadow 0.15s;
}
.ld-stat:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.ld-stat .ld-icon {
    font-size: 28px;
    line-height: 1;
}
.ld-stat b {
    display: block;
    font-size: 28px;
    color: var(--seo-primary-dark);
    line-height: 1.1;
    font-weight: 800;
}
.ld-stat small {
    color: #5a6b85;
    font-size: 13px;
    display: block;
    margin-top: 2px;
}
.ld-stat-time {
    background: #22b573;
    border-color: #22b573;
}
.ld-stat-time b,
.ld-stat-time small,
.ld-stat-time .ld-icon {
    color: #fff;
}

.ld-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.ld-btn {
    padding: 8px 20px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.05s;
    min-width: 180px;
    flex: 0 0 180px;
    white-space: nowrap;
}
.ld-btn:active { transform: translateY(1px); }
.ld-btn:hover { opacity: 0.85; }
.ld-btn-pause {
    background: #b8d4f0;
    color: var(--seo-primary-dark);
}
.ld-btn-stop {
    background: var(--seo-primary-dark);
    color: #fff;
    border: 1px solid var(--seo-primary-dark);
}

.ld-detail {
    color: var(--seo-muted);
    font-size: 13px;
    margin: 12px 0 0;
    min-height: 18px;
}
.ld-detail.ld-detail-warn {
    color: #c62828;
    font-weight: 600;
}

/* Sesion 29: sidebar y topbar ocultos por completo mientras el
   dashboard esta activo. El flex de .seo-wrapper colapsa el espacio
   y el dashboard ocupa todo el ancho. */
body.seo-dashboard-active .seo-sidebar,
body.seo-dashboard-active .seo-topbar {
    display: none;
}

/* Responsive del dashboard */
@media (max-width: 768px) {
    #live-dashboard { padding: 20px 14px; }
    .ld-title { font-size: 20px; }
    .ld-current-urls li { font-size: 13px; }
    .ld-stat b { font-size: 24px; }
    .ld-stat small { font-size: 12px; }
    .ld-btn { width: 100%; min-width: 0; }
}

/* Sesion 29: Tema claro para SweetAlert2 usando variables del theme.
   Fondo blanco, texto oscuro del theme. Sin este override, los dialogs
   heredan el color oscuro del body y los textos aparecen en negro
   sobre el fondo blanco por defecto. */
.swal2-popup {
    background: var(--seo-card, #ffffff) !important;
    color: var(--seo-text) !important;
    border-radius: var(--seo-radius) !important;
    box-shadow: var(--seo-shadow) !important;
}
.swal2-title {
    color: var(--seo-primary-darker) !important;
    font-weight: 600 !important;
}
.swal2-html-container {
    color: var(--seo-text) !important;
    text-align: left !important;
}
.swal2-html-container ul {
    color: var(--seo-text) !important;
}
.swal2-html-container code,
.swal2-html-container small {
    color: var(--seo-muted) !important;
    background: var(--seo-bg) !important;
}
.swal2-input {
    background: var(--seo-card, #ffffff) !important;
    color: var(--seo-text) !important;
    border-color: var(--seo-border) !important;
}
.swal2-input:focus {
    border-color: var(--seo-primary) !important;
    box-shadow: 0 0 0 2px var(--seo-primary-soft) !important;
}
.swal2-icon.swal2-success {
    border-color: var(--seo-success) !important;
    color: var(--seo-success) !important;
}
.swal2-icon.swal2-error {
    border-color: var(--seo-error) !important;
    color: var(--seo-error) !important;
}
.swal2-icon.swal2-warning {
    border-color: var(--seo-warning) !important;
    color: var(--seo-warning) !important;
}
.swal2-icon.swal2-info {
    border-color: var(--seo-info) !important;
    color: var(--seo-info) !important;
}
.swal2-confirm {
    background: var(--seo-primary-darker) !important;
    color: var(--seo-on-primary) !important;
    font-weight: 600 !important;
}
.swal2-cancel {
    background: var(--seo-bg) !important;
    color: var(--seo-text) !important;
    font-weight: 500 !important;
}
.swal2-loader {
    border-color: var(--seo-primary-soft) !important;
    border-top-color: var(--seo-primary-darker) !important;
}
.swal2-styled:focus {
    box-shadow: 0 0 0 2px var(--seo-primary-soft) !important;
}

/* ============ Sesion 31: Boton Configuracion Avanzada ============ */
.seo-btn-config {
    background: transparent;
    border: 1px solid var(--seo-border);
    color: var(--seo-text);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.seo-btn-config:hover {
    background: var(--seo-primary-soft);
    border-color: var(--seo-primary);
    color: var(--seo-primary);
}

/* ============ Sesion 31: Modal de Configuracion Avanzada ============ */
.seo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.seo-modal-overlay.is-visible {
    display: block;
    opacity: 1;
}

.seo-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}
.seo-modal.is-visible {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.seo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--seo-border);
}
.seo-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--seo-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.seo-modal-close {
    background: none;
    border: 0;
    font-size: 24px;
    cursor: pointer;
    color: var(--seo-muted);
    padding: 4px 8px;
    border-radius: 4px;
}
.seo-modal-close:hover {
    background: var(--seo-bg);
    color: var(--seo-text);
}

.seo-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.seo-modal-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.seo-modal-field label {
    display: block;
    font-size: 12px;
    color: var(--seo-text);
    margin-bottom: 6px;
    font-weight: 500;
}
.seo-modal-field .form-control {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--seo-border);
    border-radius: 6px;
    font-size: 13px;
}
.seo-modal-field .form-control:focus {
    outline: none;
    border-color: var(--seo-primary);
}
.seo-modal-field textarea.form-control {
    resize: vertical;
    min-height: 50px;
    font-family: var(--seo-font-mono);
    font-size: 12px;
}

.seo-modal-field.seo-switch {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 50px;
}
.seo-modal-field.seo-switch > label:first-child {
    flex: 1;
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--seo-text);
    font-weight: 500;
    text-align: left;
}
.seo-modal-field.seo-switch .seo-toggle {
    flex-shrink: 0;
    align-self: center;
}

.seo-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--seo-border);
}

/* Responsive: Tablet 2 cols, Movil 1 col */
@media (max-width: 768px) {
    .seo-modal-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .seo-modal {
        width: 95%;
        max-height: 90vh;
    }
}
@media (max-width: 480px) {
    .seo-modal-row {
        grid-template-columns: 1fr;
    }
}

/* ============ Sesion 32: Portada Light Hero ============
   Fondo blanco + paleta lirotweb.com (navy + accents).
   Todos los textos en dark, boton principal en navy brand.
   ============================================================ */

/* Topbar flotante sobre el hero (fondo blanco solido) */
.seo-topbar-hero {
    background: #ffffff;
    border-bottom: 1px solid var(--seo-border);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}
.seo-brand-hero {
    color: var(--seo-primary);
}
.seo-brand-hero strong {
    color: var(--seo-primary);
}
.seo-burger-hero {
    color: var(--seo-text);
}
.seo-burger-hero:hover {
    color: var(--seo-primary);
}

/* Reset del wrapper y content para ocupar toda la pantalla */
.seo-wrapper-hero {
    display: block;
    min-height: 100vh;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}
.seo-content-hero {
    flex: none;
    max-width: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Hero full-vh centrado */
.seo-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px 80px;
    color: var(--seo-text);
    position: relative;
    z-index: 1;
}

/* Circulos decorativos (azul claro lirotweb muy tenue) */
.seo-hero-circle {
    display: none;
}
.seo-hero-circle-tl {
    width: 420px;
    height: 420px;
    top: -140px;
    left: -140px;
}
.seo-hero-circle-br {
    width: 520px;
    height: 520px;
    bottom: -180px;
    right: -180px;
}

/* Brand badge "BY LIROTWEB" — ahora logo lirotweb completo */
.seo-hero-brand {
    display: inline-flex;
    align-items: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 2;
}
.seo-hero-brand-img {
    height: 38px;
    width: auto;
    display: block;
}

/* Titulo "SEO Checker" */
.seo-hero-title {
    font-size: 84px;
    font-weight: 800;
    margin: 0 0 22px;
    letter-spacing: -2px;
    line-height: 1.05;
    position: relative;
    z-index: 2;
}
.seo-hero-title-light {
    color: var(--seo-primary-darkest);
}
.seo-hero-title-accent {
    color: var(--seo-primary);
}

/* Subtitulo */
.seo-hero-subtitle {
    color: var(--seo-muted);
    font-size: 22px;
    margin: 0 0 52px;
    font-weight: 400;
    max-width: 660px;
    position: relative;
    z-index: 2;
}

/* Form de busqueda (input + boton como una sola pieza estilo pill) */
.seo-hero-search {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 820px;
    margin: 0 0 28px;
    position: relative;
    z-index: 2;
    border-radius: 9999px;
    box-shadow: 0 4px 18px rgba(15, 35, 80, 0.08);
}
.seo-hero-input-wrap {
    flex: 1;
    position: relative;
}
.seo-hero-input-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--seo-muted);
    pointer-events: none;
    font-size: 18px;
}
.seo-hero-input {
    width: 100%;
    height: 70px;
    padding: 0 22px 0 58px;
    background: #ffffff;
    border: 1px solid var(--seo-border);
    border-right: 0;
    border-radius: 9999px 0 0 9999px;
    color: var(--seo-text);
    font-size: 17px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.seo-hero-input::placeholder {
    color: var(--seo-muted);
}
.seo-hero-input:focus {
    outline: none;
    border-color: var(--seo-primary);
    box-shadow: 0 0 0 3px rgba(1, 41, 119, 0.15);
}
.seo-hero-input.is-invalid {
    border-color: var(--seo-error);
}

/* Boton "Analizar URL gratis" — navy lirotweb (#012977) */
.seo-hero-btn {
    background: var(--seo-primary);
    color: #ffffff;
    border: 0;
    padding: 0 32px;
    height: 70px;
    border-radius: 0 9999px 9999px 0;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s, transform 0.05s;
    min-width: 230px;
    justify-content: center;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.seo-hero-btn:hover:not(:disabled) {
    background: var(--seo-primary-dark);
}
.seo-hero-btn:active:not(:disabled) {
    transform: translateY(1px);
}
.seo-hero-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.seo-hero-btn i {
    font-size: 14px;
    transition: transform 0.2s;
}
.seo-hero-btn:hover:not(:disabled) i {
    transform: translateX(3px);
}

/* Pills de features — estilo compacto, una sola fila */
.seo-hero-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 820px;
    margin: 0 0 36px;
    position: relative;
    z-index: 2;
}
.seo-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid var(--seo-border);
    border-radius: 9999px;
    color: var(--seo-text);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s, transform 0.05s;
    white-space: nowrap;
}
.seo-hero-pill:hover {
    border-color: var(--seo-primary);
    background: var(--seo-bg);
    transform: translateY(-1px);
}
.seo-hero-pill i {
    color: var(--seo-primary);
    font-size: 14px;
    flex-shrink: 0;
    transition: color 0.2s;
}
.seo-hero-pill:hover i {
    color: var(--seo-primary);
}

/* Variantes de color por tipo de feature (paleta lirotweb) */
.seo-hero-pill--seo i {
    color: var(--seo-primary);
}
.seo-hero-pill--seguridad i {
    color: #2563eb;
}
.seo-hero-pill--accesibilidad i {
    color: #0891b2;
}
.seo-hero-pill--velocidad i {
    color: #ea580c;
}
.seo-hero-pill--ai i {
    color: #7c3aed;
}
.seo-hero-pill--eeat i {
    color: #db2777;
}
.seo-hero-pill:hover i {
    color: var(--seo-primary);
}

/* Link "Configuracion avanzada" */
.seo-hero-advanced {
    color: var(--seo-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
    position: relative;
    z-index: 2;
}
.seo-hero-advanced:hover {
    color: var(--seo-primary);
}
.seo-hero-advanced i {
    font-size: 13px;
}

/* Ocultar el card blanco antiguo si quedara residual */
.seo-content-hero .seo-card {
    display: none;
}

/* Cuando el dashboard esta activo: ocultar el hero y lang bar */
body.seo-dashboard-active .seo-hero,
body.seo-dashboard-active .seo-lang-bar {
    display: none;
}

/* Responsive: tablet */
@media (max-width: 768px) {
    .seo-hero {
        padding: 50px 20px 60px;
    }
    .seo-hero-title {
        font-size: 50px;
    }
    .seo-hero-subtitle {
        font-size: 17px;
    }
    .seo-hero-search {
        flex-direction: column;
    }
    .seo-hero-btn {
        width: 100%;
        height: 56px;
    }
    .seo-hero-input {
        height: 56px;
    }
    .seo-hero-features {
        grid-template-columns: 1fr;
    }
    .seo-hero-pill {
        padding: 14px 18px;
    }
    .seo-topbar-hero {
        background: #ffffff;
        position: sticky;
    }
}

/* Responsive: movil */
@media (max-width: 480px) {
    .seo-hero {
        padding: 40px 16px 50px;
    }
    .seo-hero-title {
        font-size: 38px;
    }
    .seo-hero-subtitle {
        font-size: 15px;
        margin-bottom: 32px;
    }
    .seo-hero-brand {
        font-size: 11px;
        letter-spacing: 2px;
    }
    .seo-hero-search {
        margin-bottom: 28px;
    }
    .seo-hero-features {
        margin-bottom: 28px;
    }
}

/* ============ Cloudflare Turnstile widget debajo del input ============
   Wrapper centrado bajo el form de busqueda. El form tiene
   margin-bottom: 28px propio; el widget respeta ese gap y agrega
   28px abajo para mantener la separacion con las pills de features.
   NO se aplica box-shadow ni border-radius: el widget de CF trae
   su propio estilo nativo (data-theme=light).
   ======================================================================== */
.seo-hero-turnstile {
    width: 100%;
    max-width: 820px;
    margin: 0 auto 28px;
    text-align: center;
}

/* Sesion 45: selector de idioma en topbar */
.seo-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
}
.seo-topbar-lang {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.seo-lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background .15s ease, box-shadow .15s ease;
    text-decoration: none;
}
.seo-lang-flag-svg {
    width: 22px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 35, 80, .08);
    display: block;
}
.seo-lang-flag:hover {
    background: #f1f5f9;
}
.seo-lang-flag.is-active {
    background: #e3f2fd;
    box-shadow: inset 0 0 0 1px #b7d8ff;
}
.seo-lang-flag.is-active .seo-lang-flag-svg {
    box-shadow: 0 0 0 1px #1e88e5;
}
.seo-lang-sep {
    color: #cbd5e1;
    margin: 0 0.15rem;
}

/* Screen-reader only para texto accesible de las banderas */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.seo-hero-notice {
    margin: 0.75rem auto 1rem;
    max-width: 640px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    border: 1px solid #bcdcff;
    background: #eef6ff;
    color: #0b4f9c;
    font-size: 0.9rem;
    font-weight: 500;
}

/* === Selector de idioma centrado (flotante bajo el topbar) === */
.seo-lang-bar {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    z-index: 40;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1rem 0.2rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
}

/* === Variante del selector de idioma dentro del topbar === */
.seo-topbar-lang {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.seo-topbar-lang .seo-lang-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7a90;
}
.seo-lang-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7a90;
}
.seo-lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    border-radius: 4px;
    text-decoration: none;
    transition: background .15s ease, box-shadow .15s ease;
}
.seo-lang-flag-svg {
    width: 22px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 35, 80, .12);
    display: block;
}
.seo-lang-flag:hover {
    background: #f1f5f9;
}
.seo-lang-flag.is-active {
    background: #e3f2fd;
    box-shadow: inset 0 0 0 1px #b7d8ff;
}
.seo-lang-flag.is-active .seo-lang-flag-svg {
    box-shadow: 0 0 0 1px #1e88e5;
}
.seo-lang-sep {
    color: #cbd5e1;
}

/* === Burger negro centrado (flotante bajo el topbar) === */
/* Sesion 53: eliminado de la portada */

/* SR-only para texto accesible */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* === Loading state en el boton Analizar === */
.seo-hero-btn {
    position: relative;
    min-width: 200px;
    transition: opacity 0.2s ease, background 0.2s ease;
}
.seo-hero-btn[disabled] {
    cursor: wait;
    opacity: 0.9;
}
.seo-hero-btn .seo-btn-loading {
    display: none;
}
.seo-hero-btn.is-loading .seo-btn-default {
    display: none;
}
.seo-hero-btn.is-loading .seo-btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.seo-hero-btn .fa-spinner {
    font-size: 1em;
}
