/* === Casteator — Modern UI === */
/* Inter font loaded via <link> in base.html — no duplicate @import needed */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* === Skip navigation link (WCAG 2.4.1) === */
.skip-nav {
    position: absolute;
    top: -40px;
    left: 0;
    background: #6C5CE7;
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    font-weight: 600;
    transition: top 0.2s;
    text-decoration: none;
}
.skip-nav:focus {
    top: 0;
}

/* Keyboard focus indicators (WCAG 2.4.7) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --primary-light: #a29bfe;
    --success: #00b894;
    --success-dark: #00a382;
    --danger: #e17055;
    --warning: #fdcb6e;
    --dark: #2d3436;
    --gray-900: #1a1a2e;
    --gray-700: #636e72;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #595959;
    --gray-300: #d1d5db;
    --gray-200: #dfe6e9;
    --gray-100: #f0f3f5;
    --white: #ffffff;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-100);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* === Nav === */
nav {
    background: var(--gray-900);
    color: white;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.nav-left { display: flex; align-items: center; }
.nav-right { display: flex; align-items: center; gap: 1.2rem; }
nav a { color: var(--gray-400); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
nav a:hover { color: white; }
.logo {
    font-weight: 700;
    font-size: 1.3rem;
    color: white !important;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo .logo-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.user-email {
    color: var(--gray-400);
    font-size: 0.8rem;
    background: rgba(255,255,255,0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}
.btn-logout { color: var(--danger) !important; font-size: 0.85rem; }
.nav-active { color: white !important; border-bottom: 2px solid white; }
.nav-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    animation: badge-pulse 2s ease-in-out 3;
}
@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}
.nav-badge.nav-badge-new {
    background: var(--warning, #f59e0b);
    animation: badge-pulse 1s ease-in-out infinite;
}

/* === Main === */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2.5rem;
}

/* === Flash === */
.flash {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 4px solid;
}
.flash.success { background: #d4edda; color: #155724; border-color: var(--success); }
.flash.error { background: #f8d7da; color: #721c24; border-color: var(--danger); }
.flash.info { background: #d1ecf1; color: #0c5460; border-color: var(--primary); }

/* === Login === */
.login-container {
    text-align: center;
    margin-top: 12vh;
    padding: 0 1rem;
}
.login-container h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.3rem;
    letter-spacing: -1px;
}
.login-container h1 .login-icon {
    width: 36px;
    height: 36px;
    vertical-align: middle;
    margin-right: 0.3rem;
}
.subtitle {
    color: var(--gray-700);
    margin-bottom: 2.5rem;
    font-size: 1.15rem;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}
.btn-google {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--white);
    color: var(--dark);
    border: 2px solid var(--gray-200);
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}
.btn-google:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}
.note {
    color: var(--gray-400);
    font-size: 0.8rem;
    margin-top: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* === Profile === */
.profile-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.profile-form h2 {
    margin-bottom: 0.3rem;
    color: var(--gray-900);
    font-size: 1.5rem;
}
.profile-form h3 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 2rem 0 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-100);
}
.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: var(--white);
    color: var(--gray-900);
    box-sizing: border-box;
}
.form-group textarea {
    resize: vertical;
    min-height: 8rem;
    line-height: 1.55;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}
.form-group input:focus:not(:focus-visible), .form-group select:focus:not(:focus-visible), .form-group textarea:focus:not(:focus-visible) {
    outline: none;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.4rem;
}
.checkbox-group label {
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--gray-100);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: none;
    letter-spacing: 0;
    color: var(--dark);
}
.checkbox-group label:has(input:checked) {
    background: var(--primary);
    color: white;
}
.checkbox-group input[type="checkbox"] { display: none; }
.btn-save {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-save:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }

/* === Dashboard === */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.dashboard-header h2 {
    color: var(--gray-900);
    font-size: 1.6rem;
    font-weight: 700;
}
.btn-run {
    background: linear-gradient(135deg, var(--success), #047857);
    color: white;
    border: none;
    padding: 0.95rem 2.2rem;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}
.btn-run::before { content: ""; display: none; }
.btn-run:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.45); }
.btn-run svg { width: 20px; height: 20px; }
.btn-run:disabled { background: var(--gray-400); cursor: not-allowed; transform: none; }
.btn-run--loading { background: var(--gray-400) !important; cursor: wait !important; }
.btn-run--loading::before {
    content: "" !important;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}
.run-progress {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-500);
    animation: pulse-opacity 1.5s ease-in-out infinite;
}
@keyframes pulse-opacity { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* === Focus styles (supplemental — global focus-visible rules in skip-nav section above) === */
.btn-action:focus-visible, .btn-run:focus-visible, .crm-filter:focus-visible, nav a:focus-visible {
    outline: 3px solid #6C5CE7;
    outline-offset: 2px;
}

.stat-card .label {
    font-size: 0.7rem;
    color: var(--gray-700);
    margin-top: 0.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Plan badge inline === */
.plan-badge-inline {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 0.5rem;
}
.plan-badge-inline.free { background: var(--gray-200); color: var(--gray-700); }
.plan-badge-inline.actor { background: var(--primary-light); color: white; }
.plan-badge-inline.pro { background: linear-gradient(135deg, #6c5ce7, #fd79a8); color: white; }
.exec-counter {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-400);
    margin-top: 0.3rem;
}

/* === Section header === */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}
.section-header h3 { margin-bottom: 0; }
.badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

/* === Table === */
.table-container {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}
h3 { color: var(--gray-900); font-size: 1.1rem; margin-bottom: 1rem; }

table {
    width: 100%;
    background: var(--white);
    border-collapse: collapse;
}
th {
    background: var(--gray-900);
    color: white;
    text-align: left;
    padding: 0.9rem 1.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
td {
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.88rem;
}
td a { color: var(--primary); text-decoration: none; font-weight: 500; }
td a:hover { text-decoration: underline; }
tr:hover { background: rgba(108, 92, 231, 0.03); }
tr:last-child td { border-bottom: none; }

.date-badge {
    font-size: 0.8rem;
    color: var(--gray-700);
    font-variant-numeric: tabular-nums;
}
.source-badge {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}
.email-text { font-size: 0.82rem; color: var(--gray-700); }

/* === Action buttons === */
.actions-cell {
    text-align: center;
    white-space: nowrap;
}
.btn-action {
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 2px;
}
.btn-sent { background: rgba(0, 184, 148, 0.1); color: var(--success); }
.btn-sent:hover { background: var(--success); color: white; }
.btn-discard { background: rgba(225, 112, 85, 0.1); color: var(--danger); }
.btn-discard:hover { background: var(--danger); color: white; }

/* === History sections === */
.history-section { margin-top: 1.5rem; }
.history-section summary {
    cursor: pointer;
    color: var(--gray-700);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.8rem 1rem;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}
.history-section summary::-webkit-details-marker { display: none; }
.history-section summary svg { transition: transform 0.2s; }
.history-section[open] summary svg { transform: rotate(90deg); }
.history-section summary:hover { color: var(--primary); }
.row-history { opacity: 0.5; }
.row-history:hover { opacity: 0.8; }

/* === Loading overlay === */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.loading-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    text-align: center;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}
.loading-content h3 { margin-bottom: 0.5rem; color: var(--gray-900); }
.loading-content p { color: var(--gray-700); font-size: 0.9rem; margin-bottom: 1.5rem; }
.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-steps { text-align: left; }
.step {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    color: var(--gray-400);
    border-left: 3px solid var(--gray-200);
    margin-bottom: 0.3rem;
    transition: all 0.2s;
}
.step.active { color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
.step.done { color: var(--success); border-left-color: var(--success); }
.step.done::after { content: " \2713"; font-weight: 700; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-400);
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.empty-state-icon {
    display: flex;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--gray-400);
}

/* === Hamburger menu === */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: 0.3s;
}

/* === Dark mode toggle === */
.dark-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-400);
    transition: 0.2s;
}
.dark-toggle:hover { background: rgba(255,255,255,0.2); color: white; }

/* === Dark mode === */
html.dark {
    --gray-100: #1a1a2e;
    --gray-200: #2d2d44;
    --gray-300: #3d3d5c;
    --gray-400: #9ca3af;
    --gray-500: #9ca3af;
    --gray-600: #d1d5db;
    --gray-700: #d1d5db;
    --gray-900: #f9fafb;
    --gray-50: #12122a;
    --white: #16213e;
    --dark: #e5e7eb;
    --shadow: 0 2px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
}
html.dark body { background: #0f0f23; color: #e5e7eb; }
html.dark nav { background: #0a0a1a; }
html.dark .profile-form { background: #16213e; }
html.dark .form-group input, html.dark .form-group select, html.dark .form-group textarea {
    background: #1a1a2e; border-color: #2d2d44; color: #e5e7eb;
}
html.dark table { background: #16213e; }
html.dark th { background: #0a0a1a; }
html.dark td { border-bottom-color: #2d2d44; color: #d1d5db; }
html.dark td a { color: #a29bfe; }
html.dark .flash.success { background: #064e3b; color: #6ee7b7; }
html.dark .flash.error { background: #7f1d1d; color: #fca5a5; }
html.dark .flash.info { background: #1e3a5f; color: #93c5fd; }
html.dark .btn-google { background: #16213e; color: #e5e7eb; border-color: #2d2d44; }
/* Dark: sources section */
html.dark .sources-section { background: #12122a; border-color: #2d2d44; }
html.dark .source-name { color: #d1d5db; }
html.dark .custom-source-input { background: #1a1a2e; border-color: #2d2d44; color: #e5e7eb; }
html.dark .btn-add-custom { background: #1a1a2e; border-color: #2d2d44; color: #d1d5db; }
html.dark .btn-remove-custom { border-color: #2d2d44; color: #6b7280; }
.custom-source-hint { font-size: 0.72rem; color: var(--gray-400); margin: 0.3rem 0 0; font-style: italic; }
html.dark .custom-source-hint { color: #6b7280; }
/* Dark: CRM cards */
html.dark .crm-card { background: #16213e; }
html.dark .crm-card-title a, html.dark .crm-card-title span { color: #f9fafb; }
html.dark .crm-source { background: #1a1a2e; color: #9ca3af; }
html.dark .crm-estado-select { background: #1a1a2e; color: #d1d5db; border-color: #2d2d44; }
html.dark .crm-search-bar { background: #16213e; border-color: #2d2d44; }
html.dark .crm-search-bar input { color: #e5e7eb; }
html.dark .crm-filter { background: #16213e; border-color: #2d2d44; color: #9ca3af; }
html.dark .crm-filter.active { background: var(--primary); color: white; border-color: var(--primary); }
html.dark .crm-stat { background: #16213e; }
html.dark .crm-date-input { background: #1a1a2e; border-color: #2d2d44; color: #e5e7eb; }
html.dark .crm-notes { background: #1a1a2e; border-color: #2d2d44; color: #e5e7eb; }
/* Dark: checklist */
html.dark .crm-checklist { background: #1a2e1a; border-color: #2d4430; }
html.dark .checklist-item { color: #d1d5db; }
html.dark .checklist-pro-tips { border-top-color: #2d4430; }
html.dark .checklist-pro-tips li { color: #d1d5db; }
/* Dark: loading overlay */
html.dark .loading-content { background: #16213e; }
html.dark .loading-content h3 { color: #f9fafb; }
html.dark .loading-content p { color: #d1d5db; }
/* Dark: empty state */
html.dark .empty-state { background: #16213e; color: #6b7280; }
/* Dark: footer */
html.dark footer { border-top-color: #2d2d44; }
/* Dark: history sections */
html.dark .history-section summary { background: #16213e; color: #d1d5db; }
/* Dark: source badge */
html.dark .source-badge { background: #1a1a2e; color: #9ca3af; }
/* Dark: toggle switch */
html.dark .toggle-slider { background: #3d3d5c; }
/* Dark: upcoming section */
html.dark .crm-upcoming { background: #16213e; }
/* Dark: toast */
html.dark .crm-toast { background: #f9fafb; color: #1a1a2e; }
/* Dark: checkbox group */
html.dark .checkbox-group label { background: #1e1e3a; color: #d1d5db; border: 1px solid #3d3d5c; }
html.dark .checkbox-group label:has(input:checked) { background: var(--primary); color: white; border-color: var(--primary); }
html.dark .checkbox-group label:hover { background: #2a2a4a; border-color: #4d4d6c; }
/* Dark: date inputs in dashboard */
html.dark input[type="date"] { background: #1a1a2e; border-color: #2d2d44; color: #e5e7eb; color-scheme: dark; }
/* Dark: referral input */
html.dark #referral-url { background: #1a1a2e; color: #a29bfe; border-color: var(--primary); }
/* Dark: followup buttons */
html.dark .followup-row { border-bottom-color: #2d2d44; }
/* Dark: textarea */
html.dark textarea { background: #1a1a2e; border-color: #2d2d44; color: #e5e7eb; }
/* Dark: all inputs (global fallback) */
html.dark input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="hidden"]) {
    background: #1a1a2e; border-color: #2d2d44; color: #e5e7eb;
}
html.dark select { background: #1a1a2e; border-color: #2d2d44; color: #e5e7eb; }
/* Dark: placeholder text */
html.dark ::placeholder { color: #6b7280; }
/* Dark: preview modal */
html.dark #preview-asunto { background: #1a1a2e; border-color: #2d2d44; color: #e5e7eb; }
html.dark #preview-cuerpo { background: #1a1a2e; border-color: #2d2d44; color: #e5e7eb; }
/* Dark: checkbox/radio checked state */
html.dark input[type="checkbox"]:checked { accent-color: var(--primary); }
html.dark input[type="radio"]:checked { accent-color: var(--primary); }
/* Dark: disabled inputs */
html.dark input:disabled, html.dark select:disabled, html.dark textarea:disabled {
    background: #0f0f23; color: #4b5563; border-color: #1f1f3a;
}
/* Dark: modal overlay */
html.dark .modal-overlay, html.dark .preview-modal { background: #0f0f23; border-color: #2d2d44; }
/* Dark: cards and stat pills */
html.dark .stat-pill { background: #16213e; border-color: #2d2d44; }
html.dark .pendiente-card { background: #16213e; border-color: #2d2d44; }

/* === Cookie consent banner === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    color: #d1d5db;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 1000;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
    font-size: 0.88rem;
}
.cookie-banner p {
    margin: 0;
    line-height: 1.4;
}
.cookie-banner a {
    color: var(--primary-light);
    text-decoration: underline;
    font-weight: 500;
}
.cookie-banner a:hover {
    color: var(--primary);
}
.cookie-accept-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    font-family: inherit;
}
.cookie-accept-btn:hover {
    background: var(--primary-dark);
}
html.dark .cookie-banner {
    background: #0a0a1a;
    color: #d1d5db;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.4);
}

/* === Skeleton loading === */
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
.skeleton-text {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    height: 1em;
    width: 100%;
    display: block;
}
.skeleton-text + .skeleton-text {
    margin-top: 0.6rem;
}
.skeleton-text:nth-child(odd) {
    width: 80%;
}
.skeleton-circle {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 50%;
    width: 48px;
    height: 48px;
}
.skeleton-card {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius);
    height: 120px;
    width: 100%;
}
html.dark .skeleton,
html.dark .skeleton-text,
html.dark .skeleton-circle,
html.dark .skeleton-card {
    background: linear-gradient(90deg, #2d2d44 25%, #1a1a2e 50%, #2d2d44 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

/* === Responsive: Tablet === */
@media (max-width: 1024px) {
    main { padding: 1.5rem; max-width: 100%; }
}

/* === Responsive: Mobile === */
@media (max-width: 768px) {
    nav { padding: 0 1rem; }
    .hamburger { display: flex; }
    .nav-right {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #1a1a2e;
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 0.8rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        z-index: 100;
    }
    .nav-right.nav-open { display: flex; }
    .nav-right a { font-size: 1rem; padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .nav-right a:last-of-type { border-bottom: none; }
    .dark-toggle { width: 44px; height: 44px; }
    .user-email { display: none; }
    main { padding: 1rem 0.75rem; }
    .form-row { grid-template-columns: 1fr; }
    .login-container h1 { font-size: 2rem; }
    .profile-form { padding: 1rem; border-radius: 10px; }
    .dashboard-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .table-container { overflow-x: auto; }
    td, th { padding: 0.5rem 0.7rem; font-size: 0.82rem; }
    h2 { font-size: 1.3rem; }
    /* Flash messages */
    .flash { font-size: 0.85rem; padding: 0.6rem 1rem; margin-bottom: 1rem; }
    /* Buttons */
    button, .btn-save, .btn-suggest { font-size: 0.85rem; padding: 0.5rem 1rem; }
    /* Footer */
    footer { padding: 1rem !important; margin-top: 2rem !important; }
    /* Cookie banner */
    .cookie-banner { flex-direction: column; text-align: center; gap: 0.8rem; padding: 1rem; }
}

/* === Responsive: Small phones === */
@media (max-width: 480px) {
    main { padding: 0.75rem 0.5rem; }
    h2 { font-size: 1.15rem; }
    .profile-form { padding: 0.75rem; }
    .form-group label { font-size: 0.8rem; }
    .form-group input, .form-group select, .form-group textarea {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
    nav { height: 50px; }
    .logo { font-size: 1rem; }
    /* Dashboard actions: stack vertically on small phones */
    .dashboard-header { gap: 0.6rem; }
    .dash-actions { flex-direction: column; width: 100%; }
    .dash-actions form { width: 100%; }
    .dash-actions .btn-run { width: 100%; }
    .dash-action-btn { width: 100%; text-align: center; }
    /* Tighter table cells */
    td, th { padding: 0.35rem 0.5rem; font-size: 0.78rem; }
    /* Prevent text overflow on buttons */
    button { word-break: break-word; white-space: normal; }
}

/* === Global transitions for interactive elements === */
a { transition: color 0.2s, opacity 0.2s; }
button, .btn-save, .btn-run, .btn-action, .btn-suggest {
    transition: all 0.2s;
}

/* === Footer consistent styling === */
footer {
    border-top: 1px solid var(--gray-200);
    margin-top: 3rem;
    padding: 1.5rem 2rem;
    font-size: 0.82rem;
    color: var(--gray-500);
}
footer a {
    color: var(--gray-500);
    text-decoration: none;
}
footer a:hover {
    color: var(--primary) !important;
}

/* === Dark mode: pricing page === */
html.dark .plan-card { background: #16213e; }
html.dark .plan-name { color: #f9fafb; }
html.dark .plan-features li { color: #d1d5db; }
html.dark .plan-price span { color: #9ca3af; }
html.dark .plan-current { color: var(--success); }
html.dark .token-card { background: #16213e; }
html.dark .token-amount { color: var(--primary-light); }
html.dark .token-label { color: #d1d5db; }
html.dark .token-price { color: #f9fafb; }
html.dark .token-detail { color: #6b7280; }
html.dark .token-btn { background: #f9fafb; color: #1a1a2e; }
html.dark .token-btn:hover { background: var(--primary); color: white; }
html.dark .token-card.popular { border-color: #fbbf24; }

/* === Dark mode: admin page === */
html.dark .revenue-breakdown { background: #16213e; }
html.dark .revenue-row { border-bottom-color: #2d2d44; }
html.dark .revenue-total { background: #1a1a2e; }
html.dark .btn-back { background: #2d2d44; color: #d1d5db; }
html.dark .btn-back:hover { background: #3d3d5c; color: white; }
html.dark .admin-badge { background: var(--primary); }
html.dark .status-pending { background: #422006; color: #fde68a; }
html.dark .status-approved { background: #064e3b; color: #6ee7b7; }
html.dark .status-rejected { background: #7f1d1d; color: #fca5a5; }
html.dark .empty-state-small { background: #16213e; color: #6b7280; }

/* === Dark mode: calendar page === */
html.dark .cal-btn-back { background: #1a1a2e; color: #d1d5db; }
html.dark .cal-btn-back:hover { background: #2d2d44; }
html.dark .cal-grid { background: #2d2d44; }
html.dark .cal-day-name { background: #0a0a1a; }
html.dark .cal-cell { background: #16213e; }
html.dark .cal-empty { background: #12122a; }
html.dark .cal-today { background: rgba(108, 92, 231, 0.1); }
html.dark .cal-day-num { color: #d1d5db; }
html.dark .cal-nav-btn { background: #16213e; color: #d1d5db; }
html.dark .cal-nav-btn:hover { background: var(--primary); color: white; }
html.dark .cal-agenda { background: #16213e; }
html.dark .cal-legend-item { color: #d1d5db; }

/* === Dark mode: analytics page === */
html.dark .analytics-section { background: #16213e; }
html.dark .kpi-card { background: #16213e; }
html.dark .kpi-num { color: #f9fafb; }
html.dark .kpi-label { color: #9ca3af; }
html.dark .fuente-bar-container { background: #1a1a2e; }
html.dark .fuente-name { color: #f9fafb; }
html.dark .funnel-bar-wrap { background: #1a1a2e; }
html.dark .timeline-count { color: #f9fafb; }
html.dark .timeline-label { color: #9ca3af; }
html.dark .followup-item { background: #2a2000; }
html.dark .followup-info a { color: #f9fafb; }
html.dark .followup-meta { color: #9ca3af; }
html.dark .analytics-followup { border-left-color: #f59e0b; }
html.dark .btn-conv { background: #422006; color: #fde68a; }
html.dark .btn-noresp { background: #450a0a; color: #fca5a5; }
html.dark .analytics-empty { color: #6b7280; }
html.dark .crm-btn-back { background: #1a1a2e; color: #d1d5db; }
html.dark .crm-btn-back:hover { background: #2d2d44; }

/* === Dark mode: subscription page === */
html.dark .sub-card { background: #16213e; }
html.dark .sub-value { color: #f9fafb; }

/* === Dark mode: onboarding === */
html.dark .ob-step { background: #16213e; }
html.dark .ob-step h2 { color: #f9fafb; }
html.dark .ob-desc { color: #d1d5db; }
html.dark .ob-info-box { background: #1a1a2e; }
html.dark .ob-info-item { color: #f9fafb; }
html.dark .ob-field label { color: #d1d5db; }
html.dark .ob-field input, html.dark .ob-field select {
    background: #1a1a2e; border-color: #2d2d44; color: #e5e7eb;
}
html.dark .ob-chip span { background: #1e1e3a; color: #d1d5db; border: 1px solid #3d3d5c; }
html.dark .ob-chip input:checked + span { background: var(--primary); color: white; border-color: var(--primary); }
html.dark .ob-nav { border-top-color: #2d2d44; }
html.dark .ob-btn-back { color: #9ca3af; }
html.dark .ob-btn-back:hover { color: #f9fafb; }
html.dark .ob-summary { background: #1a1a2e; }
html.dark .ob-summary-item { color: #f9fafb; }
html.dark .ob-tip { color: #6b7280; }
html.dark .ob-file-area { border-color: #2d2d44; }
html.dark .ob-file-area:hover { border-color: var(--primary-light); }
html.dark .ob-file-hint { color: #6b7280; }
html.dark .ob-dot { background: #2d2d44; color: #6b7280; }
html.dark .ob-progress { background: #2d2d44; }

/* === Dark mode: profile inline elements === */
html.dark .suggest-source-section { border-top-color: #2d2d44; }
html.dark .suggest-source-section h3 { color: #f9fafb; }
html.dark .btn-suggest { background: #f9fafb; color: #1a1a2e; }
html.dark .suggestion-success { background: #064e3b; color: #6ee7b7; }
html.dark .suggestion-pending { background: #422006; color: #fde68a; }
html.dark .suggestion-approved { background: #064e3b; color: #6ee7b7; }
html.dark .suggestion-rejected { background: #450a0a; color: #fca5a5; }
html.dark .gdpr-section { border-top-color: #2d2d44; }
html.dark .gdpr-section h3 { color: #f9fafb; }
html.dark .btn-export { background: #1a1a2e; color: #d1d5db; }
html.dark .btn-export:hover { background: #2d2d44; }
html.dark .btn-delete-account { background: #450a0a; color: #fca5a5; }
html.dark .btn-delete-account:hover { background: #7f1d1d; }
html.dark .file-upload-area { border-color: #2d2d44; }
html.dark .file-upload-area:hover { border-color: var(--primary-light); }
html.dark .file-upload-btn { background: #1a1a2e; color: #d1d5db; border-color: #2d2d44; }
html.dark .file-upload-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
html.dark .idioma-select { background: #1a1a2e; border-color: #2d2d44; color: #e5e7eb; }
html.dark .btn-add-idioma { background: #1a1a2e; border-color: #2d2d44; color: #d1d5db; }
html.dark .btn-add-idioma:hover { background: #2d2d44; }
html.dark .btn-remove-idioma { border-color: #2d2d44; color: #6b7280; }
html.dark .profile-save-sticky { background: #0f0f23; border-top-color: #2d2d44; }
html.dark .profile-form > details > summary h3 { color: #f9fafb; }
html.dark .completion-bar { background: #2d2d44; }

/* === Dark mode: castings page elements === */
html.dark .crm-upcoming { background: #16213e; }
html.dark .crm-upcoming h3 { color: #f9fafb; }
html.dark .crm-upcoming-item { border-bottom-color: #2d2d44; }
html.dark .crm-btn-calendar { background: var(--primary); color: white; }
html.dark .crm-btn-bulk { background: #1a1a2e; border-color: #2d2d44; color: #d1d5db; }
html.dark .crm-checklist { background: #1a2e1a; border-color: #2d4430; }
html.dark .checklist-title { color: #6ee7b7; }
html.dark .crm-estado-select { color: #d1d5db; }

/* === Missing fields warning === */
.missing-fields-warning {
    background: #fef3c7;
    color: #92400e;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}
html.dark .missing-fields-warning {
    background: #422006;
    color: #fde68a;
}

/* === Empty state improvements === */
.empty-state p, .empty-state a {
    margin-top: 0.5rem;
}
.empty-state a {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: white !important;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.empty-state a:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* === Disabled button styling === */
button:disabled, .btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* === Upgrade banners === */
.upgrade-banner {
    position: relative;
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.upgrade-banner-free-exhausted {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
}
.upgrade-banner-free-results {
    background: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
    color: #065f46;
}
.upgrade-banner-pro {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    color: #dfe6e9;
}
.upgrade-banner-close {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.7;
    line-height: 1;
    padding: 0.2rem;
}
.upgrade-banner-close:hover { opacity: 1; }
.upgrade-banner-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.upgrade-banner-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.upgrade-banner-text {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}
.upgrade-banner-cta {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    background: white;
    color: #6c5ce7;
}
.upgrade-banner-free-results .upgrade-banner-cta {
    background: white;
    color: #065f46;
}
.upgrade-banner-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.upgrade-banner-cta-pro {
    background: linear-gradient(135deg, #6c5ce7, #fd79a8);
    color: white;
}
.upgrade-banner-cta-pro:hover {
    box-shadow: 0 2px 12px rgba(108, 92, 231, 0.4);
}

/* Dark: upgrade banners */
html.dark .upgrade-banner-free-exhausted {
    background: linear-gradient(135deg, #3b2f8a 0%, #5a4bd1 100%);
}
html.dark .upgrade-banner-free-results {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    color: #6ee7b7;
}
html.dark .upgrade-banner-free-results .upgrade-banner-cta {
    background: #6ee7b7;
    color: #065f46;
}
html.dark .upgrade-banner-pro {
    background: linear-gradient(135deg, #0a0a1a 0%, #2d2d44 100%);
    color: #d1d5db;
}

/* === Quick action buttons in castings === */
.crm-quick-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    min-height: 36px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.crm-quick-enviar {
    background: #dbeafe;
    color: #1d4ed8;
}
.crm-quick-enviar:hover {
    background: #1d4ed8;
    color: white;
}
.crm-quick-descartar {
    background: #fee2e2;
    color: #dc2626;
}
.crm-quick-descartar:hover {
    background: #dc2626;
    color: white;
}
html.dark .crm-quick-enviar { background: #1e3a5f; color: #93c5fd; }
html.dark .crm-quick-enviar:hover { background: #1d4ed8; color: white; }
html.dark .crm-quick-descartar { background: #450a0a; color: #fca5a5; }
html.dark .crm-quick-descartar:hover { background: #dc2626; color: white; }
.crm-quick-responder { background: #f0fdf4; color: #16a34a; }
.crm-quick-responder:hover { background: #16a34a; color: white; }
html.dark .crm-quick-responder { background: #064e3b; color: #6ee7b7; }
html.dark .crm-quick-responder:hover { background: #16a34a; color: white; }
.crm-quick-followup { background: #f0f9ff; color: #3b82f6; }
.crm-quick-followup:hover { background: #3b82f6; color: white; }
html.dark .crm-quick-followup { background: #1e3a5f; color: #93c5fd; }
html.dark .crm-quick-followup:hover { background: #3b82f6; color: white; }
.crm-quick-locked {
    background: var(--gray-100); color: var(--gray-400);
    text-decoration: none; font-size: 0.7rem;
}
html.dark .crm-quick-locked { background: #1a1a2e; color: #6b7280; }

/* === Status select colored borders === */
.crm-select-borrador { border-left: 3px solid #3b82f6; }
.crm-select-enviado, .crm-select-aplicado { border-left: 3px solid #00b894; }
.crm-select-en_conversacion { border-left: 3px solid #8b5cf6; }
.crm-select-no_respondio { border-left: 3px solid var(--danger); }
.crm-select-cerrado { border-left: 3px solid var(--gray-400); }
.crm-select-descartado { border-left: 3px solid #ef4444; }

/* === Estado pill badges (castings page) === */
.crm-estado-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: capitalize;
}
.crm-pill-borrador { background: #dbeafe; color: #1d4ed8; }
.crm-pill-enviado, .crm-pill-aplicado { background: #d1fae5; color: #065f46; }
.crm-pill-en_conversacion { background: #ede9fe; color: #6d28d9; }
.crm-pill-no_respondio { background: #fee2e2; color: #dc2626; }
.crm-pill-cerrado { background: var(--gray-200); color: var(--gray-700); }
.crm-pill-descartado { background: #fee2e2; color: #ef4444; }
html.dark .crm-pill-borrador { background: #1e3a5f; color: #93c5fd; }
html.dark .crm-pill-enviado, html.dark .crm-pill-aplicado { background: #064e3b; color: #6ee7b7; }
html.dark .crm-pill-en_conversacion { background: #2e1065; color: #c4b5fd; }
html.dark .crm-pill-no_respondio { background: #450a0a; color: #fca5a5; }
html.dark .crm-pill-cerrado { background: #2d2d44; color: #9ca3af; }
html.dark .crm-pill-descartado { background: #450a0a; color: #fca5a5; }

/* === Smooth page scroll === */
html {
    scroll-behavior: smooth;
}

/* === Reduced motion (WCAG) === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .monthly-bar-fill,
    .streak-inline-fill,
    .activity-bar { transition: none !important; }
}

/* === Focus-visible for dynamic components === */
.pendiente-btn:focus-visible,
.dash-action-btn:focus-visible,
.crm-filter:focus-visible,
.crm-quick-btn:focus-visible,
.token-btn:focus-visible,
.plan-btn:focus-visible,
.pendientes-bulk-btn:focus-visible,
.cookie-accept-btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* === Footer === */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.75rem;
    color: var(--gray-700);
    border-top: 1px solid var(--gray-200);
    margin-top: 3rem;
}
.site-footer a {
    color: var(--gray-700);
    text-decoration: underline;
}
.site-footer a:hover {
    color: var(--primary);
}

/* ============================================= */
/* === Dashboard components (from dashboard) === */
/* ============================================= */

/* Low credits banner */
.low-credits-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.low-credits-banner a { color: var(--primary); font-weight: 600; text-decoration: none; }
.low-credits-banner a:hover { text-decoration: underline; }
.low-credits-sep { color: var(--gray-400); }
html.dark .low-credits-banner { background: linear-gradient(135deg, #422006, #451a03); border-color: #92400e; }

/* Dashboard actions */
.dash-actions { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.dash-action-btn {
    padding: 0.35rem 0.7rem; background: var(--gray-100); border: 1px solid var(--gray-300);
    border-radius: 8px; font-size: 0.76rem; color: var(--gray-600); cursor: pointer; font-family: inherit;
    transition: all 0.15s;
}
.dash-action-btn:hover { background: var(--gray-200); }
html.dark .dash-action-btn { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); color: var(--gray-400); }
.dash-action-replies { background: #f0fdf4; border-color: #86efac; color: #16a34a; font-weight: 600; }
.dash-action-replies:hover { background: #dcfce7; }
html.dark .dash-action-replies { background: rgba(22,163,74,0.15); border-color: rgba(22,163,74,0.3); }

/* Run progress skeleton */
.run-progress {
    width: 100%; padding: 1rem; background: var(--white); border-radius: 10px;
    box-shadow: var(--shadow); margin-top: 0.5rem;
}
html.dark .run-progress { background: #16213e; }
.run-progress-text { font-size: 0.85rem; color: var(--gray-600); margin-bottom: 0.8rem; }
.run-skeleton { display: flex; flex-direction: column; gap: 0.5rem; }
.skeleton-line {
    height: 12px; border-radius: 6px;
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}
html.dark .skeleton-line {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
}
.skeleton-line-1 { width: 80%; }
.skeleton-line-2 { width: 60%; }
.skeleton-line-3 { width: 40%; }

/* Profile incomplete banner */
.profile-incomplete-banner {
    display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7); border: 1px solid #f0d78e;
    border-radius: 12px; margin-bottom: 1.2rem;
}
html.dark .profile-incomplete-banner { background: linear-gradient(135deg, #4a3f1f, #3d3515); border-color: #6b5a1e; }
.pib-icon { flex-shrink: 0; display: flex; align-items: center; }
.pib-icon svg { width: 24px; height: 24px; color: #f59e0b; }
.pib-text { font-size: 0.85rem; color: var(--gray-800); line-height: 1.5; }
html.dark .pib-text { color: #f3f4f6; }
.pib-text strong { color: var(--gray-900); }
html.dark .pib-text strong { color: #fbbf24; }
.pib-btn {
    flex-shrink: 0; padding: 0.5rem 1.2rem; background: var(--primary); color: white;
    border-radius: 50px; font-size: 0.85rem; font-weight: 600; text-decoration: none;
    white-space: nowrap; transition: all 0.2s;
}
.pib-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
@media (max-width: 640px) {
    .profile-incomplete-banner { flex-direction: column; text-align: center; }
}

/* Run summary */
.run-summary {
    background: var(--white); border-radius: 12px; padding: 1rem 1.2rem;
    box-shadow: var(--shadow); margin-bottom: 1rem; position: relative;
    border-left: 4px solid var(--primary);
    animation: obFadeIn 0.4s ease;
}
html.dark .run-summary { background: #16213e; }
.run-summary-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--primary); margin-bottom: 0.6rem; }
.run-summary-flow { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.run-summary-step { text-align: center; min-width: 55px; }
.run-summary-num { display: block; font-size: 1.1rem; font-weight: 800; color: var(--gray-900); }
html.dark .run-summary-num { color: #f3f4f6; }
.run-summary-label { font-size: 0.68rem; color: var(--gray-500); }
.run-summary-arrow { color: var(--gray-300); font-size: 0.9rem; }
html.dark .run-summary-arrow { color: #4b5563; }
.run-summary-desc { opacity: 0.7; }
.run-summary-close { position: absolute; top: 0.5rem; right: 0.7rem; background: none; border: none; font-size: 1.2rem; color: var(--gray-400); cursor: pointer; }
@keyframes obFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
    .run-summary-flow { gap: 0.3rem; }
    .run-summary-step { min-width: 42px; }
    .run-summary-num { font-size: 0.95rem; }
}

/* Stats compact pills */
.stats-compact {
    display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.stat-pill {
    display: flex; align-items: center; gap: 0.4rem;
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: 50px; padding: 0.35rem 0.8rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
html.dark .stat-pill { background: #16213e; border-color: rgba(255,255,255,0.1); }
.stat-pill-num { font-size: 1.1rem; font-weight: 800; line-height: 1; }
.stat-pill-label { font-size: 0.72rem; color: var(--gray-500); font-weight: 500; white-space: nowrap; }
@media (max-width: 480px) {
    .stats-compact { gap: 0.35rem; }
    .stat-pill { padding: 0.3rem 0.6rem; }
    .stat-pill-num { font-size: 0.95rem; }
    .stat-pill-label { font-size: 0.68rem; }
}

/* FOMO widget */
.fomo-widget {
    display: flex; align-items: center; gap: 0.8rem;
    background: linear-gradient(135deg, #f3e8ff, #ede9fe);
    border: 1px solid #c4b5fd;
    border-radius: 12px; padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    animation: obFadeIn 0.4s ease;
}
html.dark .fomo-widget {
    background: linear-gradient(135deg, #2e1065, #1e1b4b);
    border-color: #6d28d9;
}
.fomo-icon { flex-shrink: 0; display: flex; align-items: center; }
.fomo-icon svg { width: 20px; height: 20px; color: #7c3aed; }
html.dark .fomo-icon svg { color: #a78bfa; }
.fomo-text { font-size: 0.83rem; color: var(--gray-700); flex: 1; }
html.dark .fomo-text { color: #e2e8f0; }
.fomo-text strong { color: #7c3aed; }
html.dark .fomo-text strong { color: #a78bfa; }
.fomo-cta {
    flex-shrink: 0; padding: 0.35rem 0.9rem;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white; border-radius: 50px; font-size: 0.78rem;
    font-weight: 600; text-decoration: none; white-space: nowrap;
    transition: all 0.2s; box-shadow: 0 2px 8px rgba(124,58,237,0.3);
}
.fomo-cta:hover {
    background: linear-gradient(135deg, #6d28d9, #5b21b6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124,58,237,0.4);
}
@media (max-width: 480px) {
    .fomo-widget { flex-wrap: wrap; justify-content: center; text-align: center; }
    .fomo-cta { width: 100%; text-align: center; }
}

/* Monthly progress */
.monthly-progress {
    background: var(--white); border-radius: 12px; padding: 1rem 1.2rem;
    box-shadow: var(--shadow); margin-bottom: 1rem;
}
html.dark .monthly-progress { background: #16213e; }
.monthly-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.monthly-header h2 { font-size: 0.95rem; margin: 0; }
.monthly-trend { font-size: 0.75rem; font-weight: 600; color: var(--gray-400); }
.monthly-trend-up { color: var(--success, #22c55e); }
.monthly-trend-down { color: var(--danger, #ef4444); }
.monthly-bars { display: flex; flex-direction: column; gap: 0.5rem; }
.monthly-bar-item { display: flex; align-items: center; gap: 0.6rem; }
.monthly-bar-label { font-size: 0.78rem; color: var(--gray-500); width: 90px; flex-shrink: 0; }
.monthly-bar-track { flex: 1; height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
html.dark .monthly-bar-track { background: rgba(255,255,255,0.08); }
.monthly-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; min-width: 2px; }
.monthly-bar-num { font-size: 0.85rem; font-weight: 700; min-width: 24px; text-align: right; }
@media (max-width: 480px) {
    .monthly-bar-label { width: 70px; font-size: 0.72rem; }
}

/* Pendientes section */
.pendientes-section {
    background: var(--white); border-radius: 12px; padding: 1.5rem;
    box-shadow: var(--shadow); margin-bottom: 1.5rem;
    border-left: 4px solid var(--warning);
}
html.dark .pendientes-section { background: #16213e; }
.pendientes-header { margin-bottom: 1rem; }
.pendientes-header h2 { font-size: 1rem; color: var(--gray-900); margin-bottom: 0.3rem; }
html.dark .pendientes-header h2 { color: #f9fafb; }
.pendientes-header p { font-size: 0.82rem; color: var(--gray-600); margin-bottom: 0.8rem; }
.pendientes-bulk-btn {
    padding: 0.5rem 1.2rem; background: var(--primary); color: white; border: none;
    border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; font-family: inherit;
}
.pendientes-bulk-btn:hover { background: var(--primary-dark); }
.pendientes-list { display: flex; flex-direction: column; gap: 0.6rem; }
.pendiente-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.8rem 1rem; background: var(--gray-50, #f9fafb); border-radius: 8px;
    transition: all 0.2s;
}
html.dark .pendiente-card { background: rgba(255,255,255,0.05); }
.pendiente-card:hover { background: var(--gray-100); }
html.dark .pendiente-card:hover { background: rgba(255,255,255,0.08); }
.pendiente-titulo {
    font-size: 0.9rem; font-weight: 600; color: var(--gray-900);
    text-decoration: none; display: block; margin-bottom: 0.2rem;
}
html.dark .pendiente-titulo { color: #f3f4f6; }
.pendiente-titulo:hover { color: var(--primary); }
.pendiente-meta { display: flex; gap: 0.8rem; font-size: 0.78rem; color: var(--gray-500); }
.pendiente-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.pendiente-btn {
    padding: 0.35rem 0.8rem; border-radius: 6px; font-size: 0.8rem;
    font-weight: 600; cursor: pointer; border: none; font-family: inherit; transition: all 0.2s;
}
.pendiente-btn-preview { background: var(--primary); color: white; }
.pendiente-btn-preview:hover { background: var(--primary-dark); }
.pendiente-btn-descartar { background: var(--gray-100); color: var(--gray-600); }
.pendiente-btn-descartar:hover { background: #fee2e2; color: #dc2626; }
@media (max-width: 640px) {
    .pendiente-card { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .pendiente-actions { width: 100%; }
    .pendiente-btn { flex: 1; text-align: center; }
}

/* Pendiente upsell */
.pendiente-upsell { position: relative; margin-top: 0.5rem; }
.pendiente-upsell-blur { pointer-events: none; }
.pendiente-upsell-cta {
    text-align: center; padding: 1rem; margin-top: -1rem;
    background: linear-gradient(transparent, var(--white) 30%);
    position: relative; z-index: 1;
}
html.dark .pendiente-upsell-cta { background: linear-gradient(transparent, #16213e 30%); }
.pendiente-upsell-cta p { font-size: 0.9rem; color: var(--gray-700); margin-bottom: 0.5rem; }
.pendiente-upsell-cta strong { color: var(--primary); }

/* Market stats */
.market-stats-card {
    background: linear-gradient(135deg, var(--gray-50) 0%, #eef2ff 100%);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}
html.dark .market-stats-card { background: linear-gradient(135deg, var(--gray-800, #1f2937) 0%, #1e1b4b 100%); }
.market-stats-title { font-size: 0.9rem; color: var(--gray-700); margin-bottom: 0.6rem; font-weight: 600; }
.market-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.market-stat-item { display: flex; flex-direction: column; gap: 0.1rem; }
.market-stat-num { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }
.market-stat-label { font-size: 0.78rem; color: var(--gray-600); }
.market-stat-trend { font-size: 0.72rem; font-weight: 600; margin-top: 0.15rem; }
.trend-up { color: #16a34a; }
.trend-down { color: #dc2626; }
.trend-neutral { color: var(--gray-500); }
@media (max-width: 480px) {
    .market-stats-grid { grid-template-columns: 1fr; gap: 0.6rem; }
    .market-stat-num { font-size: 1.2rem; }
}

/* Recommendations card */
.recs-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0; border-radius: 10px;
    padding: 1rem 1.2rem; margin-bottom: 1rem;
}
html.dark .recs-card { background: linear-gradient(135deg, #1a2e1a 0%, #162416 100%); border-color: #2d5a2d; }
.recs-title { font-size: 0.9rem; color: var(--gray-700); margin-bottom: 0.6rem; font-weight: 600; }
html.dark .recs-title { color: #d1fae5; }
.recs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.8rem; }
.recs-stat { display: flex; flex-direction: column; gap: 0.1rem; }
.recs-num { font-size: 1.5rem; font-weight: 700; }
.recs-label { font-size: 0.78rem; color: var(--gray-600); }
.recs-badge {
    display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.5rem;
    border-radius: 4px; margin-top: 0.2rem; width: fit-content;
}
.recs-badge-good { background: #dcfce7; color: #166534; }
.recs-badge-avg { background: #fef3c7; color: #92400e; }
html.dark .recs-badge-good { background: #166534; color: #dcfce7; }
html.dark .recs-badge-avg { background: #92400e; color: #fef3c7; }
.recs-sources { border-top: 1px solid #bbf7d0; padding-top: 0.6rem; }
html.dark .recs-sources { border-color: #2d5a2d; }
.recs-sources-title { font-size: 0.8rem; font-weight: 600; color: var(--gray-600); margin-bottom: 0.4rem; }
.recs-source-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.2rem 0; font-size: 0.82rem; }
.recs-source-name { font-weight: 600; color: var(--gray-800); }
html.dark .recs-source-name { color: #e5e7eb; }
.recs-source-rate { font-weight: 600; }
.recs-source-count { color: var(--gray-400); font-size: 0.75rem; }
@media (max-width: 480px) { .recs-grid { grid-template-columns: 1fr; } }

/* Activity sparkline */
.activity-card {
    background: var(--white); border-radius: 10px; padding: 1rem 1.2rem;
    box-shadow: var(--shadow); margin-bottom: 1rem;
}
html.dark .activity-card { background: #16213e; }
.activity-title { font-size: 0.9rem; color: var(--gray-700); margin-bottom: 0.6rem; font-weight: 600; }
html.dark .activity-title { color: #d1d5db; }
.activity-chart { display: flex; align-items: flex-end; gap: 2px; height: 50px; }
.activity-bar-wrap { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.activity-bar {
    width: 100%; min-height: 2px; background: var(--primary);
    border-radius: 2px 2px 0 0; transition: height 0.3s;
}
.activity-bar-wrap:hover .activity-bar { background: var(--primary-dark); }
.activity-chart-dates {
    display: flex; justify-content: space-between; font-size: 0.7rem;
    color: var(--gray-400); margin-top: 0.3rem;
}

/* Activity details wrapper */
.activity-details {
    margin-bottom: 1rem;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
}
html.dark .activity-details { border-color: rgba(255,255,255,0.1); }
.activity-details-toggle {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.8rem 1.2rem; font-size: 0.9rem; font-weight: 600;
    color: var(--gray-700); cursor: pointer;
    background: var(--gray-50, #f9fafb); list-style: none; user-select: none;
}
html.dark .activity-details-toggle { background: #16213e; color: #d1d5db; }
.activity-details-toggle::-webkit-details-marker { display: none; }
.activity-details-toggle svg { transition: transform 0.2s; flex-shrink: 0; }
.activity-details[open] .activity-details-toggle svg { transform: rotate(90deg); }
.activity-details-content { padding: 0 1.2rem 1rem; background: var(--gray-50, #f9fafb); }
html.dark .activity-details-content { background: #16213e; }
.activity-details-content .recs-card,
.activity-details-content .activity-card { box-shadow: none; margin-bottom: 0.5rem; }

/* Streak */
.streak-inline {
    display: flex; align-items: center; gap: 0.6rem;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fcd34d; border-radius: 50px;
    padding: 0.4rem 0.8rem 0.4rem 0.6rem; margin-bottom: 1rem;
}
html.dark .streak-inline { background: linear-gradient(135deg, #422006, #451a03); border-color: #92400e; }
.streak-inline-left { display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; }
.streak-inline-fire { display: flex; align-items: center; }
.streak-inline-fire svg { width: 18px; height: 18px; color: #f59e0b; }
.streak-inline-num { font-size: 1.1rem; font-weight: 800; color: #d97706; }
html.dark .streak-inline-num { color: #fbbf24; }
.streak-inline-text { font-size: 0.72rem; color: var(--gray-600); font-weight: 500; }
.streak-inline-bar-wrap { flex: 1; min-width: 80px; }
.streak-inline-bar { height: 6px; background: rgba(0,0,0,0.08); border-radius: 3px; overflow: hidden; }
html.dark .streak-inline-bar { background: rgba(255,255,255,0.1); }
.streak-inline-fill {
    height: 100%; border-radius: 3px; transition: width 0.6s ease;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}
.streak-inline-next { font-size: 0.62rem; color: var(--gray-500); margin-top: 0.1rem; display: block; }
.streak-inline-cta { font-size: 0.72rem; color: var(--primary); text-decoration: none; font-weight: 700; flex-shrink: 0; }
.streak-inline-bonus { font-size: 0.72rem; font-weight: 700; color: var(--success); flex-shrink: 0; }
.streak-inline-help {
    width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--gray-300);
    background: var(--gray-100); color: var(--gray-500); font-size: 0.65rem; font-weight: 700;
    cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    padding: 0; line-height: 1;
}
html.dark .streak-inline-help { background: #374151; border-color: #4b5563; color: #9ca3af; }
.streak-info-panel {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
    padding: 0 0.8rem; margin-bottom: 0.5rem; font-size: 0.78rem;
}
.streak-info-panel.streak-info-open { max-height: 250px; padding: 0.6rem 0.8rem; }
html.dark .streak-info-panel { background: #1c1917; border-color: #92400e; }
.streak-info-title { font-weight: 700; color: #d97706; margin-bottom: 0.3rem; font-size: 0.8rem; }
.streak-info-text { color: var(--gray-600); margin: 0; line-height: 1.4; }
html.dark .streak-info-text { color: #d1d5db; }
.streak-info-list { margin: 0.3rem 0; padding-left: 1.2rem; }
.streak-info-list li { color: var(--gray-600); margin-bottom: 0.15rem; }
html.dark .streak-info-list li { color: #d1d5db; }
@media (max-width: 480px) {
    .streak-inline { flex-wrap: wrap; border-radius: 12px; padding: 0.5rem 0.7rem; gap: 0.4rem; }
    .streak-inline-bar-wrap { width: 100%; order: 3; }
}

/* Streak badge (legacy) */
.streak-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: #fef3c7; color: #92400e;
    padding: 0.3rem 0.8rem; border-radius: 20px;
    font-size: 0.8rem; font-weight: 600; margin-bottom: 1rem;
}
html.dark .streak-badge { background: #422006; color: #fde68a; }

/* Estado dots */
.crm-estado-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.crm-estado-borrador { background: var(--gray-400); }
.crm-estado-enviado { background: #3b82f6; }
.crm-estado-aplicado { background: var(--success); }
.crm-estado-en_conversacion { background: #f59e0b; }
.crm-estado-no_respondio { background: var(--danger); }
.crm-estado-cerrado { background: var(--gray-700); }
.crm-estado-descartado { background: var(--gray-300); }

/* Confetti */
.confetti-piece {
    position: fixed; top: -10px;
    width: 8px; height: 8px; border-radius: 2px;
    z-index: 9999; pointer-events: none;
    animation: confetti-fall 1.5s ease-out forwards;
}
@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Upcoming castings (dashboard) */
.upcoming-section {
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--primary);
}
.upcoming-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem;
}
.upcoming-header h2 { font-size: 0.95rem; margin: 0; }
.upcoming-header h2 svg { width: 16px; height: 16px; vertical-align: middle; margin-right: 0.3rem; color: var(--primary); }
.upcoming-link { font-size: 0.8rem; color: var(--primary); text-decoration: none; font-weight: 600; }
.upcoming-item {
    display: flex; gap: 0.8rem; align-items: center;
    padding: 0.4rem 0; font-size: 0.85rem;
}
.upcoming-item:not(:last-child) { border-bottom: 1px solid var(--gray-200); }
.upcoming-date { font-weight: 600; color: var(--primary); min-width: 70px; }
.upcoming-name { flex: 1; }
.upcoming-more { font-size: 0.8rem; color: var(--gray-700); display: block; margin-top: 0.4rem; }

/* Follow-up section (dashboard) */
.followup-section {
    margin-bottom: 1.5rem;
    border-left: 3px solid #f59e0b;
}
.followup-section-title { font-size: 0.95rem; margin-bottom: 0.4rem; }
.followup-section-desc { font-size: 0.8rem; color: var(--gray-700); margin-bottom: 0.6rem; }

/* Sources section title */
.sources-section-title { font-size: 0.95rem; margin-bottom: 0.6rem; }

/* ============================================= */
/* === Pricing components (from pricing.html) == */
/* ============================================= */

/* Trust bar */
.pricing-trust {
    display: flex; justify-content: center; align-items: center; gap: 0.6rem;
    margin-top: 1rem; flex-wrap: wrap;
}
.pricing-trust-item { font-size: 0.85rem; color: var(--gray-600); }
.pricing-trust-item strong { color: var(--primary); }
.pricing-trust-sep { color: var(--gray-300); }
html.dark .pricing-trust-item { color: #9ca3af; }
html.dark .pricing-trust-sep { color: #4b5563; }

/* How it works */
.pricing-how-it-works {
    display: flex; justify-content: center; align-items: center; gap: 1rem;
    margin-bottom: 2.5rem; flex-wrap: wrap;
}
.pricing-how-step {
    display: flex; align-items: center; gap: 0.6rem;
    background: var(--white); padding: 0.8rem 1rem; border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); max-width: 220px;
}
html.dark .pricing-how-step { background: #16213e; }
.pricing-how-step p { font-size: 0.78rem; color: var(--gray-500); margin: 0; line-height: 1.3; }
.pricing-how-step strong { font-size: 0.88rem; color: var(--gray-900); display: block; }
html.dark .pricing-how-step strong { color: #f3f4f6; }
.pricing-how-icon {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
.pricing-how-arrow { color: var(--gray-300); font-size: 1.2rem; }
html.dark .pricing-how-arrow { color: #4b5563; }
@media (max-width: 640px) {
    .pricing-how-arrow { display: none; }
    .pricing-how-it-works { flex-direction: column; gap: 0.6rem; }
    .pricing-how-step { max-width: 100%; width: 100%; }
}

/* Pricing hero */
.pricing-hero {
    text-align: center; margin-bottom: 2rem; position: relative; z-index: 1;
}
.pricing-hero h1, .pricing-hero h2 {
    font-size: 1.8rem; font-weight: 800; color: var(--gray-900); margin-bottom: 0.4rem;
}
html.dark .pricing-hero h1, html.dark .pricing-hero h2 { color: #f3f4f6; }
.pricing-hero p { font-size: 0.95rem; color: var(--gray-600); }
html.dark .pricing-hero p { color: #9ca3af; }

/* Plan grid */
.pricing-grid-3 {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem; max-width: 900px; margin: 0 auto; align-items: start;
}
.plan-card {
    background: var(--white); border-radius: var(--radius);
    padding: 1.8rem 1.5rem; text-align: center;
    box-shadow: var(--shadow); position: relative; transition: transform 0.2s;
}
html.dark .plan-card { background: #16213e; }
.plan-card:hover { transform: translateY(-4px); }
.plan-card.featured { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); transform: scale(1.03); }
.plan-card.featured:hover { transform: scale(1.03) translateY(-4px); }
.plan-card.current { border: 2px solid var(--success); }
.plan-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: white;
    padding: 0.2rem 1rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
}
.plan-name { font-size: 1.2rem; font-weight: 700; color: var(--gray-900); margin-bottom: 0.3rem; }
html.dark .plan-name { color: #f3f4f6; }
.plan-price { font-size: 2.2rem; font-weight: 700; color: var(--primary); line-height: 1; }
.plan-price span { font-size: 0.85rem; color: var(--gray-700); font-weight: 400; }
html.dark .plan-price span { color: #9ca3af; }
.plan-iva { font-size: 0.68rem; color: var(--gray-400); margin-bottom: 0.3rem; }
.plan-subtitle { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 1.2rem; }
.plan-features { list-style: none; text-align: left; margin-bottom: 1.5rem; padding: 0; }
.plan-features li { padding: 0.3rem 0; font-size: 0.82rem; color: var(--gray-700); }
html.dark .plan-features li { color: #d1d5db; }
.plan-features li.feat-yes::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 0.4rem; vertical-align: middle; background: var(--success); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") no-repeat center; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") no-repeat center; }
.plan-features li.feat-no { color: var(--gray-400); }
.plan-features li.feat-no::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 0.4rem; vertical-align: middle; background: var(--gray-400); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E") no-repeat center; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E") no-repeat center; }
.plan-features li.feat-pro { color: var(--primary); font-weight: 600; }
html.dark .plan-features li.feat-pro { color: #818cf8; }
.plan-features li strong { color: var(--gray-900); }
html.dark .plan-features li strong { color: #f3f4f6; }
.plan-note { font-size: 0.72rem; color: var(--danger); margin-bottom: 1rem; font-weight: 600; }
.plan-btn {
    display: inline-block; background: var(--primary); color: white; border: none;
    padding: 0.7rem 2rem; border-radius: 50px; font-size: 0.95rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s; text-decoration: none; font-family: inherit;
    width: 100%; box-sizing: border-box;
}
.plan-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.plan-btn-free { background: var(--gray-200); color: var(--gray-700); }
.plan-btn-free:hover { background: var(--gray-300); }
.plan-current { color: var(--success); font-weight: 600; font-size: 0.9rem; padding: 0.7rem; }

/* Compare table */
.compare-section {
    max-width: 700px; margin: 2.5rem auto 0;
    background: var(--white); border-radius: var(--radius); padding: 1.5rem;
    box-shadow: var(--shadow);
}
html.dark .compare-section { background: #16213e; }
.compare-section h2 { text-align: center; font-size: 1.1rem; margin-bottom: 1rem; color: var(--gray-900); }
html.dark .compare-section h2 { color: #f3f4f6; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.compare-table thead { background: #f9fafb; }
html.dark .compare-table thead { background: #1e293b; }
table.compare-table th,
.compare-section table th,
.compare-table thead th {
    padding: 0.7rem 0.5rem; text-align: center; font-weight: 700;
    color: #374151 !important; background: #f3f4f6 !important;
    border-bottom: 2px solid #e5e7eb !important;
    font-size: 0.9rem; text-transform: none; letter-spacing: 0;
}
html.dark table.compare-table th,
html.dark .compare-section table th,
html.dark .compare-table thead th {
    color: #f1f5f9 !important; background: #1e293b !important; border-color: rgba(255,255,255,0.15) !important;
}
.compare-table td {
    padding: 0.55rem 0.5rem; text-align: center; color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}
html.dark .compare-table td { color: #d1d5db; border-color: rgba(255,255,255,0.05); }
.compare-table td:first-child { text-align: left; font-weight: 600; color: var(--gray-800); }
html.dark .compare-table td:first-child { color: #e5e7eb; }
.compare-table tbody tr:hover { background: rgba(99, 102, 241, 0.03); }
html.dark .compare-table tbody tr:hover { background: rgba(99, 102, 241, 0.06); }
.compare-featured { background: rgba(99, 102, 241, 0.06); font-weight: 600; }
html.dark .compare-featured { background: rgba(99, 102, 241, 0.12); }
.compare-table th:nth-child(2) { color: #6b7280; }
.compare-table th:nth-child(3) { color: #4f46e5; }
.compare-table th:nth-child(4) { color: #7c3aed; }
html.dark .compare-table th:nth-child(2) { color: #d1d5db; }
html.dark .compare-table th:nth-child(3) { color: #a5b4fc; }
html.dark .compare-table th:nth-child(4) { color: #c4b5fd; }
/* Compare table SVG check/cross */
.compare-yes, .compare-no { display: inline-flex; align-items: center; justify-content: center; }
.compare-yes svg { width: 16px; height: 16px; color: var(--success); }
.compare-no svg { width: 16px; height: 16px; color: var(--gray-400); }

/* Token grid */
.token-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
    max-width: 700px; margin: 0 auto;
}
.token-card {
    background: var(--white); border-radius: var(--radius); padding: 1.5rem;
    text-align: center; box-shadow: var(--shadow); transition: transform 0.2s; position: relative;
}
html.dark .token-card { background: #16213e; }
.token-card:hover { transform: translateY(-3px); }
.token-card.popular { border: 2px solid var(--warning); }
.token-badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: var(--warning); color: var(--dark);
    padding: 0.15rem 0.8rem; border-radius: 20px; font-size: 0.7rem; font-weight: 700;
}
.token-amount { font-size: 2rem; font-weight: 700; color: var(--primary); }
.token-label { font-size: 0.8rem; color: var(--gray-700); margin-bottom: 0.5rem; }
.token-price { font-size: 1.3rem; font-weight: 700; color: var(--gray-900); margin-bottom: 0.3rem; }
html.dark .token-price { color: #f3f4f6; }
.token-detail { font-size: 0.75rem; color: var(--gray-400); margin-bottom: 1rem; }
.token-btn {
    background: var(--gray-900); color: white; border: none;
    padding: 0.5rem 1.5rem; border-radius: 50px; font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.token-btn:hover { background: var(--primary); transform: translateY(-1px); }

/* FAQ */
.pricing-faq {
    max-width: 700px; margin: 2.5rem auto 0;
    background: var(--white); border-radius: var(--radius); padding: 1.5rem;
    box-shadow: var(--shadow);
}
html.dark .pricing-faq { background: #16213e; }
.pricing-faq h2 { text-align: center; font-size: 1.1rem; margin-bottom: 1rem; color: var(--gray-900); }
html.dark .pricing-faq h2 { color: #f3f4f6; }
.pricing-faq details { border-bottom: 1px solid var(--gray-100); padding: 0.8rem 0; }
html.dark .pricing-faq details { border-color: rgba(255,255,255,0.05); }
.pricing-faq details:last-child { border-bottom: none; }
.pricing-faq summary {
    font-size: 0.88rem; font-weight: 600; color: var(--gray-800); cursor: pointer;
    list-style: none; display: flex; justify-content: space-between; align-items: center;
}
html.dark .pricing-faq summary { color: #e5e7eb; }
.pricing-faq summary::after { content: "+"; font-size: 1.2rem; color: var(--gray-400); transition: transform 0.2s; }
.pricing-faq details[open] summary::after { transform: rotate(45deg); }
.pricing-faq summary::-webkit-details-marker { display: none; }
.pricing-faq p { font-size: 0.82rem; color: var(--gray-600); margin-top: 0.5rem; line-height: 1.6; }
html.dark .pricing-faq p { color: #9ca3af; }

/* Pricing responsive */
@media (max-width: 768px) {
    .pricing-grid-3 { grid-template-columns: 1fr; max-width: 400px; }
    .plan-card.featured { transform: none; }
    .plan-card.featured:hover { transform: translateY(-4px); }
    .token-grid { grid-template-columns: 1fr; max-width: 300px; margin: 0 auto; }
    .compare-table { font-size: 0.75rem; }
    .compare-table td, .compare-table th { padding: 0.4rem 0.2rem; }
}
