:root {
    color-scheme: dark;
    --bg: #090A10;
    --sidebar-bg: #0D0E1A;
    --surface: #13152B;
    --surface-2: #1A1C36;
    --surface-hover: #1F2140;
    --border: #1F213A;
    --border-subtle: rgba(255, 255, 255, 0.07);
    --text: #F3F4F8;
    --muted: #8E92B2;
    --text-dim: #5C5E78;
    --accent: #7C4DFF;
    --accent-purple: #7C4DFF;
    --accent-glow: rgba(124, 77, 255, 0.2);
    --danger: #FF5252;
    --success: #00E676;
    --warning: #FFB300;
    --info: #29B6F6;
}

html[data-theme="dark"],
body[data-theme="dark"],
[data-theme="dark"] {
    --bg: #090A10 !important;
    --sidebar-bg: #0D0E1A !important;
    --surface: #13152B !important;
    --surface-2: #1A1C36 !important;
    --surface-hover: #1F2140 !important;
    --border: #1F213A !important;
    --border-subtle: rgba(255, 255, 255, 0.07) !important;
    --text: #F3F4F8 !important;
    --muted: #8E92B2 !important;
    --text-dim: #5C5E78 !important;
    --accent: #7C4DFF !important;
    --accent-purple: #7C4DFF !important;
    --accent-glow: rgba(124, 77, 255, 0.2) !important;
    --danger: #FF5252 !important;
    --success: #00E676 !important;
    --warning: #FFB300 !important;
    --info: #29B6F6 !important;
}

html[data-theme="light"],
body[data-theme="light"],
[data-theme="light"] {
    color-scheme: light;
    --bg: #F4F6FB !important;
    --sidebar-bg: #FFFFFF !important;
    --surface: #FFFFFF !important;
    --surface-2: #F1F5F9 !important;
    --surface-hover: #E2E8F0 !important;
    --border: #E2E8F0 !important;
    --border-subtle: rgba(0, 0, 0, 0.06) !important;
    --text: #0F172A !important;
    --muted: #64748B !important;
    --text-dim: #94A3B8 !important;
    --accent: #6C5CE7 !important;
    --accent-purple: #6C5CE7 !important;
    --accent-glow: rgba(108, 92, 231, 0.15) !important;
    --danger: #EF4444 !important;
    --success: #10B981 !important;
    --warning: #F59E0B !important;
    --info: #0284C7 !important;
}

/* Light Mode Overrides for High Contrast */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] strong,
[data-theme="light"] .sidebar-brand-title,
[data-theme="light"] .v-user-name,
[data-theme="light"] .app-header-left h1,
[data-theme="light"] .v-kpi-value,
[data-theme="light"] .v-table td,
[data-theme="light"] .v-table td a,
[data-theme="light"] .v-quad-number,
[data-theme="light"] .v-list-content,
[data-theme="light"] .v-list-content strong,
[data-theme="light"] .sidebar-nav a:hover,
[data-theme="light"] .v-quad-row span {
    color: #0F172A !important;
}

[data-theme="light"] .sidebar-footer {
    background: #F8FAFC;
}

[data-theme="light"] .v-card,
[data-theme="light"] .v-kpi-card,
[data-theme="light"] .v-quad-card,
[data-theme="light"] .v-user-profile-card,
[data-theme="light"] .table-container,
[data-theme="light"] .card {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] table th,
[data-theme="light"] .table th,
[data-theme="light"] .v-table th {
    background: #F1F5F9;
    color: #475569;
    border-bottom: 1px solid #E2E8F0;
}

[data-theme="light"] table td,
[data-theme="light"] .table td,
[data-theme="light"] .v-table td {
    border-bottom: 1px solid #E2E8F0;
    color: #0F172A;
}

[data-theme="light"] .v-company-icon {
    background: #E2E8F0;
    color: #0F172A;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ Auth Redesign ============ */
.v-auth-page {
    margin: 0;
    padding: 0;
    background-color: #040711;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.v-auth-container {
    display: flex;
    flex: 1;
    min-height: 100vh;
    width: 100%;
}

/* Left Column: White Card */
.v-auth-left {
    width: 440px;
    min-width: 380px;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #040711;
    z-index: 5;
    box-sizing: border-box;
}

.v-login-card {
    background: #ffffff;
    color: #0f172a;
    border-radius: 24px;
    padding: 2rem 2rem 1.75rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.v-brand-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.v-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.v-brand-name {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0.5px;
    color: #0f172a;
    display: block;
    line-height: 1.1;
}

.v-brand-sub {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    color: #2563eb;
    letter-spacing: 1.2px;
}

.v-card-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.25rem;
    letter-spacing: -0.5px;
}

.v-card-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

/* Quick Access Pills */
.v-quick-access {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
}

.v-quick-title {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.v-quick-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.v-pill-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.2rem 0.45rem;
    font-size: 0.7rem;
    color: #334155;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.v-pill-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.v-pill-role {
    font-size: 0.58rem;
    padding: 0.08rem 0.25rem;
    border-radius: 4px;
    font-weight: 800;
}
.v-pill-role.owner { background: #dbeafe; color: #1e40af; }
.v-pill-role.mkt { background: #fce7f3; color: #9d174d; }
.v-pill-role.sup { background: #fef3c7; color: #92400e; }
.v-pill-role.des { background: #e0e7ff; color: #3730a3; }
.v-pill-role.cli { background: #dcfce7; color: #166534; }

.v-login-form {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.v-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.v-field-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
}

.v-input-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.v-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.v-auth-page .v-input-box input[type="email"],
.v-auth-page .v-input-box input[type="password"],
.v-auth-page .v-input-box input {
    width: 100% !important;
    height: 44px !important;
    padding: 0.6rem 2.6rem 0.6rem 2.5rem !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    color: #0f172a !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    font-family: inherit !important;
    box-shadow: none !important;
}

.v-auth-page .v-input-box input::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

.v-auth-page .v-input-box input[type="email"]:focus,
.v-auth-page .v-input-box input[type="password"]:focus,
.v-auth-page .v-input-box input:focus {
    border-color: #2563eb !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
}

.v-input-highlight {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25) !important;
}

.v-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    z-index: 2;
}

.v-pw-toggle:hover {
    color: #475569;
}

.v-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    gap: 0.5rem;
}

.v-checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #475569;
    cursor: pointer;
}

.v-checkbox-container input {
    width: 15px;
    height: 15px;
    accent-color: #2563eb;
    cursor: pointer;
}

.v-forgot-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.v-forgot-link:hover {
    text-decoration: underline;
}

.v-back-link {
    text-align: center;
    margin-top: 0.9rem;
}

.v-back-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
}

.v-back-link a:hover {
    text-decoration: underline;
}

.v-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.v-submit-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.v-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
}

/* Client Box */
.v-client-card {
    background: #f0f6ff;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.v-client-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.v-client-body {
    flex: 1;
}

.v-client-heading {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0 0 0.15rem;
}

.v-client-sub {
    font-size: 0.75rem;
    color: #475569;
    margin: 0 0 0.6rem;
    line-height: 1.35;
}

.v-client-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.45rem 0.8rem;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.v-client-btn:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

/* Right Column: Dark Cosmic Diagram */
.v-auth-right {
    flex: 1;
    background: radial-gradient(circle at 65% 45%, #0d1b3e 0%, #040711 75%);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2.2rem 3rem 1.5rem;
    overflow: hidden;
    justify-content: space-between;
}

.v-top-actions {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    z-index: 10;
}

.v-proposal-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.5rem 1.1rem;
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(37,99,235,0.4);
    transition: all 0.2s ease;
}

.v-proposal-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 0 25px rgba(37,99,235,0.6);
    text-decoration: none;
}

.v-right-hero {
    display: flex;
    flex-direction: column;
    z-index: 5;
}

.v-hero-title {
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin: 0 0 0.4rem;
}

.v-gradient-text {
    background: linear-gradient(90deg, #38bdf8 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.v-hero-description {
    font-size: 0.95rem;
    color: #94a3b8;
    max-width: 540px;
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.v-feature-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.v-feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(51, 65, 85, 0.8);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #cbd5e1;
}

/* Diagram Stage */
.v-diagram-stage {
    position: relative;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    min-height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v-orbit-container {
    position: relative;
    width: 100%;
    height: 440px;
}

.v-network-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.v-center-emblem {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v-emblem-ring {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 2px solid #3b82f6;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.8), inset 0 0 15px rgba(59, 130, 246, 0.5);
    animation: pulseGlow 3s infinite alternate;
}

.v-emblem-core {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #060914;
    border: 1.5px solid #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.6);
}

@keyframes pulseGlow {
    0% { transform: scale(0.97); box-shadow: 0 0 18px rgba(59,130,246,0.6); }
    100% { transform: scale(1.04); box-shadow: 0 0 35px rgba(59,130,246,1); }
}

.v-node-social {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 9999px;
    padding: 0.35rem 0.8rem;
    display: flex;
    gap: 0.6rem;
    z-index: 4;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
}

.v-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.v-social-icon:hover {
    transform: scale(1.25);
}

.v-card-node {
    position: absolute;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    width: 145px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 4;
    transition: all 0.3s ease;
}

.v-card-node:hover {
    border-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.25);
}

.node-leads { top: 35px; left: 20px; }
.node-marketing { top: 35px; right: 20px; }
.node-crm { top: 185px; right: 10px; border-color: rgba(34, 197, 94, 0.4); }
.node-ventas { bottom: 35px; right: 20px; border-color: rgba(245, 158, 11, 0.4); }
.node-reportes { bottom: 10px; left: 240px; }
.node-automation { bottom: 35px; left: 20px; border-color: rgba(168, 85, 247, 0.4); }

.v-node-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.v-node-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #60a5fa;
}

.v-node-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.68rem;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.v-node-list li {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.v-node-list li::before {
    content: "•";
    color: #3b82f6;
    font-size: 0.8rem;
}

.v-bottom-quote {
    text-align: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 0.55rem 1.25rem;
    backdrop-filter: blur(8px);
    max-width: 580px;
    margin: 0.5rem auto 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: #60a5fa;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* Footer Bar */
.v-auth-footer {
    height: 46px;
    background: #02040a;
    border-top: 1px solid rgba(30, 41, 59, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
    z-index: 10;
}

.v-footer-center a {
    color: #64748b;
    text-decoration: none;
}

.v-footer-center a:hover {
    color: #94a3b8;
    text-decoration: underline;
}

.v-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #94a3b8;
}

.v-status-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
}

@media (max-width: 1080px) {
    .v-auth-container { flex-direction: column; }
    .v-auth-left { width: 100%; max-width: 500px; margin: 0 auto; padding: 2rem 1.5rem; }
    .v-auth-right { padding: 2rem 1.5rem; }
}


/* ============ App shell & Layout ============ */
.app-shell {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--text);
}
.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 20;
}
.sidebar-brand {
    padding: 1.35rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.sidebar-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7C4DFF 0%, #6C5CE7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.4);
}
.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}
.sidebar-brand-title {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.8px;
    color: #ffffff;
    line-height: 1;
}
.sidebar-brand-sub {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 1.2px;
    margin-top: 2px;
    text-transform: uppercase;
}
.sidebar-nav {
    flex: 1;
    padding: 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}
.sidebar-section {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-dim);
    padding: 0.85rem 0.85rem 0.35rem;
}
.sidebar-nav a {
    color: var(--muted);
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}
.sidebar-nav a:hover {
    background: var(--surface-hover);
    color: #ffffff;
    text-decoration: none;
}
.sidebar-nav a.active {
    background: linear-gradient(90deg, #7C4DFF 0%, #6C5CE7 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.35);
}
.sidebar-nav-count {
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
}
.sidebar-nav-count.purple { background: rgba(124, 77, 255, 0.3); color: #C4B5FD; }
.sidebar-nav-count.orange { background: rgba(255, 179, 0, 0.25); color: #FCD34D; }

/* ===== Sidebar: accesos rápidos y submenús colapsables por módulo ===== */
.sidebar-nav a.sidebar-link,
.sidebar-nav a.sidebar-subitem {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    transition: all 0.15s ease;
}
a.sidebar-link {
    color: var(--muted);
    justify-content: flex-start;
}
a.sidebar-link:hover {
    background: var(--surface-hover);
    color: var(--text);
    text-decoration: none;
}
a.sidebar-link.active {
    background: linear-gradient(90deg, #7C4DFF 0%, #6C5CE7 100%);
    color: #FFFFFF !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.35);
}
.sidebar-link-icon {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.85;
}
.sidebar-submenu {
    border-radius: 10px;
    margin-bottom: 4px;
    transition: background 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}
.sidebar-submenu[open] {
    background: var(--surface-2);
    border-color: var(--border);
    padding: 4px;
}
.sidebar-submenu > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    cursor: pointer;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.sidebar-submenu > summary::-webkit-details-marker { display: none; }
.sidebar-submenu > summary:hover {
    background: var(--surface-hover);
    color: var(--text);
}
.sidebar-submenu[open] > summary {
    color: var(--text) !important;
    font-weight: 700;
}
.sidebar-submenu-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-submenu-chevron {
    font-size: 0.7rem;
    opacity: 0.7;
    transition: transform 0.15s ease;
}
.sidebar-submenu[open] .sidebar-submenu-chevron { transform: rotate(180deg); }
.sidebar-submenu-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0 4px 10px;
    margin-left: 8px;
    border-left: 2px solid var(--accent);
}
.sidebar-nav a.sidebar-subitem {
    justify-content: flex-start;
    font-weight: 500;
}
a.sidebar-subitem {
    color: var(--muted);
}
a.sidebar-subitem:hover {
    background: var(--surface-hover);
    color: var(--text);
    text-decoration: none;
}
a.sidebar-subitem.active {
    background: linear-gradient(90deg, #7C4DFF 0%, #6C5CE7 100%);
    color: #FFFFFF !important;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(124, 77, 255, 0.3);
}

/* Light Mode Overrides for Sidebar Submenus */
[data-theme="light"] .sidebar-submenu[open] {
    background: #F1F5F9;
    border-color: #CBD5E1;
}
[data-theme="light"] .sidebar-submenu > summary {
    color: #475569;
}
[data-theme="light"] .sidebar-submenu > summary:hover {
    background: #E2E8F0;
    color: #0F172A;
}
[data-theme="light"] .sidebar-submenu[open] > summary {
    background: #E2E8F0;
    color: #0F172A !important;
}
[data-theme="light"] a.sidebar-subitem {
    color: #475569;
}
[data-theme="light"] a.sidebar-subitem:hover {
    background: #E2E8F0;
    color: #0F172A;
}
[data-theme="light"] a.sidebar-subitem.active,
[data-theme="light"] a.sidebar-link.active {
    background: linear-gradient(90deg, #6C5CE7 0%, #7C4DFF 100%);
    color: #FFFFFF !important;
}

.sidebar-footer {
    padding: 1rem 1.1rem;
    border-top: 1px solid var(--border);
    background: rgba(13, 14, 26, 0.8);
}
.v-user-profile-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
}
.v-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.v-user-details { flex: 1; overflow: hidden; }
.v-user-name { font-size: 0.82rem; font-weight: 700; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-user-role { font-size: 0.68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ Global Container & Overflow Prevention System ============ */
.app-main {
    flex: 1;
    padding: 1.5rem 2rem 2.5rem;
    max-width: 1360px;
    margin: 0 auto;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.view-container,
.v-container,
.v-content-wrap {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    min-width: 0;
    box-sizing: border-box;
}

/* Guarantee Flex & Grid Child Containment across all devices */
.app-main > *,
.view-container > *,
.v-container > *,
.v-card,
.grid-2,
.v-grid-5,
.v-grid-middle,
.v-grid-lower,
.v-grid-4,
.table-container {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.table-container,
.table-wrapper,
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}
.app-header-left h1 {
    margin: 0 0 0.2rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
}
.app-header-left p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}
.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.v-pill-date {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.v-btn-icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}
.v-btn-icon-circle .dot-badge {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--danger);
}
.v-btn-quick-actions {
    background: linear-gradient(135deg, #7C4DFF 0%, #6C5CE7 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    font-size: 0.84rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.35);
}

/* ============ Reusable Card Components & Grids ============ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.card-title { margin: 0 0 1rem; font-size: 1.05rem; color: var(--accent); }
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.kpi-label { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .5px; }
.kpi-value { font-size: 1.35rem; font-weight: 700; color: var(--text); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.v-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.v-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.v-card-title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text);
}
.v-card-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}
.v-card-link:hover { text-decoration: underline; }

/* Grid Layouts */
.v-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.v-grid-middle { display: grid; grid-template-columns: 2fr 1.3fr 1.3fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.v-grid-lower { display: grid; grid-template-columns: 2.2fr 1.3fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.v-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

@media (max-width: 1280px) {
    .v-grid-5 { grid-template-columns: repeat(3, 1fr); }
    .v-grid-middle { grid-template-columns: 1fr 1fr; }
    .v-grid-lower { grid-template-columns: 1fr; }
    .v-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .v-grid-5 { grid-template-columns: 1fr; }
    .v-grid-middle { grid-template-columns: 1fr; }
    .v-grid-4 { grid-template-columns: 1fr; }
}

/* KPI Cards */
.v-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
}
.v-kpi-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.v-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.v-icon-box.purple { background: rgba(124, 77, 255, 0.18); color: #9D7BFF; }
.v-icon-box.blue { background: rgba(41, 182, 246, 0.18); color: #29B6F6; }
.v-icon-box.green { background: rgba(0, 230, 118, 0.18); color: #00E676; }
.v-icon-box.orange { background: rgba(255, 179, 0, 0.18); color: #FFB300; }
.v-icon-box.pink { background: rgba(236, 64, 122, 0.18); color: #EC407A; }

.v-kpi-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
}
.v-kpi-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
}
.v-kpi-trend {
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.v-kpi-trend.up { color: var(--success); }
.v-kpi-trend.down { color: var(--success); }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid var(--border);
}
.badge-active, .badge-published_to_client { background: rgba(74,222,128,.12); color: var(--success); border-color: var(--success); }
.badge-paused, .badge-in_review { background: rgba(251,191,36,.12); color: var(--warning); border-color: var(--warning); }
.badge-completed, .badge-approved { background: rgba(56,189,248,.12); color: var(--info); border-color: var(--info); }
.badge-archived, .badge-draft { background: rgba(148,163,184,.15); color: var(--muted); border-color: var(--border); }
.badge-planned, .badge-changes_requested { background: rgba(56,189,248,.12); color: var(--info); border-color: var(--info); }
.badge-client { background: rgba(74,222,128,.12); color: var(--success); }
.badge-internal { background: rgba(148,163,184,.15); color: var(--muted); }

.v-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid transparent;
}
.v-badge.excelente { background: rgba(0, 230, 118, 0.15); color: #00E676; }
.v-badge.bueno { background: rgba(41, 182, 246, 0.15); color: #29B6F6; }
.v-badge.atencion { background: rgba(255, 179, 0, 0.15); color: #FFB300; }
.v-badge.riesgo { background: rgba(255, 82, 82, 0.15); color: #FF5252; }
.v-badge.urgente { background: rgba(255, 82, 82, 0.2); color: #FF5252; }
.v-badge.media { background: rgba(41, 182, 246, 0.2); color: #29B6F6; }

/* ============ Global Table Design System ============ */
table,
.table,
.v-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.86rem;
    color: var(--text);
}

.table-responsive,
.table-wrapper,
.table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    margin-bottom: 1.25rem;
}

table th,
.table th,
.v-table th {
    text-align: left;
    padding: 0.8rem 1rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--muted);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

table th:first-child,
.table th:first-child,
.v-table th:first-child {
    border-top-left-radius: 12px;
}

table th:last-child,
.table th:last-child,
.v-table th:last-child {
    border-top-right-radius: 12px;
}

table td,
.table td,
.v-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    color: #ffffff;
    font-weight: 500;
    vertical-align: middle;
    transition: background 0.15s ease;
}

table tbody tr:last-child td,
.table tbody tr:last-child td,
.v-table tbody tr:last-child td {
    border-bottom: none;
}

table tbody tr,
.table tbody tr,
.v-table tbody tr {
    transition: background 0.15s ease;
}

table tbody tr:hover,
.table tbody tr:hover,
.v-table tbody tr:hover {
    background: var(--surface-hover) !important;
}

/* Striped variant */
.table-striped tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Links inside tables */
table td a,
.table td a,
.v-table td a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

table td a:hover,
.table td a:hover,
.v-table td a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* Muted text & small elements inside tables */
table td .text-muted,
.table td .text-muted,
.v-table td .text-muted,
table td small,
.table td small,
.v-table td small {
    color: var(--muted);
    font-size: 0.78rem;
}

/* Row actions toolbar inside tables */
.row-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: none;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    gap: 0.75rem;
}

.v-company-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.v-company-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    color: #ffffff;
}

/* Activity / Alerts Lists */
.v-list-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.v-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-subtle);
}
.v-list-item:last-child { border-bottom: none; }
.v-list-content {
    flex: 1;
    font-size: 0.82rem;
    color: var(--text);
    line-height: 1.35;
}
.v-list-time {
    font-size: 0.72rem;
    color: var(--text-dim);
    white-space: nowrap;
}

/* Quad Summary Card */
.v-quad-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.85rem;
}
.v-quad-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
}
.v-quad-number {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}
.v-quad-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.v-quad-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text);
}

/* ============ Forms ============ */
.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.85rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field > span { font-size: 0.82rem; color: var(--muted); }
.field-wide { grid-column: 1 / -1; }
.input, input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="number"], select, textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 0.5rem;
    padding: 0.55rem 0.7rem;
    font-size: 0.92rem;
    width: 100%;
}
textarea { resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.checkbox input { width: auto; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }

/* ============ Buttons ============ */
.btn {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    background: #0369a1;
    color: #e0f2fe;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn:hover { background: #075985; text-decoration: none; }
.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.82rem; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: #b91c1c; color: #fee2e2; }
.btn-danger:hover { background: #991b1b; }
.btn-success { background: #15803d; color: #dcfce7; }
.btn-success:hover { background: #166534; }
.btn-link { background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; font-size: 0.9rem; text-decoration: underline; }
.btn-link-danger { background: none; border: none; color: var(--danger); cursor: pointer; padding: 0; font-size: 0.9rem; text-decoration: underline; }
.inline-form { display: inline-flex; gap: 0.4rem; align-items: center; }

/* ============ Alerts ============ */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid;
    font-size: 0.92rem;
}
.alert-success { background: rgba(74,222,128,.1); border-color: var(--success); color: var(--success); }
.alert-error { background: rgba(248,113,113,.1); border-color: var(--danger); color: var(--danger); }
.alert-warning { background: rgba(251,191,36,.1); border-color: var(--warning); color: var(--warning); }
.alert-info { background: rgba(56,189,248,.1); border-color: var(--info); color: var(--info); }
.alert-alta { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.35); color: #F59E0B; }
.alert-critica { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.35); color: #EF4444; }
.alert-normal { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.35); color: #3B82F6; }

/* Anuncios del portal cliente modernos y fluidos */
.v-anuncio-alert {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.9rem 1.1rem;
    border-radius: 14px;
    margin-bottom: 1.1rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(8px);
}
.v-anuncio-alert:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.v-anuncio-prio-alta {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.06) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: var(--text);
}
.v-anuncio-prio-critica {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(185, 28, 28, 0.06) 100%);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: var(--text);
}
.v-anuncio-prio-normal {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(37, 99, 235, 0.06) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--text);
}

.v-anuncio-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.v-anuncio-prio-alta .v-anuncio-icon-wrap {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.v-anuncio-prio-critica .v-anuncio-icon-wrap {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.v-anuncio-prio-normal .v-anuncio-icon-wrap {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.v-anuncio-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-right: 1.8rem;
}
.v-anuncio-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.v-anuncio-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.v-anuncio-type-warn {
    background: rgba(245, 158, 11, 0.22);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.v-anuncio-type-danger {
    background: rgba(239, 68, 68, 0.22);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.v-anuncio-type-success {
    background: rgba(16, 185, 129, 0.22);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}
.v-anuncio-type-accent {
    background: rgba(124, 77, 255, 0.22);
    color: #B388FF;
    border: 1px solid rgba(124, 77, 255, 0.35);
}
.v-anuncio-type-info {
    background: rgba(59, 130, 246, 0.22);
    color: #93C5FD;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.v-anuncio-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
}
.v-anuncio-message {
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--text);
    opacity: 0.95;
}
.v-anuncio-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.55rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
}
.v-anuncio-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.78rem;
    line-height: 1.35;
    background: rgba(0, 0, 0, 0.15);
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.v-anuncio-detail-item strong {
    display: block;
    color: var(--text);
    font-size: 0.76rem;
    margin-bottom: 1px;
}
.v-anuncio-detail-item span {
    color: var(--muted);
    font-size: 0.74rem;
}
.v-anuncio-detail-icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}
.v-anuncio-dates-row {
    margin-top: 0.4rem;
}

.v-anuncio-cta-wrap {
    margin-top: 0.35rem;
}
.v-anuncio-cta-pill {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
}

.v-anuncio-dismiss-form {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    margin: 0;
}
.v-anuncio-dismiss-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}
.v-anuncio-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}


/* ============ Auth alerts ============ */
.v-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
}
.v-alert svg { flex-shrink: 0; margin-top: 0.15rem; }
.v-alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}
.v-alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

/* ============ Tabs / filters / actions ============ */
.tabs {
    display: flex;
    gap: 0.4rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.6rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.55rem 0.95rem;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.tab:hover {
    color: var(--text);
    background: var(--surface-hover);
    text-decoration: none;
}
.tab-active {
    background: linear-gradient(90deg, #7C4DFF 0%, #6C5CE7 100%) !important;
    color: #FFFFFF !important;
    border-color: transparent !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(124, 77, 255, 0.35);
}

[data-theme="light"] .tab {
    background: #FFFFFF;
    color: #475569;
    border-color: #E2E8F0;
}
[data-theme="light"] .tab:hover {
    background: #E2E8F0;
    color: #0F172A;
}
[data-theme="light"] .tab-active {
    background: linear-gradient(90deg, #6C5CE7 0%, #7C4DFF 100%) !important;
    color: #FFFFFF !important;
}

[data-theme="light"] .input,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="date"],
[data-theme="light"] input[type="datetime-local"],
[data-theme="light"] input[type="number"],
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: #FFFFFF !important;
    color: #0F172A !important;
    border-color: #CBD5E1 !important;
}

.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.filter-bar .input { width: auto; min-width: 130px; }
.action-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.25rem; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem 1rem; }
.detail-grid > div { display: flex; flex-direction: column; gap: 0.15rem; }

/* ============ Misc ============ */
.list { list-style: none; padding: 0; margin: 0 0 1rem; }
.list li { padding: 0.45rem 0; border-bottom: 1px solid var(--border); }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.progress { background: var(--bg); border-radius: 9999px; height: 12px; overflow: hidden; margin: 0.5rem 0; }
.progress-bar { background: var(--accent); height: 100%; border-radius: 9999px; }
.progress-over { background: var(--danger); }
.progress-warn { background: var(--warning); }
.chart { width: 100%; height: auto; background: var(--bg); border-radius: 0.5rem; }
.chart-label { fill: var(--muted); font-size: 11px; }

/* ============ Footer (public layout legacy) ============ */
.navbar { display: flex; align-items: center; padding: 1rem 2rem; border-bottom: 1px solid var(--border); }
.brand { color: var(--accent); font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.container { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 2rem; }
.footer { text-align: center; padding: 1rem; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--border); }
.error-page { text-align: center; padding: 4rem 1rem; }
.error-page h1 { font-size: 4rem; color: var(--accent); margin: 0; }
.error-page p { color: var(--muted); margin-bottom: 1.5rem; }

/* ============ V2 · Landing pública ============ */
.public-body { background: var(--bg); min-height: 100vh; }
.public-nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.public-nav-inner { max-width: 1100px; margin: 0 auto; padding: 0.9rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.hero.landing-hero { text-align: center; padding: 3.5rem 1rem 2rem; }
.hero.landing-hero h1 { font-size: 2rem; color: var(--accent); margin: 0 0 0.5rem; }
.hero.landing-hero p { color: var(--muted); margin: 0; }
.section-title { color: var(--accent); margin: 2rem 0 1rem; font-size: 1.3rem; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.plan-card { background: var(--surface); border: 1px solid var(--border); border-radius: 0.9rem; padding: 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; }
.plan-card h3 { margin: 0; }
.plan-price { font-size: 1.5rem; font-weight: 700; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.75rem; }
.service-card { background: var(--bg); border: 1px solid var(--border); border-radius: 0.6rem; padding: 0.85rem; display: flex; flex-direction: column; gap: 0.3rem; cursor: pointer; }
.service-card:hover { border-color: var(--accent); }
.service-name { font-weight: 600; }
.narrow { max-width: 640px; }
.badge-warn { background: rgba(251,191,36,.12); color: var(--warning); border-color: var(--warning); }
.badge-score { background: rgba(56,189,248,.12); color: var(--info); border-color: var(--info); }

/* ============ V2 · Wizard del formulario ============ */
.form-wizard { max-width: 860px; }
.wizard-head { text-align: center; margin-bottom: 1rem; }
.wizard-steps { list-style: none; display: flex; gap: 0.4rem; flex-wrap: wrap; padding: 0; margin: 0 0 1.25rem; justify-content: center; }
.wizard-step-label { padding: 0.35rem 0.8rem; border: 1px solid var(--border); border-radius: 9999px; color: var(--muted); font-size: 0.8rem; cursor: default; }
.wizard-step-label.active { background: var(--accent); color: #082f49; border-color: var(--accent); font-weight: 600; }
.wizard-step { margin-bottom: 1.5rem; }
.wizard-nav { display: flex; gap: 0.75rem; align-items: center; justify-content: flex-end; }
.field-missing { outline: 2px solid var(--danger); border-radius: 0.4rem; padding: 0.35rem; }
.field-error { color: var(--danger); font-size: 0.8rem; }
.field-hint { font-size: 0.75rem; color: var(--muted); opacity: 0.85; }
.field-invalid input,
.field-invalid select,
.field-invalid textarea { border-color: var(--danger); }
.field-invalid > span:first-child { color: var(--danger); }
.input-sm { width: auto; min-width: 120px; padding: 0.35rem 0.6rem; }

/* ============ Página de registro (public) ============ */
#register-page .card {
    padding: 2rem;
    border-radius: 20px;
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}
#register-page .card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #7C4DFF, #00E5FF);
}
.reg-head { margin-bottom: 1.25rem; }
.reg-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #cfc2ff;
    background: rgba(124, 77, 255, 0.14);
    border: 1px solid rgba(124, 77, 255, 0.4);
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.9rem;
}
.reg-title { font-size: 1.5rem; color: var(--text); margin: 0 0 0.35rem; }
.reg-sub { color: var(--muted); font-size: 0.92rem; margin: 0 0 1.4rem; line-height: 1.5; }
.reg-login { text-align: center; margin: 0; }

#register-page .form-grid { gap: 1.1rem; }
#register-page .field { gap: 0.45rem; }
#register-page .field > span { font-weight: 600; color: var(--text); }
#register-page .field input[type="text"],
#register-page .field input[type="email"] {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#register-page .field select {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 2.2rem 0.7rem 0.85rem;
    font-size: 0.95rem;
    color: var(--text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238E92B2' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#register-page .field select option { background: var(--surface); color: var(--text); }
#register-page .field input:focus,
#register-page .field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.18);
}
#register-page .field input::placeholder { color: var(--muted); opacity: 0.75; }
#register-page .field-error { margin-top: 0.15rem; }
#register-page .field-hint { margin-top: -0.05rem; line-height: 1.45; }

/* Selector de país + teléfono */
.phone-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.phone-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.18);
}
.phone-country {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.92rem;
    padding: 0.7rem 1.1rem 0.7rem 0.75rem;
    min-width: 132px;
    width: auto;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238E92B2' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}
.phone-country option { background: var(--surface); color: var(--text); }
.phone-code {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #c9b8ff;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 0 0.55rem;
    white-space: nowrap;
    user-select: none;
}
.phone-wrap input[type="tel"] {
    flex: 1;
    min-width: 90px;
    background: transparent;
    border: none;
    padding: 0.7rem 0.85rem;
    font-size: 1rem;
    letter-spacing: 0.3px;
    color: var(--text);
    outline: none;
}
.phone-wrap input::placeholder { color: var(--muted); opacity: 0.75; }

/* Caja de consentimientos */
.consent-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
#register-page .checkbox { gap: 0.6rem; font-size: 0.92rem; line-height: 1.4; }
#register-page .checkbox input { accent-color: #7C4DFF; width: 17px; height: 17px; flex-shrink: 0; }

/* Botón principal */
#register-page .btn-block {
    background: linear-gradient(90deg, #7C4DFF, #5B3DFF);
    border: none;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(124, 77, 255, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
#register-page .btn-block:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 14px 30px rgba(124, 77, 255, 0.45);
}
#register-page .btn-block:active { transform: translateY(0); }

/* Estados inválidos */
#register-page .field-invalid input,
#register-page .field-invalid .phone-wrap { border-color: var(--danger); }
#register-page .field-invalid .phone-wrap:focus-within { box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.18); }

@media (max-width: 520px) {
    #register-page .card { padding: 1.25rem; }
    .phone-country { min-width: 110px; }
}

/* ============ Página de privacidad (public) ============ */
#privacy-page .privacy-card {
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
    line-height: 1.65;
}
#privacy-page .privacy-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #7C4DFF, #00E5FF);
}
.privacy-head { margin-bottom: 1.25rem; }
#privacy-page h2 {
    font-size: 1.05rem;
    color: var(--accent);
    margin: 1.6rem 0 0.5rem;
}
#privacy-page p { margin: 0.5rem 0; color: var(--text); }
#privacy-page ul { margin: 0.5rem 0 0.5rem 1.1rem; padding: 0; }
#privacy-page li { margin: 0.3rem 0; color: var(--text); }
#privacy-page a { color: #9f8cff; }
#privacy-page a:hover { text-decoration: underline; }
.privacy-foot {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted) !important;
    font-size: 0.9rem;
}
@media (max-width: 520px) {
    #privacy-page .privacy-card { padding: 1.25rem; }
}

/* ============ Formulario de diagnóstico (wizard público) ============ */
.form-wizard { max-width: 920px; }
.wizard-head { margin-bottom: 1.4rem; }
.wizard-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.wizard-head-copy { flex: 1; min-width: 260px; }
.form-wizard #capture-form {
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 77, 255, 0.06);
    position: relative;
    overflow: hidden;
}
.form-wizard #capture-form::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, #7C4DFF, #00E5FF);
}

/* Píldora de estado de guardado */
.wz-save-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    white-space: nowrap;
}
.wz-save-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.wz-save-pill[data-state="saving"] { color: var(--warning); border-color: rgba(251, 191, 36, 0.4); }
.wz-save-pill[data-state="saving"] .wz-save-dot { background: var(--warning); animation: wzPulse 1s ease-in-out infinite; }
.wz-save-pill[data-state="saved"] { color: #34d399; border-color: rgba(52, 211, 153, 0.4); }
.wz-save-pill[data-state="saved"] .wz-save-dot { background: #34d399; }
.wz-save-pill[data-state="error"] { color: var(--danger); border-color: rgba(255, 82, 82, 0.5); }
.wz-save-pill[data-state="error"] .wz-save-dot { background: var(--danger); }
@keyframes wzPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Barra de progreso */
.wz-progress { margin: 1.2rem 0 1rem; }
.wz-progress-track {
    height: 8px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
}
.wz-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #7C4DFF, #00E5FF);
    box-shadow: 0 0 12px rgba(124, 77, 255, 0.6);
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.wz-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: var(--muted);
}
.wz-progress-meta #wz-pct { font-weight: 700; color: var(--accent); }

/* Chips de pasos */
.wizard-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.wizard-step-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem 0.35rem 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.wizard-step-label:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.wz-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    transition: all 0.2s ease;
}
.wizard-step-label.active {
    background: linear-gradient(90deg, #7C4DFF, #5B3DFF);
    color: #fff;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(124, 77, 255, 0.35);
}
.wizard-step-label.active .wz-num { background: rgba(255, 255, 255, 0.18); border-color: transparent; color: #fff; }
.wizard-step-label.done { border-color: rgba(52, 211, 153, 0.4); color: #34d399; }
.wizard-step-label.done .wz-num { background: rgba(52, 211, 153, 0.15); border-color: transparent; color: #34d399; }
.wizard-step-label.has-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.15); }
.wizard-step-label .wz-name { white-space: nowrap; }
@media (max-width: 640px) {
    .wizard-step-label .wz-name { display: none; }
    .wizard-step-label { padding: 0.35rem; }
}

/* Cabecera del paso */
.wz-step-head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.4rem; }
.wz-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.2), rgba(0, 229, 255, 0.12));
    border: 1px solid rgba(124, 77, 255, 0.35);
    color: #cfc2ff;
    font-size: 1.05rem;
    font-weight: 800;
    flex-shrink: 0;
}
.wz-step-kicker { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin-bottom: 0.15rem; }
.wz-step-title { margin: 0; font-size: 1.35rem; color: var(--text); line-height: 1.2; }

/* Título de bloque */
.wz-block-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    margin: 1.6rem 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
}
.wz-block-dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #7C4DFF, #00E5FF); flex-shrink: 0; }

/* Paso: animación de entrada */
.wizard-step { margin-bottom: 1.5rem; }
.wz-anim { animation: wzIn 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes wzIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Grid y campos */
.form-wizard .form-grid { gap: 1.15rem; }
.form-wizard .field { gap: 0.5rem; }
.form-wizard .field[data-type="tel"] { grid-column: 1 / -1; }
.form-wizard .field[data-type="file"] { grid-column: 1 / -1; }
.form-wizard .field > span { font-weight: 600; color: var(--text); }
.form-wizard .field > span .req { color: var(--danger); font-style: normal; }
.form-wizard .field input[type="text"],
.form-wizard .field input[type="email"],
.form-wizard .field input[type="tel"],
.form-wizard .field input[type="url"],
.form-wizard .field input[type="number"],
.form-wizard .field select,
.form-wizard .field textarea {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.78rem 0.95rem;
    font-size: 0.95rem;
    color: var(--text);
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.form-wizard .field input:hover, .form-wizard .field select:hover, .form-wizard .field textarea:hover { border-color: #2f335a; }
.form-wizard .field select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238E92B2' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    cursor: pointer;
}
.form-wizard .field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.form-wizard .field option { background: var(--surface); color: var(--text); }
.form-wizard .field input:focus,
.form-wizard .field select:focus,
.form-wizard .field textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #1b1e3d;
    box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.18);
}
.form-wizard .field input::placeholder,
.form-wizard .field textarea::placeholder { color: var(--muted); opacity: 0.7; }
.form-wizard .field-hint { font-size: 0.75rem; color: var(--muted); opacity: 0.85; line-height: 1.45; }
.form-wizard .field-error { margin-top: 0.2rem; color: var(--danger); font-size: 0.8rem; display: flex; align-items: center; gap: 0.3rem; }
.form-wizard .field-error::before { content: '▲'; font-size: 0.55rem; }
.form-wizard .field-invalid input,
.form-wizard .field-invalid select,
.form-wizard .field-invalid textarea,
.form-wizard .field-invalid .phone-wrap { border-color: var(--danger); }

/* Selector de país + teléfono */
.form-wizard .phone-wrap {
    display: flex;
    align-items: stretch;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.form-wizard .phone-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.18);
}
.form-wizard .phone-wrap .phone-country {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.92rem;
    padding: 0.78rem 1.2rem 0.78rem 0.85rem;
    min-width: 138px;
    width: auto;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238E92B2' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
}
.form-wizard .phone-wrap .phone-country option { background: var(--surface); color: var(--text); }
.form-wizard .phone-wrap .phone-code {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #c9b8ff;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 0 0.6rem;
    white-space: nowrap;
    user-select: none;
}
.form-wizard .phone-wrap input[type="tel"] {
    flex: 1;
    min-width: 90px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.78rem 0.95rem;
    font-size: 1rem;
    letter-spacing: 0.3px;
    color: var(--text);
    outline: none;
}

/* Tarjetas de check */
.form-wizard .check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; }
.form-wizard .check-grid .check-card {
    position: relative;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
    gap: 0.55rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.form-wizard .check-grid .check-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(124, 77, 255, 0.12); }
.form-wizard .check-grid .check-card:has(input:checked) {
    border-color: var(--accent);
    background: rgba(124, 77, 255, 0.14);
    box-shadow: 0 0 0 1px rgba(124, 77, 255, 0.4);
}
.form-wizard .check-grid .check-card input { accent-color: #7C4DFF; width: 17px; height: 17px; flex-shrink: 0; }

/* Subida de archivos */
.form-wizard .file-field { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.form-wizard .file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.form-wizard .file-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-2);
    border: 1.5px dashed var(--border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.form-wizard .file-label:hover { border-color: var(--accent); background: rgba(124, 77, 255, 0.08); transform: translateY(-1px); }
.form-wizard .file-name { font-size: 0.78rem; color: var(--muted); word-break: break-all; }

/* Navegación */
.wizard-nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.wz-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.72rem 1.5rem;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease;
}
.wz-nav-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.wz-nav-primary {
    background: linear-gradient(90deg, #7C4DFF, #5B3DFF);
    color: #fff;
    border: none;
    box-shadow: 0 10px 24px rgba(124, 77, 255, 0.35);
}
.wz-nav-primary:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 14px 30px rgba(124, 77, 255, 0.45); }
.wz-nav-primary:active { transform: translateY(0); }
.wz-nav-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.wz-nav-ghost:hover { border-color: var(--accent); color: var(--accent); }
.wz-nav-hint { flex: 1; font-size: 0.75rem; color: var(--muted); }
.wz-nav-submit { background: linear-gradient(90deg, #10b981, #059669); box-shadow: 0 10px 24px rgba(16, 185, 129, 0.35); }
.wz-nav-submit:hover { filter: brightness(1.08); box-shadow: 0 14px 30px rgba(16, 185, 129, 0.45); }
@media (max-width: 640px) {
    .wizard-nav { position: sticky; bottom: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0.8rem; z-index: 40; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3); }
    .wz-nav-hint { display: none; }
    .wz-nav-btn { flex: 1; justify-content: center; }
}

/* Pie del formulario */
.wizard-foot {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
}
.wizard-foot svg { flex-shrink: 0; margin-top: 2px; color: var(--success); }
.wizard-foot a { color: #9f8cff; }
.wizard-foot a:hover { text-decoration: underline; }

@media (max-width: 520px) {
    .form-wizard #capture-form { padding: 1.3rem; }
    .form-wizard .phone-wrap .phone-country { min-width: 112px; }
    .wz-step-title { font-size: 1.15rem; }
}

/* ===== Mejoras visuales del wizard de diagnóstico ===== */
.form-wizard .field textarea { grid-column: 1 / -1; }

.form-wizard .field > span:not(.field-error) {
    font-size: 0.85rem;
    letter-spacing: 0.25px;
}
.form-wizard .field > span .req { color: #ff5c8a; font-weight: 700; }

.form-wizard .field input[type="text"],
.form-wizard .field input[type="email"],
.form-wizard .field input[type="tel"],
.form-wizard .field input[type="url"],
.form-wizard .field input[type="number"],
.form-wizard .field select,
.form-wizard .field textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    caret-color: #7C4DFF;
}
.form-wizard .field input:hover,
.form-wizard .field select:hover,
.form-wizard .field textarea:hover { border-color: rgba(124, 77, 255, 0.45); }
.form-wizard .field input:focus,
.form-wizard .field select:focus,
.form-wizard .field textarea:focus {
    outline: none;
    border-color: #7C4DFF;
    background: rgba(124, 77, 255, 0.07);
    box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.16);
}
.form-wizard .field textarea { min-height: 122px; line-height: 1.55; }
.form-wizard .field input::placeholder,
.form-wizard .field textarea::placeholder { color: #6b6f92; }
.form-wizard .field select option:first-child { color: var(--muted); }

/* Bloques (secciones) más marcados */
.form-wizard .wz-block-title {
    font-size: 0.78rem;
    letter-spacing: 1.4px;
    color: #cfc2ff;
    padding: 0.55rem 0 0.7rem 0.9rem;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid #7C4DFF;
    margin: 1.7rem 0 1.1rem;
}
.form-wizard .wz-block-dot { display: none; }
.success-center { text-align: center; }
.code-badge { color: var(--accent); font-size: 1.2rem; }
.snapshot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.5rem 1rem; }
.snapshot-grid > div { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.85rem; }
.brief-block { border: 1px solid var(--border); border-radius: 0.6rem; padding: 1rem; margin-bottom: 0.9rem; background: var(--bg); }
.brief-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.price-big { font-size: 2rem; font-weight: 700; color: var(--success); margin: 0; }
.table-total { background: var(--surface-2); }
.check-inline { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ============ NÚCLEO ============ */
.sidebar-section { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 0.6rem 0.85rem 0.15rem; }
.work-item { padding: 1rem; }
.work-item-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.work-item-title { margin: 0.25rem 0; font-size: 1.05rem; }
.badge-kind { background: rgba(56,189,248,.12); color: var(--info); border-color: var(--info); }
.badge-priority-urgente, .badge-priority-critica { background: rgba(248,113,113,.15); color: var(--danger); border-color: var(--danger); }
.badge-priority-alta { background: rgba(251,191,36,.12); color: var(--warning); border-color: var(--warning); }
.badge-priority-normal { background: rgba(148,163,184,.15); color: var(--muted); }
.badge-priority-baja { background: rgba(148,163,184,.15); color: var(--muted); }
.badge-new, .badge-pending, .badge-open { background: rgba(56,189,248,.12); color: var(--info); border-color: var(--info); }
.badge-working, .badge-in_progress { background: rgba(251,191,36,.12); color: var(--warning); border-color: var(--warning); }
.badge-in_review, .badge-in_review { background: rgba(251,191,36,.12); color: var(--warning); border-color: var(--warning); }
.badge-done, .badge-approved, .badge-won, .badge-paid, .badge-confirmed { background: rgba(74,222,128,.12); color: var(--success); border-color: var(--success); }
.badge-cancelled, .badge-lost, .badge-changes_requested { background: rgba(148,163,184,.15); color: var(--muted); }
.notification-unread { border-left: 3px solid var(--accent); }
.notification-critical { border-left: 3px solid var(--danger); }
.notification-message { margin: 0.35rem 0; }
.text-danger { color: var(--danger) !important; }
.new-task { position: relative; display: inline-block; }
.new-task summary { list-style: none; cursor: pointer; }
.new-task form { position: absolute; right: 0; top: 2.2rem; width: 460px; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.comment { border-left: 2px solid var(--border); padding: 0.4rem 0.75rem; margin-bottom: 0.6rem; }
.funnel { display: flex; flex-direction: column; gap: 0.6rem; }
.funnel-row { display: flex; align-items: center; gap: 0.75rem; }
.funnel-label { min-width: 110px; font-size: 0.85rem; }
.funnel-row .progress { flex: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-cell { background: var(--bg); border: 1px solid var(--border); min-height: 84px; padding: 0.35rem; border-radius: 4px; }
.cal-empty { border-color: transparent; background: transparent; }
.cal-head-cell { text-align: center; font-size: 0.75rem; color: var(--muted); min-height: 0; }
.cal-day-num { font-weight: 600; font-size: 0.8rem; margin-bottom: 0.25rem; }
.cal-event { font-size: 0.72rem; padding: 0.15rem 0.35rem; margin-bottom: 0.2rem; border-radius: 3px; background: var(--surface-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ COMERCIAL ============ */
.crm-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.75rem; align-items: start; overflow-x: auto; }
.crm-column { background: var(--surface); border: 1px solid var(--border); border-radius: 0.6rem; padding: 0.75rem; min-height: 300px; }
.crm-column-title { margin: 0 0 0.6rem; font-size: 0.85rem; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }
.crm-card { background: var(--bg); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.7rem; margin-bottom: 0.6rem; }
.crm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; margin-bottom: 0.3rem; }
.crm-card-head strong { font-size: 0.9rem; }
.crm-move { margin-top: 0.5rem; }

/* ============ COMUNICACIONES ============ */
.comms-layout { display: flex; gap: 1rem; align-items: flex-start; }
.comms-folders { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.comms-folder { padding: 0.5rem 0.8rem; border-radius: 0.4rem; color: var(--muted); font-size: 0.9rem; display: flex; justify-content: space-between; }
.comms-folder:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.comms-folder.active { background: var(--surface-2); color: var(--accent); }
.comms-list { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.comms-item { background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.7rem 0.9rem; }
.comms-item.unread { border-left: 3px solid var(--accent); }
.comms-item-head { display: flex; align-items: center; gap: 0.5rem; }
.comms-detail { display: grid; grid-template-columns: 1fr 340px; gap: 1rem; align-items: start; }
.comms-messages { background: var(--surface); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1rem; }
.comms-panel { display: flex; flex-direction: column; gap: 1rem; }
.comms-msg { border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.6rem 0.8rem; margin-bottom: 0.5rem; background: var(--bg); }
.comms-msg.client { border-left: 3px solid var(--accent); }
.comms-msg.internal { border-left: 3px solid var(--success); }
.comms-msg-head { display: flex; align-items: center; gap: 0.6rem; }
.comms-client { display: grid; grid-template-columns: 260px 1fr; gap: 1rem; align-items: start; }
.comms-client-main { background: var(--surface); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1rem; }

/* ============ Comprehensive Responsive System ============ */

/* Desktop & Laptops (< 1280px) */
@media (max-width: 1280px) {
    .v-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    .v-grid-middle {
        grid-template-columns: 1fr 1fr;
    }
    .v-grid-lower {
        grid-template-columns: 1fr;
    }
    .v-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .comms-detail {
        grid-template-columns: 1fr;
    }
}

/* Tablets & Small Laptops (< 992px) */
@media (max-width: 992px) {
    .app-shell {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .sidebar-nav {
        max-height: 240px;
        overflow-y: auto;
    }
    .app-main {
        padding: 1.25rem 1.25rem 2rem;
        max-width: 100%;
    }
    .v-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .comms-layout,
    .comms-client {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
    .comms-folders {
        width: 100%;
    }
}

/* Mobile Devices (< 768px) */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }
    .app-header-left h1 {
        font-size: 1.35rem;
    }
    .header-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .v-pill-date,
    .v-btn-quick-actions {
        font-size: 0.78rem;
        padding: 0.45rem 0.75rem;
    }
    .v-grid-5,
    .v-grid-middle,
    .v-grid-lower,
    .v-grid-4,
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    .v-card {
        padding: 1rem;
        border-radius: 12px;
    }
    .v-kpi-value {
        font-size: 1.25rem;
    }
    .v-quad-number {
        font-size: 1.65rem;
    }

    /* Table horizontal scroll container guarantee */
    table,
    .table,
    .v-table {
        min-width: 580px;
    }
    .card table,
    .v-card table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* Modal / Form elements on mobile */
    .form-grid,
    .snapshot-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Screens (< 480px) */
@media (max-width: 480px) {
    .app-main {
        padding: 1rem 0.75rem 1.5rem;
    }
    .sidebar-brand {
        padding: 1rem;
    }
    .v-user-profile-card {
        padding: 0.5rem;
    }
    .v-quad-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
}


/* ===== FullCalendar (theme-matched) ===== */
.fc {
    --fc-border-color: var(--border);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: var(--surface-2);
    --fc-neutral-text-color: var(--muted);
    --fc-today-bg-color: rgba(124, 77, 255, 0.10);
    --fc-event-border-color: transparent;
    --fc-event-text-color: #ffffff;
    --fc-button-text-color: var(--text);
    --fc-button-bg-color: var(--surface-2);
    --fc-button-border-color: var(--border);
    --fc-button-hover-bg-color: var(--surface-hover);
    --fc-button-hover-border-color: var(--border);
    --fc-button-active-bg-color: var(--accent);
    --fc-button-active-border-color: var(--accent);
    --fc-list-event-hover-bg-color: var(--surface-hover);
    --fc-now-indicator-color: var(--accent);
    --fc-highlight-color: rgba(124, 77, 255, 0.08);
    --fc-event-bg-color: var(--accent);
    font-size: 0.85rem;
}
.fc .fc-toolbar-title { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.fc .fc-button { border-radius: 8px; font-weight: 600; text-transform: none; box-shadow: none; }
.fc .fc-button:focus { box-shadow: none; }
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active { background: var(--accent); border-color: var(--accent); }
.fc .fc-col-header-cell-cushion { color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.5px; padding: 8px 4px; }
.fc .fc-daygrid-day-number, .fc .fc-timegrid-slot-label-cushion, .fc .fc-list-day-cushion { color: var(--muted); }
.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number { color: var(--accent); font-weight: 800; }
.fc .fc-daygrid-event { border-radius: 6px; padding: 2px 6px; font-size: 0.75rem; cursor: pointer; }
.fc .fc-timegrid-event { border-radius: 6px; cursor: pointer; }
.fc .fc-event:hover { opacity: 0.9; box-shadow: 0 2px 10px rgba(0,0,0,0.25); }
.fc .fc-list-day-cushion { background: var(--surface-2); }
.fc .fc-list-event { color: var(--text); }
.fc .fc-list-event-dot { border-color: transparent; }
.fc .fc-list-empty { color: var(--muted); }
.fc th, .fc td { border-color: var(--border); }
.fc .fc-timegrid-now-indicator-line { border-color: var(--accent); }
.fc .fc-timegrid-now-indicator-arrow { border-color: var(--accent); border-top-color: var(--accent); }
.fc .fc-popover { background: var(--surface-2); border-color: var(--border); border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
.fc .fc-popover-title { color: var(--text); }

/* ===== Calendario: modal de detalle ===== */
.fc-modal {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0;
    width: min(480px, 92vw);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.fc-modal::backdrop { background: rgba(5, 6, 12, 0.6); backdrop-filter: blur(2px); }
.fc-modal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    margin: 0;
}
.fc-modal-bar strong { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.fc-modal-bar .btn-link { font-size: 1rem; }
.fc-detail { padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.fc-detail-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.85rem; }
.fc-detail-row span { color: var(--muted); flex-shrink: 0; }
.fc-detail-row strong { text-align: right; word-break: break-word; }
.fc-modal-actions { padding: 0.85rem 1rem; border-top: 1px solid var(--border); display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.fc-sync { display: flex; gap: 0.4rem; align-items: center; width: 100%; margin-top: 0.3rem; }
.fc-sync input { flex: 1; }
#fc-legend { display: inline-flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; }

/* ===== FullCalendar (theme-matched) ===== */
.fc {
    --fc-border-color: var(--border);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: var(--surface-2);
    --fc-neutral-text-color: var(--muted);
    --fc-today-bg-color: rgba(124, 77, 255, 0.10);
    --fc-event-border-color: transparent;
    --fc-event-text-color: #ffffff;
    --fc-button-text-color: var(--text);
    --fc-button-bg-color: var(--surface-2);
    --fc-button-border-color: var(--border);
    --fc-button-hover-bg-color: var(--surface-hover);
    --fc-button-hover-border-color: var(--border);
    --fc-button-active-bg-color: var(--accent);
    --fc-button-active-border-color: var(--accent);
    --fc-list-event-hover-bg-color: var(--surface-hover);
    --fc-now-indicator-color: var(--accent);
    --fc-highlight-color: rgba(124, 77, 255, 0.08);
    --fc-event-bg-color: var(--accent);
    font-size: 0.85rem;
}
.fc .fc-toolbar-title { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.fc .fc-button { border-radius: 8px; font-weight: 600; text-transform: none; box-shadow: none; }
.fc .fc-button:focus { box-shadow: none; }
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active { background: var(--accent); border-color: var(--accent); }
.fc .fc-col-header-cell-cushion { color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.5px; padding: 8px 4px; }
.fc .fc-daygrid-day-number, .fc .fc-timegrid-slot-label-cushion, .fc .fc-list-day-cushion { color: var(--muted); }
.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number { color: var(--accent); font-weight: 800; }
.fc .fc-daygrid-event { border-radius: 6px; padding: 2px 6px; font-size: 0.75rem; cursor: pointer; }
.fc .fc-timegrid-event { border-radius: 6px; cursor: pointer; }
.fc .fc-event:hover { opacity: 0.9; box-shadow: 0 2px 10px rgba(0,0,0,0.25); }
.fc .fc-list-day-cushion { background: var(--surface-2); }
.fc .fc-list-event { color: var(--text); }
.fc .fc-list-event-dot { border-color: transparent; }
.fc .fc-list-empty { color: var(--muted); }
.fc th, .fc td { border-color: var(--border); }
.fc .fc-timegrid-now-indicator-line { border-color: var(--accent); }
.fc .fc-timegrid-now-indicator-arrow { border-color: var(--accent); border-top-color: var(--accent); }
.fc .fc-popover { background: var(--surface-2); border-color: var(--border); border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
.fc .fc-popover-title { color: var(--text); }

/* ===== Calendario: modal de detalle ===== */
.fc-modal {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0;
    width: min(480px, 92vw);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.fc-modal::backdrop { background: rgba(5, 6, 12, 0.6); backdrop-filter: blur(2px); }
.fc-modal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    margin: 0;
}
.fc-modal-bar strong { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.fc-modal-bar .btn-link { font-size: 1rem; }
.fc-detail { padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.fc-detail-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.85rem; }
.fc-detail-row span { color: var(--muted); flex-shrink: 0; }
.fc-detail-row strong { text-align: right; word-break: break-word; }
.fc-modal-actions { padding: 0.85rem 1rem; border-top: 1px solid var(--border); display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.fc-sync { display: flex; gap: 0.4rem; align-items: center; width: 100%; margin-top: 0.3rem; }
.fc-sync input { flex: 1; }
#fc-legend { display: inline-flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; }

/* ===== DataTables (theme-matched) ===== */
.dataTables_wrapper {
    color: var(--text);
    font-size: 0.85rem;
    width: 100%;
}
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 0.75rem;
}
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    margin-left: 0.4rem;
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.dataTables_wrapper .dt-search-label { color: var(--muted); }
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_info { color: var(--muted); }
.dataTables_wrapper .dataTables_info { padding: 0.75rem 0 0.25rem; }
.dt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.dt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.dataTables_wrapper .dataTables_paginate { padding-top: 0; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted) !important;
    padding: 0.35rem 0.7rem;
    margin: 0 0.15rem;
    font-size: 0.82rem;
    cursor: pointer;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--surface-hover);
    color: #fff !important;
    border-color: var(--accent);
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff !important;
    font-weight: 700;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.4;
    cursor: default;
}
.dataTables_wrapper table.dataTable {
    border-collapse: collapse;
}
table.dataTable > thead > tr > th {
    border-bottom: 2px solid var(--border);
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}
table.dataTable > thead > tr > th.sorting,
table.dataTable > thead > tr > th.sorting_asc,
table.dataTable > thead > tr > th.sorting_desc {
    cursor: pointer;
}
table.dataTable > thead .sorting:after,
table.dataTable > thead .sorting_asc:after,
table.dataTable > thead .sorting_desc:after {
    color: var(--accent);
    opacity: 0.8;
}
table.dataTable > tbody > tr:hover {
    background: var(--surface-hover) !important;
}
.dataTables_wrapper .dataTables_empty { color: var(--muted); }

/* ===== Landing: bloque Proceso (4 pasos) ===== */
.lp-process {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.lp-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
}
.lp-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}
.lp-step-body { min-width: 0; }
.lp-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 9999px;
    background: var(--accent);
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.lp-step-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.25rem;
}
.lp-step-text {
    font-size: 0.7rem;
    color: var(--muted);
    margin: 0;
}

/* ===== Landing VELTHORIAN (fiel al diseño de referencia) ===== */
.lp-2026 { --lp-purple:#6d28d9; --lp-light:#8b5cf6; --lp-dark:#4c1d95; --lp-bg:#0b0f19; --lp-card:#111827; --lp-max: 75rem; }
.lp-2026 { background: var(--lp-bg); color: #fff; font-family: 'Inter', system-ui, -apple-system, sans-serif; }
.lp-2026 a { text-decoration: none; color: inherit; }
.lp-2026 .gradient-text { background: linear-gradient(to right, #8b5cf6, #3b82f6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Nav */
.lp-nav { display: flex; align-items: center; justify-content: space-between; max-width: var(--lp-max); margin: 0 auto; padding: 1rem 1.5rem; }
.lp-nav-brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: inherit; }
.lp-nav-logo { width: 36px; height: 36px; background: rgba(109,40,217,0.15); border: 1px solid rgba(139,92,246,0.3); border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 2px; }
.lp-nav-logo-img { width: 100%; height: 100%; object-fit: contain; }
.lp-nav-name { font-weight: 700; letter-spacing: 0.05em; line-height: 1.1; }
.lp-nav-name small { display: block; font-size: 10px; color: #9ca3af; font-weight: 400; letter-spacing: 0.1em; }
.lp-nav-links { display: none; gap: 2rem; font-size: 0.875rem; color: #d1d5db; }
.lp-nav-actions { display: none; gap: 1rem; align-items: center; font-size: 0.875rem; }
@media (min-width: 768px) { .lp-nav-links, .lp-nav-actions { display: flex; } }

/* Botones */
.lp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; background: var(--lp-purple); color: #fff; border-radius: 0.75rem; padding: 0.75rem 1.5rem; font-weight: 500; transition: all .25s ease; border: 0; cursor: pointer; text-decoration: none; }
.lp-btn:hover { background: var(--lp-light); transform: translateY(-1px); box-shadow: 0 10px 25px -5px rgba(109,40,217,.4); }
.lp-btn-ghost { background: transparent; border: 1px solid #374151; }
.lp-btn-ghost:hover { background: #1f2937; }

/* ==========================================================================
   HERO 2026 - FONDO PANORÁMICO INTEGRADO (PC A LA DERECHA DETRÁS DE TODO)
   ========================================================================== */
.lp-hero {
    position: relative;
    padding: 0 0 1.5rem;
    background-color: #030408;
    overflow: hidden;
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Capa de fondo con la imagen de la PC a la derecha */
.lp-hero-bg-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: #030408;
    background-image: url('../img/hero-bg.jpg');
    background-position: right center;
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
}

/* Overlay para garantizar negro sólido en el texto izquierdo y transición suave a la PC */
.lp-hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #030408 0%, rgba(3, 4, 8, 0.95) 44%, rgba(3, 4, 8, 0.25) 70%, rgba(3, 4, 8, 0) 100%),
                linear-gradient(180deg, rgba(3, 4, 8, 0.5) 0%, transparent 20%, transparent 80%, #030408 100%);
    pointer-events: none;
}

/* Nav por encima del fondo */
.lp-nav {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--lp-max);
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    width: 100%;
}

/* Hero inner por encima del fondo */
.lp-hero-inner {
    position: relative;
    z-index: 20;
    max-width: var(--lp-max);
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 2.5rem;
    flex: 1;
}

@media (min-width: 1024px) {
    .lp-hero-inner {
        flex-direction: row;
        align-items: center;
        padding-top: 2.5rem;
        padding-bottom: 3.5rem;
    }
}

/* Columna de texto izquierda */
.lp-hero-copy {
    width: 100%;
    position: relative;
    z-index: 20;
}

@media (min-width: 1024px) {
    .lp-hero-copy {
        width: 50%;
        max-width: 44rem;
    }
}

.lp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    border: 1px solid rgba(168, 85, 247, 0.35);
    background: rgba(124, 58, 237, 0.15);
    color: #c084fc;
    font-size: 0.725rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

.lp-h1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 1.25rem;
    color: #ffffff;
    letter-spacing: -0.025em;
}

@media (min-width: 640px) {
    .lp-h1 {
        font-size: 3.1rem;
    }
}

@media (min-width: 1200px) {
    .lp-h1 {
        font-size: 3.45rem;
    }
}

.lp-h1 span, .lp-h1 .lp-h1-accent {
    display: inline-block;
    color: #8b5cf6;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lp-lead {
    color: #9ca3af;
    font-size: 1.05rem;
    line-height: 1.65;
    margin: 0 0 2rem;
    max-width: 36rem;
}

.lp-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.lp-hero-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px -4px rgba(124, 58, 237, 0.5);
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

.lp-hero-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -4px rgba(124, 58, 237, 0.7);
}

.lp-hero-btn-primary svg {
    transition: transform 0.2s ease;
}

.lp-hero-btn-primary:hover svg {
    transform: translateX(3px);
}

.lp-hero-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 1.6rem;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.lp-hero-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.lp-hero-play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.lp-hero-play-icon svg {
    margin-left: 2px;
}

/* Micro-checks row */
.lp-hero-checks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.lp-hero-check-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #9ca3af;
    font-size: 0.825rem;
}

/* 4 Feature Pillars */
.lp-hero-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 640px) {
    .lp-hero-features {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
}

.lp-hero-feature-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.lp-hero-feature-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a855f7;
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.5));
}

.lp-hero-feature-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.88rem;
    margin: 0;
}

.lp-hero-feature-desc {
    color: #9ca3af;
    font-size: 0.78rem;
    line-height: 1.35;
    margin: 0;
}

/* Columna derecha: espacio abierto que deja ver la PC del fondo */
.lp-hero-visual {
    width: 100%;
    position: relative;
    z-index: 20;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

@media (min-width: 1024px) {
    .lp-hero-visual {
        width: 50%;
        min-height: 28rem;
        padding-left: 2rem;
    }
}

.lp-hero-badge-float {
    position: relative;
    z-index: 25;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(8, 11, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(168, 85, 247, 0.45);
    color: #ffffff;
    padding: 0.45rem 0.95rem;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 15px rgba(124, 58, 237, 0.25);
    margin-top: auto;
}

@media (min-width: 1024px) {
    .lp-hero-badge-float {
        position: absolute;
        bottom: 1rem;
        left: 2rem;
    }
}

.lp-hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: lpPulse 2s infinite ease-in-out;
}

@media (max-width: 1023px) {
    .lp-hero-bg-backdrop {
        background-position: center bottom;
        background-size: cover;
    }
    .lp-hero-bg-overlay {
        background: linear-gradient(180deg, #030408 0%, rgba(3, 4, 8, 0.92) 55%, rgba(3, 4, 8, 0.4) 100%);
    }
    .lp-hero-visual {
        margin-top: 2rem;
        justify-content: center;
    }
}

@keyframes lpPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }

.lp-brands { max-width: var(--lp-max); margin: 4.5rem auto 0; padding: 2rem 1.5rem 0; border-top: 1px solid rgba(31,41,55,.5); text-align: center; }
.lp-brands p { font-size: 0.75rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 2rem; }
.lp-brands-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 3rem; opacity: .7; filter: grayscale(0.6); font-weight: 700; font-size: 1.25rem; transition: opacity .3s; }
.lp-brands-row:hover { opacity: 1; filter: grayscale(0); }

/* Secciones claras */
.lp-light { background: #f3f4f6; color: #111827; border-radius: 3rem 3rem 0 0; padding: 5rem 0; margin-top: 3rem; }
.lp-light-card { background: #ffffff; }
.lp-light .lp-eyebrow { color: var(--lp-purple); border-color: rgba(109,40,217,.3); background: #fff; }
.lp-h2 { font-size: 2.25rem; font-weight: 700; margin: 0 0 1rem; }
@media (min-width: 768px) { .lp-h2 { font-size: 3rem; } }
.lp-h2 span { color: var(--lp-purple); }
.lp-center { text-align: center; }
.lp-center .lp-lead { margin-left: auto; margin-right: auto; color: #6b7280; }
.lp-divider { width: 4rem; height: 4px; background: var(--lp-purple); border-radius: 9999px; margin: 1.5rem auto 0; }

/* Servicios */
.lp-services { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin: 4rem 0; }
@media (min-width: 768px) { .lp-services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .lp-services { grid-template-columns: repeat(3, 1fr); } }
.lp-service { background: #fff; border-radius: 1.25rem; padding: 1.25rem; border: 1px solid #e5e7eb; box-shadow: 0 4px 6px -1px rgba(0,0,0,.05), 0 2px 4px -2px rgba(0,0,0,.05); transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; display: flex; flex-direction: column; overflow: hidden; }
.lp-service:hover { transform: translateY(-5px); box-shadow: 0 20px 35px -10px rgba(109,40,217,.16); border-color: rgba(139,92,246,0.4); }
.lp-service-img-wrap { position: relative; width: 100%; height: 13rem; border-radius: 0.875rem; overflow: hidden; margin-bottom: 1.25rem; background: #0f172a; }
.lp-service-img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(0.16, 1, 0.3, 1); display: block; }
.lp-service:hover .lp-service-img { transform: scale(1.07); }
.lp-service-category-tag { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; background: rgba(15,23,42,0.85); backdrop-filter: blur(8px); color: #e0e7ff; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; padding: 0.25rem 0.6rem; border-radius: 9999px; border: 1px solid rgba(255,255,255,0.2); }
.lp-service-icon { width: 38px; height: 38px; background: #f5f3ff; color: var(--lp-purple); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.75rem; flex-shrink: 0; }
.lp-service h3 { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.75rem; }
.lp-service > p { color: #6b7280; font-size: 0.875rem; margin: 0 0 1.5rem; line-height: 1.5; }
.lp-service ul { list-style: none; padding: 0; margin: 0; margin-top: auto; }
.lp-service ul li { font-size: 0.875rem; color: #4b5563; padding: 0.35rem 0; display: flex; gap: 0.5rem; align-items: center; }
.lp-check { color: var(--lp-light); }
.lp-cta-link { text-align: center; margin-top: 3rem; font-size: 0.875rem; color: #6b7280; }
.lp-cta-link a { color: var(--lp-purple); font-weight: 600; margin-left: 0.5rem; }
.lp-cta-link a:hover { text-decoration: underline; }

/* Proceso 6 pasos */
.lp-process-6 { display: flex; flex-direction: column; gap: 1rem; margin: 4rem 0 5rem; }
@media (min-width: 1024px) { .lp-process-6 { flex-direction: row; align-items: flex-start; justify-content: space-between; } }
.lp-step6 { flex: 1; text-align: center; background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 0.75rem; padding: 1.5rem; }
.lp-step6-icon { width: 48px; height: 48px; margin: 0 auto 1rem; background: #ede9fe; color: var(--lp-purple); border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.lp-step6-num { color: var(--lp-purple); font-weight: 700; font-size: 0.875rem; display: block; margin-bottom: 0.25rem; }
.lp-step6 h3 { font-weight: 700; font-size: 1.125rem; margin: 0 0 0.5rem; line-height: 1.3; }
.lp-step6 p { font-size: 0.75rem; color: #6b7280; margin: 0; }
.lp-arrow { display: none; align-items: center; color: #d1d5db; align-self: center; }
@media (min-width: 1024px) { .lp-arrow { display: flex; } }
.lp-why { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 1rem; padding: 2rem; }
.lp-why h4 { text-align: center; font-size: 0.875rem; letter-spacing: 0.15em; text-transform: uppercase; margin: 0 0 2rem; }
.lp-why-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .lp-why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .lp-why-grid { grid-template-columns: repeat(4, 1fr); } }
.lp-why-item { display: flex; gap: 1rem; align-items: flex-start; }
.lp-why-item .lp-ico { color: var(--lp-purple); font-size: 1.5rem; }
.lp-why-item h5 { font-weight: 700; font-size: 0.875rem; margin: 0 0 0.25rem; }
.lp-why-item p { font-size: 0.75rem; color: #6b7280; margin: 0; }

/* Resultados */
.lp-stats { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 4rem 0; }
@media (min-width: 768px) { .lp-stats { grid-template-columns: repeat(4, 1fr); } }
.lp-stat { background: #fff; border: 1px solid #f3f4f6; border-radius: 0.75rem; padding: 1.5rem; display: flex; gap: 1rem; align-items: center; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.lp-stat-ico { width: 48px; height: 48px; background: #f5f3ff; color: var(--lp-purple); border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.lp-stat b { font-size: 1.5rem; color: var(--lp-purple); display: block; }
.lp-stat .lp-stat-t { font-size: 0.875rem; font-weight: 700; }
.lp-stat .lp-stat-s { font-size: 0.75rem; color: #6b7280; }
.lp-cases-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2rem; }
.lp-cases { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 4rem; }
@media (min-width: 768px) { .lp-cases { grid-template-columns: repeat(3, 1fr); } }
.lp-case { background: #fff; border: 1px solid #e5e7eb; border-radius: 1.25rem; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 4px 6px -1px rgba(0,0,0,.05); transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.lp-case:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -10px rgba(0,0,0,.15); border-color: rgba(139,92,246,0.3); }
.lp-case-img-wrap { position: relative; width: 100%; height: 15rem; overflow: hidden; background: #0f172a; }
.lp-case-img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(0.16, 1, 0.3, 1); display: block; }
.lp-case:hover .lp-case-img { transform: scale(1.06); }
.lp-case-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.lp-case-tag { font-size: 10px; font-weight: 700; color: var(--lp-purple); background: #f5f3ff; padding: 0.25rem 0.5rem; border-radius: 0.25rem; width: max-content; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.lp-case h4 { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.5rem; }
.lp-case p { font-size: 0.875rem; color: #6b7280; margin: 0 0 1.5rem; flex: 1; line-height: 1.5; }
.lp-case-metrics { display: flex; justify-content: space-between; border-bottom: 1px solid #f3f4f6; padding-bottom: 1rem; margin-bottom: 1rem; }
.lp-case-metrics b { color: var(--lp-purple); font-size: 1.125rem; display: block; }
.lp-case-metrics span { font-size: 0.75rem; color: #6b7280; }
.lp-case-dur b { color: var(--lp-purple); font-size: 1.125rem; display: block; }
.lp-case-dur span { font-size: 0.75rem; color: #6b7280; }
.lp-case a { color: var(--lp-purple); font-weight: 600; font-size: 0.875rem; margin-top: auto; }
.lp-case a:hover { text-decoration: underline; }
.lp-cta-banner { background: var(--lp-bg); color: #fff; border-radius: 1rem; padding: 2rem 2.5rem; display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: space-between; box-shadow: 0 25px 50px -12px rgba(0,0,0,.5); position: relative; overflow: hidden; }
@media (min-width: 768px) { .lp-cta-banner { flex-direction: row; } }
.lp-cta-banner-grad { position: absolute; inset: 0; background: linear-gradient(to right, rgba(76,29,149,.5), transparent); }
.lp-cta-banner > div, .lp-cta-banner > .lp-btn { position: relative; z-index: 10; }
.lp-cta-banner-ico { width: 64px; height: 64px; background: var(--lp-purple); border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.lp-cta-banner h4 { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.25rem; }
.lp-cta-banner p { color: #d1d5db; font-size: 0.875rem; margin: 0; }

/* Pricing */
.lp-pricing { background: var(--lp-bg); color: #fff; padding: 5rem 0; position: relative; }
.lp-pricing-topline { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(to right, transparent, rgba(139,92,246,.5), transparent); }
.lp-pricing-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 3rem; }
@media (min-width: 1024px) { .lp-pricing-grid { grid-template-columns: repeat(2, 1fr); } }
.lp-panel { background: #101426; border: 1px solid #1f2937; border-radius: 1rem; padding: 2rem; display: flex; flex-direction: column; }
.lp-panel-teal { border-color: rgba(13,148,136,.3); }
.lp-panel-head { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 1.5rem; }
.lp-panel-head h3 { font-size: 1.25rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin: 0; }
.lp-panel-head .lp-ico { color: var(--lp-light); }
.lp-panel-teal .lp-panel-head .lp-ico, .lp-panel-teal .lp-panel-head h3 { color: #14b8a6; }
.lp-panel > p { color: #9ca3af; font-size: 0.875rem; margin: 0 0 2rem; }
.lp-plans { display: grid; grid-template-columns: 1fr; gap: 1rem; flex: 1; }
@media (min-width: 768px) { .lp-plans { grid-template-columns: repeat(3, 1fr); } }
.lp-plan { background: #1a1f35; border: 1px solid rgba(55,65,81,.5); border-radius: 0.75rem; padding: 1.25rem; display: flex; flex-direction: column; }
.lp-plan .lp-ico { color: var(--lp-light); font-size: 1.25rem; margin-bottom: 1rem; }
.lp-plan h4 { font-size: 1.125rem; font-weight: 700; margin: 0 0 0.25rem; }
.lp-plan > p { font-size: 0.75rem; color: #9ca3af; margin: 0 0 1.5rem; flex: 1; }
.lp-plan ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.lp-plan ul li { font-size: 0.75rem; padding: 0.35rem 0; display: flex; gap: 0.5rem; }
.lp-plan .lp-check { color: var(--lp-light); }
.lp-plan-from { font-size: 0.75rem; color: #6b7280; margin-bottom: 0.25rem; }
.lp-plan-price { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.lp-plan-price span { font-size: 0.75rem; font-weight: 400; color: #6b7280; }
.lp-plan .lp-btn { width: 100%; padding: 0.5rem; border-radius: 0.5rem; font-size: 0.875rem; margin-top: auto; }
.lp-nopermanencia { text-align: center; margin-top: 1.5rem; font-size: 0.75rem; color: #9ca3af; }
.lp-sel-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.5rem; }
@media (min-width: 640px) { .lp-sel-grid { grid-template-columns: repeat(2, 1fr); } }
.lp-sel { display: flex; align-items: center; justify-content: space-between; background: #1a1f35; border: 1px solid rgba(55,65,81,.5); padding: 1rem; border-radius: 0.75rem; cursor: pointer; transition: border-color .2s; }
.lp-sel:hover { border-color: var(--lp-purple); }
.lp-sel-info { display: flex; gap: 0.75rem; align-items: center; }
.lp-sel .lp-ico { color: #9ca3af; font-size: 1.25rem; }
.lp-sel-label { font-size: 0.875rem; font-weight: 500; line-height: 1.2; }
.lp-sel-badge { display: block; font-size: 10px; color: #eab308; background: rgba(234,179,8,.1); padding: 0.15rem 0.5rem; border-radius: 0.25rem; width: max-content; margin-top: 0.25rem; }
.lp-sel input { width: 20px; height: 20px; accent-color: var(--lp-purple); }
.lp-need { display: flex; gap: 1rem; align-items: flex-start; background: #1a1f35; border: 1px solid rgba(55,65,81,.5); padding: 1rem; border-radius: 0.75rem; margin-bottom: 1.5rem; cursor: pointer; }
.lp-need-plus { width: 32px; height: 32px; border-radius: 9999px; border: 2px solid #4b5563; display: flex; align-items: center; justify-content: center; color: #9ca3af; flex-shrink: 0; }
.lp-need b { display: block; font-size: 0.875rem; font-weight: 500; }
.lp-need span { font-size: 0.75rem; color: #9ca3af; }
.lp-loc { background: #111c2e; border: 1px solid rgba(55,65,81,.5); border-radius: 0.75rem; padding: 1rem; display: flex; gap: 0.75rem; font-size: 0.75rem; color: #9ca3af; margin-bottom: 1.5rem; margin-top: auto; }
.lp-loc .lp-ico { color: #14b8a6; }
.lp-loc p { margin: 0; }
.lp-sel-cta { width: 100%; background: #0f766e; color: #fff; border-radius: 0.75rem; padding: 1rem; font-weight: 700; font-size: 1.125rem; border: 0; cursor: pointer; transition: background .2s; display:flex; align-items:center; justify-content:center; gap:0.5rem; }
.lp-sel-cta:hover { background: #0d9488; }
.lp-lock { text-align: center; margin-top: 1rem; font-size: 0.75rem; color: #6b7280; }
.lp-lock .lp-ico { color: #14b8a6; }

/* Barra proceso simple (4 pasos) */
.lp-simple-process { background: #101426; border: 1px solid #1f2937; border-radius: 1rem; padding: 1.5rem; display: flex; flex-direction: column; gap: 2rem; align-items: center; margin-top: 3rem; }
@media (min-width: 768px) { .lp-simple-process { flex-direction: row; } }
.lp-simple-title { text-align: center; flex-shrink: 0; }
@media (min-width: 768px) { .lp-simple-title { text-align: left; } }
.lp-simple-title h4 { color: var(--lp-light); text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.875rem; margin: 0 0 0.25rem; }
.lp-simple-title h4 + h4 { color: #fff; }
.lp-simple-steps { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; width: 100%; }
@media (min-width: 1024px) { .lp-simple-steps { grid-template-columns: repeat(4, 1fr); } }
.lp-sstep { display: flex; gap: 0.75rem; align-items: flex-start; }
.lp-sstep-ico { width: 40px; height: 40px; border-radius: 10px; background: #1a1f35; display: flex; align-items: center; justify-content: center; color: var(--lp-light); flex-shrink: 0; }
.lp-sstep-badge { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 9999px; background: var(--lp-purple); color: #fff; font-size: 10px; font-weight: 700; margin-bottom: 0.25rem; }
.lp-sstep h5 { font-size: 0.75rem; font-weight: 700; margin: 0 0 0.25rem; }
.lp-sstep p { font-size: 10px; color: #9ca3af; margin: 0; }

/* Footer */
.lp-footer { background: var(--lp-bg); color: #9ca3af; padding: 2.5rem 0; text-align: center; font-size: 0.75rem; border-top: 1px solid #1f2937; }
.lp-footer strong { color: #fff; font-size: 1rem; font-weight: 700; }
.lp-notice { max-width: 80rem; margin: 0 auto; padding: 1rem 1.5rem; }

/* Reutilizar estilos previos del módulo landing */
.lp-2026 .lp-promo, .lp-2026 .lp-faq, .lp-2026 .lp-popup-overlay { font-family: 'Inter', system-ui, sans-serif; }

/* ===== Landing 2026: complementos ===== */
.lp-ico { display: inline-flex; }
.lp-btn-sm { padding: 0.65rem 1.25rem; border-radius: 0.5rem; font-size: 0.875rem; }
.lp-btn-lg { padding: 1rem 2rem; border-radius: 0.75rem; font-size: 1rem; box-shadow: 0 10px 25px -5px rgba(109,40,217,.2); }
.lp-nav-login { display: inline-flex; align-items: center; padding: 0.55rem 1.15rem; border-radius: 999px; font-size: 0.875rem; font-weight: 700; text-decoration: none; color: #fff; background: linear-gradient(135deg, #4c1d95, #6d28d9); box-shadow: 0 4px 14px -4px rgba(109,40,217,.6); transition: filter .2s ease, transform .2s ease; }
.lp-nav-login:hover { color: #fff; filter: brightness(1.1); transform: translateY(-1px); }
.lp-hero-inner .lp-light-inner { max-width: 80rem; }
.lp-light-2 { background: #ffffff; border-radius: 0; border-top: 1px solid #f3f4f6; }
.lp-light-2 .lp-eyebrow { background: #f5f3ff; }

/* ==========================================================================
   BARRA PROMOCIONAL SUPERIOR (TOP BAR)
   ========================================================================== */
.lp-top-bar {
    position: relative;
    z-index: 110;
    width: 100%;
    background: linear-gradient(90deg, #090314 0%, #150729 25%, #240b44 50%, #150729 75%, #090314 100%);
    border-bottom: 1px solid rgba(168, 85, 247, 0.28);
    box-shadow: 0 4px 20px -2px rgba(10, 2, 22, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.85rem;
    line-height: 1.4;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.35s ease, padding 0.3s ease;
}

.lp-top-bar-inner {
    max-width: 92rem;
    margin: 0 auto;
    padding: 0.55rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.lp-top-bar-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
}

.lp-top-bar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.18);
    border: 1px solid rgba(168, 85, 247, 0.35);
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5));
}

.lp-top-bar-gift-svg {
    width: 16px;
    height: 16px;
    display: block;
}

.lp-top-bar,
.lp-top-bar * {
    -webkit-font-smoothing: antialiased;
}

.lp-top-bar-text {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    color: #ffffff !important;
}

.lp-top-bar-title,
.lp-top-bar strong.lp-top-bar-title,
.lp-2026 .lp-top-bar-title {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.88rem !important;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85) !important;
}

.lp-top-bar-desc,
.lp-top-bar span.lp-top-bar-desc,
.lp-2026 .lp-top-bar-desc {
    color: #e2e8f0 !important;
    font-weight: 500 !important;
    font-size: 0.84rem !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65) !important;
}

.lp-top-bar-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.22rem 0.75rem;
    background: rgba(147, 51, 234, 0.28) !important;
    border: 1px solid rgba(192, 132, 252, 0.55) !important;
    color: #f3e8ff !important;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.lp-top-bar-countdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75) !important;
    border: 1px solid rgba(168, 85, 247, 0.45) !important;
    color: #ffffff !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-variant-numeric: tabular-nums;
    font-weight: 800 !important;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    padding: 0.22rem 0.65rem;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 8px rgba(168, 85, 247, 0.3) !important;
}

.lp-top-bar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.lp-top-bar-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.825rem;
    border-radius: 8px;
    box-shadow: 0 4px 14px -2px rgba(124, 58, 237, 0.55);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lp-top-bar-cta:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px -1px rgba(124, 58, 237, 0.75);
}

.lp-top-bar-cta svg {
    transition: transform 0.2s ease;
}

.lp-top-bar-cta:hover svg {
    transform: translateX(2px);
}

.lp-top-bar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 7px;
    color: #cbd5e1 !important;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
}

.lp-top-bar-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Ocultar botón tour cuando el modal de regalo/popup esté activo */
body.lp-popup-open #vtour-launcher,
body.lp-popup-open .js-vtour-start {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (max-width: 1024px) {
    .lp-top-bar-inner {
        padding: 0.5rem 1rem;
        gap: 0.75rem;
    }
    .lp-top-bar-main {
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .lp-top-bar-inner {
        flex-direction: column;
        text-align: center;
        padding: 0.6rem 0.75rem;
        gap: 0.6rem;
    }
    .lp-top-bar-text {
        justify-content: center;
    }
    .lp-top-bar-desc {
        display: none;
    }
    .lp-top-bar-actions {
        width: 100%;
        justify-content: center;
        position: relative;
    }
    .lp-top-bar-close {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* Retrocompatibilidad con .lp-promo previa */
.lp-promo { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; background: linear-gradient(to right, #4c1d95, #6d28d9); color: #fff; padding: 0.6rem 1rem; font-size: 0.85rem; text-align: center; }
.lp-promo .muted { color: #d1d5db; }
.lp-countdown { font-variant-numeric: tabular-nums; font-weight: 700; background: rgba(0,0,0,.25); padding: 0.2rem 0.6rem; border-radius: 9999px; font-size: 0.8rem; }

/* FAQ */
.lp-faq { background: #fff; border: 1px solid #f3f4f6; border-radius: 0.75rem; padding: 1rem 1.25rem; margin-bottom: 0.75rem; }
.lp-faq summary { font-weight: 600; cursor: pointer; }
.lp-faq p { margin: 0.5rem 0 0; }

.faq-list { max-width: 48rem; margin: 2rem auto 0; }
.faq-item { background: #fff; border: 1px solid #f3f4f6; border-radius: 0.75rem; margin-bottom: 0.75rem; overflow: hidden; }
.faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; background: none; border: none; cursor: pointer; font-family: inherit; font-size: 1rem; font-weight: 600; color: #111827; text-align: left; }
.faq-question:hover { color: var(--lp-accent, #2563eb); }
.faq-icon { flex-shrink: 0; font-size: 1.35rem; line-height: 1; color: var(--lp-accent, #2563eb); font-weight: 700; }
.faq-answer { display: none; padding: 0 1.25rem 1rem; color: #6b7280; line-height: 1.6; }
.faq-item.open .faq-answer { display: block; }

/* ==========================================================================
   PAGE LOADER & SKELETON IMAGE OPTIMIZATION
   ========================================================================== */
.lp-top-loader {
    position: fixed;
    top: 0;
    left: 0;
    height: 3.5px;
    width: 0%;
    background: linear-gradient(90deg, #7c3aed, #06b6d4, #a855f7, #ec4899);
    background-size: 200% 100%;
    box-shadow: 0 0 14px rgba(124, 58, 237, 0.95), 0 0 6px rgba(6, 182, 212, 0.85);
    z-index: 99999;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    pointer-events: none;
    animation: lpLoaderGlow 2s linear infinite;
}

.lp-top-loader.is-finished {
    width: 100% !important;
    opacity: 0;
    transition: width 0.2s ease, opacity 0.5s ease 0.2s;
}

@keyframes lpLoaderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes lpShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.lp-img-skeleton {
    position: relative;
    overflow: hidden;
    background: #0f1423;
}

.lp-img-skeleton::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: lpShimmer 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lp-img-skeleton.is-loaded::before {
    opacity: 0;
    animation: none;
}

.lp-hero-img-wrap.lp-img-skeleton { overflow: visible; }

.lp-lazy-img {
    opacity: 0;
    filter: blur(10px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s ease;
    will-change: opacity, filter;
}

.lp-lazy-img.is-loaded {
    opacity: 1;
    filter: blur(0);
}

/* ==========================================================================
   POPUP MODAL PROFESIONAL (2 COLUMNAS: DARK OFFER + WHITE FORM + TRUST FOOTER)
   ========================================================================== */
body.lp-popup-open { overflow: hidden !important; }

.lp-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(7, 10, 19, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lp-popup-overlay:not([hidden]),
.lp-popup-overlay.lp-popup--active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lp-popup-overlay.lp-popup--closing {
    opacity: 0;
    pointer-events: none;
}

.lp-popup-card {
    position: relative;
    background: #0f1423;
    border-radius: 1.5rem;
    width: 100%;
    max-width: 960px;
    overflow: hidden;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.95), 0 0 50px rgba(109, 40, 217, 0.35);
    border: 1px solid rgba(139, 92, 246, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.94) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.lp-popup-overlay.lp-popup--active .lp-popup-card {
    transform: scale(1) translateY(0);
}

.lp-popup-overlay.lp-popup--closing .lp-popup-card {
    transform: scale(0.92) translateY(20px);
    opacity: 0;
}

/* Split Main Container */
.lp-popup-main {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 860px) {
    .lp-popup-main {
        grid-template-columns: 1.15fr 0.95fr;
    }
}

/* Left Column: Dark Offer Side */
.lp-popup-left {
    background: radial-gradient(circle at 85% 35%, rgba(109, 40, 217, 0.32) 0%, rgba(15, 20, 35, 1) 70%), #0c101c;
    padding: 2.25rem 2rem 2rem 2.25rem;
    color: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.lp-popup-left-glow {
    position: absolute;
    top: 20%;
    right: 10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

.lp-popup-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(109, 40, 217, 0.25);
    border: 1px solid rgba(139, 92, 246, 0.45);
    color: #e9d5ff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    width: max-content;
    margin-bottom: 1.25rem;
}

.lp-popup-h2 {
    font-size: 1.95rem;
    font-weight: 800;
    line-height: 1.18;
    color: #ffffff;
    margin: 0 0 0.85rem;
}

@media (min-width: 640px) {
    .lp-popup-h2 {
        font-size: 2.15rem;
    }
}

.lp-popup-h2-accent {
    color: #c084fc;
    text-shadow: 0 0 20px rgba(192, 132, 252, 0.4);
}

.lp-popup-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0 0 1.5rem;
    max-width: 24rem;
}

/* Middle Section with Checklist & 3D Ebook */
.lp-popup-middle-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.lp-popup-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lp-popup-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: #e2e8f0;
    line-height: 1.35;
}

.lp-popup-check-ico {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #7c3aed;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.5);
}

.lp-popup-arrow-wrap {
    position: absolute;
    left: 45%;
    top: 45%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.85;
}

@media (max-width: 600px) {
    .lp-popup-arrow-wrap {
        display: none;
    }
}

.lp-popup-book-wrap {
    position: relative;
    width: 140px;
    flex-shrink: 0;
    margin-left: auto;
}

@media (min-width: 640px) {
    .lp-popup-book-wrap {
        width: 155px;
    }
}

.lp-popup-free-pill {
    position: absolute;
    top: -14px;
    right: -12px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #6d28d9;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.72rem;
    line-height: 1.1;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.65);
    z-index: 10;
    border: 2.5px solid #0c101c;
    text-align: center;
}

.lp-popup-free-pill span {
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.lp-popup-book-img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 30px rgba(139, 92, 246, 0.4);
    transform: perspective(800px) rotateY(-6deg) rotateX(2deg);
    display: block;
    transition: transform 0.4s ease;
}

.lp-popup-book-wrap:hover .lp-popup-book-img {
    transform: perspective(800px) rotateY(0deg) rotateX(0deg) scale(1.03);
}

/* Social Proof Row */
.lp-popup-social-proof {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.lp-popup-avatars {
    display: flex;
    align-items: center;
}

.lp-pop-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #0c101c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-left: -8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.lp-pop-avatar:first-child {
    margin-left: 0;
}

.lp-popup-stars {
    color: #f59e0b;
    font-size: 0.85rem;
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.lp-popup-social-text {
    font-size: 0.75rem;
    color: #cbd5e1;
}

/* Right Column: White Form Side */
.lp-popup-right {
    background: #ffffff;
    color: #0f172a;
    padding: 2.25rem 2rem 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lp-popup-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 20;
    padding: 0;
}

.lp-popup-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.08);
}

.lp-popup-form-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.4rem;
    line-height: 1.2;
}

.lp-popup-form-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 1.25rem;
    line-height: 1.45;
}

.lp-popup-highlight-banner {
    background: #f5f3ff;
    border: 1px solid #ede9fe;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.lp-popup-doc-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #ede9fe;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lp-popup-doc-text {
    font-size: 0.8rem;
    color: #4c1d95;
    line-height: 1.35;
}

.lp-popup-field {
    margin-bottom: 0.85rem;
}

.lp-popup-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    display: block;
    margin-bottom: 0.35rem;
}

.lp-popup-input-wrap {
    position: relative;
    width: 100%;
}

.lp-popup-input-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.lp-popup-input {
    width: 100%;
    padding: 0.75rem 0.85rem 0.75rem 2.5rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    color: #0f172a;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.lp-popup-input:focus {
    border-color: #7c3aed;
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.lp-popup-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.85rem 0 1.2rem;
    cursor: pointer;
    line-height: 1.35;
}

.lp-popup-consent a {
    color: #7c3aed;
    text-decoration: underline;
    font-weight: 500;
}

.lp-popup-checkbox {
    accent-color: #7c3aed;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    flex-shrink: 0;
    cursor: pointer;
}

.lp-popup-btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 10px 20px -5px rgba(109, 40, 217, 0.45);
    transition: all 0.25s ease;
    font-family: inherit;
}

.lp-popup-btn-submit:hover {
    background: linear-gradient(135deg, #6d28d9, #5b21b6);
    transform: translateY(-1px);
    box-shadow: 0 12px 25px -4px rgba(109, 40, 217, 0.6);
}

.lp-popup-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.85rem;
    text-align: center;
}

.lp-micro-msg {
    margin: 0.6rem 0 0;
    font-size: 0.82rem;
    font-weight: 500;
    text-align: center;
}

/* Bottom Bar: 3 Trust Pillars */
.lp-popup-footer-bar {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 1rem 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .lp-popup-footer-bar {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
    }
}

.lp-popup-trust-col {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lp-popup-trust-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f5f3ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #7c3aed;
}

.lp-popup-trust-text {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    line-height: 1.2;
}

.lp-popup-trust-text strong {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.lp-popup-trust-text span {
    color: #64748b;
    font-size: 0.72rem;
}

/* Contenedor de pila para secciones */
.lp-wrap { max-width: var(--lp-max); margin: 0 auto; padding: 0 1.5rem; }
.lp-wrap > .lp-center { width: 100%; }
.lp-center { width: 100%; }

/* Iconos de confianza del hero: apilados sobre el texto */
.lp-trust svg { display: block; color: var(--lp-light); margin-bottom: 0.5rem; }
.lp-trust div { line-height: 1.5; }

/* ===== Landing: carrusel de servicios ===== */
.lp-carousel { position: relative; margin-top: 3rem; }
.lp-carousel .lp-services {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    scrollbar-width: none;
    margin: 0;
}
.lp-carousel .lp-services::-webkit-scrollbar { display: none; }
.lp-carousel .lp-carousel-slide {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 100%;
}
@media (min-width: 640px) { .lp-carousel .lp-carousel-slide { width: calc(50% - 0.75rem); } }
@media (min-width: 1024px) { .lp-carousel .lp-carousel-slide { width: calc(33.333% - 1rem); } }
.lp-carousel-btn {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: color .2s, border-color .2s;
}
.lp-carousel-btn:hover { color: var(--lp-purple); border-color: var(--lp-purple); }
.lp-carousel-btn svg { width: 18px; height: 18px; }
.lp-carousel-prev { left: -0.5rem; }
.lp-carousel-next { right: -0.5rem; }
.lp-carousel-prev svg { transform: rotate(180deg); }
.lp-carousel-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.lp-carousel-dot {
    width: 8px; height: 8px; border-radius: 9999px;
    border: 0; padding: 0; cursor: pointer;
    background: #d1d5db; transition: background .2s, transform .2s;
}
.lp-carousel-dot.active { background: var(--lp-purple); transform: scale(1.3); }

/* ===== Carrusel de PLANES (2 tarjetas por vista en desktop, 1 en móvil) ===== */
.lp-carousel--plans { margin-top: 0; margin-bottom: 1.5rem; }
.lp-carousel--plans .lp-plans {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    flex: 1 1 auto;
}
.lp-carousel--plans .lp-plans::-webkit-scrollbar { display: none; }
.lp-carousel--plans .lp-carousel-slide {
    scroll-snap-align: start;
    flex: 0 0 100%;
    width: 100%;
}
@media (min-width: 560px) {
    .lp-carousel--plans .lp-carousel-slide { flex: 0 0 calc(50% - 0.5rem); width: calc(50% - 0.5rem); }
}
.lp-carousel--plans .lp-plan { min-height: 100%; display: flex; flex-direction: column; }
.lp-carousel--plans .lp-plan ul { flex: 1 1 auto; }
.lp-carousel--plans .lp-plan .lp-btn { margin-top: auto; }
.lp-carousel--plans .lp-carousel-btn { top: 45%; }

/* ============ UX · Ayudas por campo (tooltips/descripciones) ============ */
.field-help{display:block;font-size:.72rem;line-height:1.35;color:var(--muted);margin-top:.3rem;}
.field-help b{color:var(--text);}
.tip{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;margin-left:.3rem;
     border-radius:50%;background:var(--surface-2);color:var(--muted);font-size:10px;font-weight:800;
     cursor:help;border:1px solid var(--border);}
.form-intro{font-size:.8rem;color:var(--muted);margin:.2rem 0 .9rem;line-height:1.4;}

/* ============ CHAT CLIENTE (cchat) — Interfaz Moderna y Organizada ============ */
.cchat-page-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.cchat-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.cchat-page-title-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.cchat-page-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.2) 0%, rgba(101, 31, 255, 0.3) 100%);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124, 77, 255, 0.35);
  flex-shrink: 0;
}
.cchat-page-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.2px;
  line-height: 1.2;
}
.cchat-page-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.2rem 0 0;
}
.cchat-page-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 230, 118, 0.12);
  color: var(--success);
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid rgba(0, 230, 118, 0.25);
}
.cchat-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00E676;
  box-shadow: 0 0 8px #00E676;
  animation: ccPulse 2s infinite;
}
@keyframes ccPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* Layout del chat */
.cchat-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.15rem;
  align-items: stretch;
  min-height: calc(100vh - 240px);
}

/* Columna Lateral (Lista de Conversaciones) */
.cchat-side {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 240px);
  min-height: 560px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.cchat-side-header {
  margin-bottom: 0.4rem;
}
.cchat-btn-new-conv {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #7C4DFF 0%, #651FFF 100%);
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124, 77, 255, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cchat-btn-new-conv:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(124, 77, 255, 0.5);
  color: #FFFFFF;
}

/* Formulario desplegable nueva consulta */
.cchat-new-form-box {
  background: var(--surface-2);
  border: 1px solid rgba(124, 77, 255, 0.25);
  border-radius: 14px;
  padding: 0.95rem;
  margin: 0.6rem 0 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.cchat-new-form-head strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
}
.cchat-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.2rem 0;
}
.cchat-quick-chip {
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}
.cchat-quick-chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}
.cchat-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.cchat-form-field span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}
.cchat-input-text,
.cchat-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
  outline: none;
  transition: border-color .15s ease;
}
.cchat-input-text:focus,
.cchat-textarea:focus {
  border-color: var(--accent);
}
.cchat-new-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.3rem;
}
.cchat-btn-submit {
  background: linear-gradient(135deg, #7C4DFF 0%, #651FFF 100%);
  color: #FFFFFF;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

/* Título de sección en lista */
.cchat-list-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  margin: 0.8rem 0 0.45rem;
}
.cchat-list-count {
  background: var(--surface-2);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  color: var(--muted);
  border: 1px solid var(--border);
}

/* Lista de conversaciones */
.cchat-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-y: auto;
  flex: 1;
  padding-right: 2px;
}
.cchat-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: all 0.18s ease;
  position: relative;
}
.cchat-item:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  text-decoration: none;
  transform: translateX(2px);
}
.cchat-item.active {
  background: var(--surface-2);
  border-color: var(--accent);
  box-shadow: 0 4px 15px rgba(124, 77, 255, 0.18);
}
.cchat-espera {
  border-left: 3.5px solid var(--warning);
}
.cchat-ava {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(124, 77, 255, 0.15);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(124, 77, 255, 0.3);
}
.cchat-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.cchat-item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: baseline;
}
.cchat-item-top strong {
  font-size: 0.84rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}
.cchat-item-prev {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.cchat-item-meta {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}
.cchat-item-advisor-label {
  font-size: 0.68rem;
  color: var(--text-dim);
}
.cchat-no-convs {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.cchat-no-convs-icon {
  font-size: 2rem;
}

/* Columna Principal (Hilo de Conversación) */
.cchat-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  min-height: 560px;
  max-height: calc(100vh - 240px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* Cabecera del hilo */
.cchat-head {
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}
.cchat-head-main-info {
  flex: 1;
  min-width: 0;
}
.cchat-head-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.25rem;
}
.cchat-active-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cchat-head-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.cchat-advisor-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  color: var(--text);
  background: var(--surface-2);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.cchat-advisor-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00E676;
}
.cchat-meta-sep {
  color: var(--text-dim);
  font-size: 0.8rem;
}
.cchat-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.cchat-refresh-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface-hover);
  text-decoration: none;
}

/* Área de mensajes */
.cchat-thread {
  background: var(--bg);
  border: none;
  padding: 1.25rem 1.4rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}
.cchat-daysep {
  text-align: center;
  margin: 0.6rem 0;
}
.cchat-daysep span {
  background: var(--surface);
  padding: 0.25rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.cchat-row {
  display: flex;
  margin-bottom: 0.25rem;
}
.cchat-row.mine {
  justify-content: flex-end;
}
.cchat-row.theirs {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.6rem;
}
.cchat-row-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(124, 77, 255, 0.18);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(124, 77, 255, 0.3);
  margin-top: 2px;
}

.cchat-bubble {
  max-width: 78%;
  border-radius: 16px;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.cchat-row.mine .cchat-bubble {
  background: linear-gradient(135deg, #7C4DFF 0%, #651FFF 100%);
  color: #FFFFFF;
  border-radius: 18px 18px 4px 18px;
  border: none;
  box-shadow: 0 4px 16px rgba(124, 77, 255, 0.32);
}
.cchat-row.theirs .cchat-bubble {
  border-radius: 18px 18px 18px 4px;
}

.cchat-bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
  font-size: 0.7rem;
  color: var(--muted);
}
.cchat-row.mine .cchat-bubble-meta {
  color: rgba(255, 255, 255, 0.8);
}
.cchat-row.mine .cchat-bubble-meta strong {
  color: #FFFFFF;
  font-size: 0.76rem;
}
.cchat-bubble-meta strong {
  color: var(--text);
  font-size: 0.76rem;
}
.cchat-bubble-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.88rem;
  line-height: 1.45;
}

.cchat-empty-thread {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: auto;
}
.cchat-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 0.2rem;
}
.cchat-empty-thread strong {
  color: var(--text);
  font-size: 0.95rem;
}

/* Área de composición inferior */
.cchat-compose-wrapper {
  padding: 0.9rem 1.4rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
}
.cchat-compose {
  display: block;
}
.cchat-input-container {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.4rem 0.5rem 0.4rem 1rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.cchat-input-container:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.16);
}
.cchat-main-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  color: var(--text) !important;
  font-family: inherit;
  font-size: 0.88rem;
  resize: none;
  min-height: 38px;
  max-height: 120px;
  outline: none;
  padding: 0.4rem 0;
  line-height: 1.4;
  box-shadow: none !important;
}
.cchat-main-send-btn {
  padding: 0.6rem 1.15rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #7C4DFF 0%, #651FFF 100%);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(124, 77, 255, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  flex-shrink: 0;
}
.cchat-main-send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 77, 255, 0.5);
  color: #FFFFFF;
}
.cchat-main-send-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.cchat-compose-footer-hint {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 0 0.25rem;
}

/* Estado sin conversación seleccionada */
.cchat-no-selection {
  text-align: center;
  padding: 4.5rem 2rem;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 480px;
}
.cchat-no-sel-circle {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.15) 0%, rgba(101, 31, 255, 0.25) 100%);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124, 77, 255, 0.3);
  margin-bottom: 0.4rem;
}
.cchat-no-sel-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}
.cchat-no-sel-desc {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 992px) {
  .cchat-layout {
    grid-template-columns: 1fr;
  }
  .cchat-side {
    max-height: none;
    min-height: auto;
  }
  .cchat-main {
    min-height: 480px;
  }
}


/* ============ TOUR FLOTANTE (Izquierda) ============ */
.js-vtour-start,
#vtour-launcher {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, #7C4DFF 0%, #5E35B1 100%);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(124, 77, 255, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .2s ease, opacity .2s ease;
  user-select: none;
  -webkit-user-select: none;
}
.js-vtour-start:hover,
#vtour-launcher:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 12px 32px rgba(124, 77, 255, 0.6), 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 1;
}
.js-vtour-start:active,
#vtour-launcher:active {
  transform: translateY(0) scale(0.95);
}
.vtour-icon {
  font-family: inherit;
  font-weight: 800;
  font-size: 18px;
}

/* ============ CCW · WIDGET FLOTANTE DE CHAT (Derecha) ============ */
.ccw-launcher {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9400;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  color: #FFFFFF;
  background: linear-gradient(135deg, #7C4DFF 0%, #651FFF 50%, #536DFE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(124, 77, 255, 0.48), 0 3px 10px rgba(0, 0, 0, 0.3);
  transition: transform .22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .22s ease;
}
.ccw-launcher:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 14px 40px rgba(124, 77, 255, 0.65), 0 4px 14px rgba(0, 0, 0, 0.35);
}
.ccw-launcher:active {
  transform: translateY(0) scale(0.95);
}
.ccw-launcher-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease;
}
.ccw-launcher .ccw-icon-chat {
  display: block;
}
.ccw-launcher .ccw-icon-close {
  display: none;
}
.ccw-launcher.active .ccw-icon-chat {
  display: none;
}
.ccw-launcher.active .ccw-icon-close {
  display: block;
  transform: rotate(90deg);
}

/* Badge de no leídos */
.ccw-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FF1744 0%, #F50057 100%);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  box-shadow: 0 2px 8px rgba(255, 23, 68, 0.5);
  animation: ccwPulse 2s infinite ease-in-out;
}
@keyframes ccwPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Panel flotante */
.ccw-panel {
  position: fixed;
  bottom: 92px;
  right: 22px;
  z-index: 9401;
  width: min(410px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 125px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  pointer-events: none;
  transition: opacity .22s cubic-bezier(0.16, 1, 0.3, 1), transform .24s cubic-bezier(0.16, 1, 0.3, 1);
}
.ccw-panel.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Cabecera */
.ccw-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(135deg, #7C4DFF 0%, #651FFF 100%);
  color: #FFFFFF;
  flex-shrink: 0;
}
.ccw-brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  flex-shrink: 0;
}
.ccw-online-ping {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00E676;
  border: 2px solid #7C4DFF;
  box-shadow: 0 0 6px #00E676;
}
.ccw-head-t {
  flex: 1;
  min-width: 0;
}
.ccw-title-text {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ccw-sub-text {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.ccw-status-bullet {
  color: #00E676;
  font-size: 0.65rem;
}
.ccw-head-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.ccw-btn-icon {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .15s ease;
  text-decoration: none;
}
.ccw-btn-icon:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.06);
  color: #FFFFFF;
}
.ccw-btn-icon[hidden] {
  display: none !important;
}

/* Cuerpo del chat */
.ccw-body {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Promo superior en lista */
.ccw-list-promo {
  margin: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.14) 0%, rgba(101, 31, 255, 0.06) 100%);
  border: 1px solid rgba(124, 77, 255, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.ccw-list-promo-title {
  display: block;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text);
}
.ccw-list-promo-desc {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}
.ccw-btn-cta {
  background: linear-gradient(135deg, #7C4DFF 0%, #651FFF 100%);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(124, 77, 255, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ccw-btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 77, 255, 0.45);
}

.ccw-section-heading {
  padding: 0 0.85rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
}

/* Lista de conversaciones */
.ccw-conv-items {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0 0.85rem 0.85rem;
}
.ccw-item {
  text-align: left;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  color: var(--text);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.ccw-item:hover,
.ccw-item.active {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.ccw-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(124, 77, 255, 0.15);
  color: var(--accent);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
  border: 1px solid rgba(124, 77, 255, 0.25);
}
.ccw-item-content {
  flex: 1;
  min-width: 0;
}
.ccw-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.ccw-item-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ccw-item.unread .ccw-item-title {
  color: var(--accent);
}
.ccw-item.unread .ccw-item-title::after {
  content: '●';
  color: var(--accent);
  margin-left: 5px;
  font-size: 0.65rem;
}
.ccw-item-time {
  font-size: 0.66rem;
  color: var(--muted);
  flex-shrink: 0;
}
.ccw-item-prev {
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.35rem;
}
.ccw-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.ccw-item-advisor {
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* Badges de estado */
.cc-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
}
.cc-b-ok   { background: rgba(0, 230, 118, 0.16); color: var(--success); }
.cc-b-warn { background: rgba(255, 179, 0, 0.16); color: var(--warning); }
.cc-b-info { background: rgba(41, 182, 246, 0.16); color: var(--info); }

/* Estados vacíos y de carga */
.ccw-empty {
  color: var(--muted);
  text-align: center;
  padding: 2.5rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.ccw-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.2rem;
}
.ccw-empty strong {
  font-size: 0.9rem;
  color: var(--text);
}
.ccw-empty p {
  font-size: 0.78rem;
  margin: 0;
}
.ccw-loading {
  color: var(--muted);
  text-align: center;
  padding: 2rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ccw-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(124, 77, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ccwSpin .7s infinite linear;
}
@keyframes ccwSpin {
  to { transform: rotate(360deg); }
}

/* Vista Nueva Consulta */
.ccw-view-new {
  padding: 0.95rem;
}
.ccw-new-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem;
}
.ccw-new-title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}
.ccw-new-desc {
  margin: 0 0 0.85rem;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.35;
}
.ccw-form-group {
  margin-bottom: 0.75rem;
}
.ccw-form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}
.ccw-input,
.ccw-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.84rem;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ccw-input:focus,
.ccw-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.15);
}
.ccw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.ccw-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all .15s ease;
}
.ccw-chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}
.ccw-new-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}
.ccw-btn-secondary {
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.ccw-btn-secondary:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.ccw-btn-primary {
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #7C4DFF 0%, #651FFF 100%);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(124, 77, 255, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ccw-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 77, 255, 0.45);
}

/* Vista Hilo */
.ccw-view-thread {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.ccw-view-thread[hidden],
.ccw-view-list[hidden],
.ccw-view-new[hidden] {
  display: none !important;
}

.ccw-thread-head-bar {
  padding: 0.65rem 0.95rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  position: sticky;
  top: 0;
  z-index: 2;
}
.ccw-thread-head-titles {
  flex: 1;
  min-width: 0;
}
.ccw-thread-title {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ccw-thread-badges {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.15rem;
}
.ccw-thread-advisor {
  font-size: 0.68rem;
  color: var(--muted);
}
.ccw-thread-link {
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.ccw-thread-link:hover {
  color: var(--accent);
  background: var(--surface-hover);
}

.ccw-msgs {
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 140px;
  flex: 1;
}
.cchat-daysep {
  text-align: center;
  margin: 0.4rem 0;
}
.cchat-daysep span {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
}
.ccw-msgs .cchat-row.mine {
  align-self: flex-end;
  max-width: 84%;
}
.ccw-msgs .cchat-row.mine .cchat-bubble {
  background: linear-gradient(135deg, #7C4DFF 0%, #651FFF 100%);
  color: #FFFFFF;
  border-radius: 16px 16px 4px 16px;
  padding: 0.6rem 0.85rem;
  border: none;
  box-shadow: 0 4px 12px rgba(124, 77, 255, 0.3);
}
.ccw-msgs .cchat-row.mine .cchat-bubble-meta {
  color: rgba(255, 255, 255, 0.8);
}
.ccw-msgs .cchat-row.mine .cchat-bubble-meta strong {
  color: #FFFFFF;
}
.ccw-msgs .cchat-row.theirs {
  align-self: flex-start;
  max-width: 84%;
}
.ccw-msgs .cchat-row.theirs .cchat-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 4px;
  padding: 0.6rem 0.85rem;
  color: var(--text);
}

/* Compositor inferior */
.ccw-compose {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.ccw-compose-wrap {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.25rem 0.35rem 0.25rem 0.85rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ccw-compose-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.15);
}
.ccw-compose textarea {
  flex: 1;
  resize: none;
  max-height: 96px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.84rem;
  outline: none;
  padding: 0.4rem 0;
  line-height: 1.35;
}
.ccw-compose button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #7C4DFF 0%, #651FFF 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ccw-compose button:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(124, 77, 255, 0.4);
}

