:root {
    --primary-blue: #1e3a8a; /* Deep corporate blue */
    --primary-blue-light: #3b82f6; /* Modern bright blue */
    --bg-gradient-start: #e0e7ff;
    --bg-gradient-end: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --shadow-hover: 0 10px 40px 0 rgba(31, 38, 135, 0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* --- UTILITIES & GLASSMORPHISM --- */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
}

.hidden {
    display: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    margin-bottom: 20px;
}

.btn-back i {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-blue-light);
}

.btn-back:hover i {
    transform: translateX(-3px);
}

/* --- LOGIN SCREEN --- */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.login-logo {
    font-size: 4rem;
    color: var(--primary-blue-light);
    margin-bottom: 15px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.input-group input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: var(--transition);
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary-blue-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.login-footer {
    margin-top: 25px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.login-divider span {
    padding: 0 10px;
}

.btn-google {
    background: white;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.15);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-google i {
    font-size: 1.3rem;
    color: #DB4437; /* Google Red hue */
}

.btn-google:hover {
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Background Shapes for Login */
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: rgba(59, 130, 246, 0.3);
    top: -50px;
    left: -50px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: rgba(30, 58, 138, 0.2);
    bottom: -100px;
    right: -100px;
}

/* --- APP LAYOUT (DASHBOARD) --- */
.app-container {
    display: flex;
    height: 100vh;
    animation: fadeInApp 0.5s ease-out forwards;
}

@keyframes fadeInApp {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* Sidebar */
.sidebar {
    width: 280px;
    height: calc(100vh - 40px);
    margin: 20px;
    margin-right: 10px;
    border-radius: 20px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    z-index: 20;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-hover);
}

.sidebar-header {
    padding: 20px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-blue);
}

.sidebar-header i {
    font-size: 2rem;
    color: var(--primary-blue-light);
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-nav {
    flex: 1;
    padding: 0 15px;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.88rem;
    transition: var(--transition);
}

.nav-item i {
    font-size: 1.3rem;
}

.nav-item:hover {
    background: rgba(255,255,255,0.5);
    color: var(--primary-blue);
}

.nav-item.active {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    font-weight: 600;
}

.nav-item.active i {
    color: var(--primary-blue-light);
}

.sidebar-footer {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--glass-border);
}

.sidebar-contact {
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--glass-border);
}

.contact-banner {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 2px;
}

.btn-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-contact i {
    font-size: 1.3rem;
}

.btn-contact.whatsapp {
    background: #25D366;
}

.btn-contact.whatsapp:hover {
    background: #20b858;
    transform: translateY(-2px);
}

.btn-contact.calendly {
    background: #006BFF;
}

.btn-contact.calendly:hover {
    background: #005ce6;
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.avatar {
    width: 36px;
    height: 36px;
    background: var(--primary-blue-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    color: #ef4444; /* red for logout */
}

/* Main Content Area */
.main-content {
    flex: 1;
    height: 100vh;
    min-width: 0;
    overflow: hidden;  /* Header stays fixed at top, scroll happens in content-wrapper */
    padding: 20px 40px 0 10px;
    position: relative;
    background: transparent;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
    min-height: 0; /* CRITICAL FOR FLEXBOX OVERFLOW SCROLLING */
    height: 100%;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding-bottom: 60px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.top-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header h2 {
    font-size: 2rem;
    color: var(--primary-blue);
    position: relative;
    display: inline-block;
}

.top-header h2::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 4px;
    background: var(--primary-blue-light);
    bottom: -8px;
    left: 0;
    border-radius: 2px;
}

.content-section {
    display: none;
    animation: fadeContent 0.4s ease forwards;
}

.content-section.active {
    display: block;
}

@keyframes fadeContent {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: none; }
}

.hero-card {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.hero-text {
    flex: 1;
}

.hero-text h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.hero-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.hero-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
}

.hero-image img {
    max-width: 300px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
}

.welcome-logo-container {
    flex-shrink: 0;
}

.welcome-logo {
    max-width: 180px;
    height: auto;
    display: block;
}

.module-card {
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.module-card:hover {
    box-shadow: var(--shadow-hover);
}

.module-card h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--primary-blue);
}

.mb-3 { margin-bottom: 30px; }
.mt-2 { margin-top: 20px; }

/* Grid Layouts for Multiple Videos/Resources */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.video-item h4 {
    margin-bottom: 12px;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* Video Container (16:9 ratio) */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* YouTube Thumbnail Card (replaces iframe when embedding is blocked) */
.yt-thumb-card {
    display: block;
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: var(--transition);
    margin-bottom: 8px;
}

.yt-thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.92;
}

.yt-thumb-card:hover img {
    transform: scale(1.03);
    opacity: 0.75;
}

.yt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(255, 0, 0, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.yt-thumb-card:hover .yt-play-btn {
    background: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}

.yt-label {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0,0,0,0.75);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    border-top-left-radius: 8px;
}

.yt-label i {
    color: #ff0000;
    font-size: 1rem;
}

/* YouTube external link button - red solid */
.btn-yt-external {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 18px;
    border-radius: 8px;
    background: #ff0000;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
}

.btn-yt-external i {
    font-size: 1.2rem;
    color: white;
}

.btn-yt-external:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

/* Resources / Downloads */
.resources h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-card {
    display: flex;
    align-items: center;
    background: var(--white);
    padding: 15px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.download-card:hover {
    background: var(--primary-blue-light);
    color: var(--white);
    transform: translateY(-2px);
}

.download-card i.bxs-file-pdf {
    font-size: 2rem;
    color: #ef4444; /* PDF red */
    margin-right: 15px;
}

.download-card:hover i.bxs-file-pdf {
    color: var(--white);
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 600;
}

.file-size {
    font-size: 0.85rem;
    opacity: 0.8;
}

.download-icon {
    font-size: 1.5rem;
    color: var(--primary-blue);
}
.download-card:hover .download-icon {
    color: var(--white);
}

/* =====================================================
   CHATBOT WIDGET FLOTANTE
   ===================================================== */
.chatbot-widget {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 10000 !important;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none !important; /* CRITICAL: Prevent invisible layout box from blocking clicks */
}

/* Ensure modal overlays sit above chatbot */
.modal-overlay {
    z-index: 11000;
}


.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important; /* Re-enable clicks on the button */
}

.chatbot-toggle:hover {
    transform: scale(1.05);
}

.chatbot-panel {
    width: 420px;
    height: 650px;
    max-height: calc(100vh - 80px);
    max-width: calc(100vw - 30px);
    border-radius: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.98);
    transform-origin: bottom right;
    transition: var(--transition);
    pointer-events: auto; /* CRITICAL: Re-enable clicks inside the panel */
}

.chatbot-panel.hidden {
    display: flex !important; /* Override the default hidden for animation */
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.chatbot-header {
    background: var(--primary-blue);
    color: white;
    padding: 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bot-info i {
    font-size: 1.4rem;
}

.bot-info h4 {
    font-size: 0.9rem;
    margin: 0;
}

.status {
    font-size: 0.75rem;
    color: #4ade80; /* Green */
}

.chatbot-header button {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chatbot-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
}

.chat-message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    max-width: 85%;
    line-height: 1.4;
}

.bot-message {
    background: white;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
    color: var(--text-primary);
}

.user-message {
    background: var(--primary-blue-light);
    color: white;
    border-bottom-right-radius: 4px;
    margin-left: auto;
}

.chatbot-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.chatbot-footer input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    outline: none;
    font-size: 0.95rem;
}

.chatbot-footer input:focus {
    border-color: var(--primary-blue-light);
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.send-btn:hover {
    background: var(--primary-blue-light);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero-card {
        flex-direction: column;
        text-align: center;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .chatbot-panel {
        width: 300px;
        right: 20px;
    }
}

/* --- SEGUIMIENTO DE OBJETIVOS STYLES --- */
.motivos-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(30, 58, 138, 0.03));
    border-left: 4px solid var(--primary-blue-light);
    padding: 20px;
    border-radius: 8px;
    position: relative;
    margin-top: 15px;
}

.motivos-banner .quote-icon {
    font-size: 2.5rem;
    color: var(--primary-blue-light);
    opacity: 0.2;
    position: absolute;
    top: -5px;
    left: 10px;
}

#motivos-text-display {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.6;
    margin-left: 10px;
    font-style: italic;
    white-space: pre-wrap;
}

.motivos-input {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: var(--transition);
}

.motivos-input:focus {
    border-color: var(--primary-blue-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.grid-form .input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.grid-form label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.grid-form input, .grid-form select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.grid-form input:focus, .grid-form select:focus {
    border-color: var(--primary-blue-light);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.objetivos-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.objetivo-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 10px;
    border-left: 5px solid var(--primary-blue-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.objetivo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.objetivo-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-blue);
}

.objetivo-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    gap: 15px;
}

.objetivo-progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.progress-bar-bg {
    flex-grow: 1;
    height: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue-light), var(--primary-blue));
    width: 0%;
    transition: width 0.4s ease;
}

.progress-numbers {
    font-weight: 600;
    font-size: 0.95rem;
    min-width: 70px;
    text-align: right;
    color: var(--primary-blue);
}

.progress-controls {
    display: flex;
    gap: 5px;
}

.btn-small {
    background: var(--primary-blue-light);
    color: white;
    border: none;
    border-radius: 5px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-small:hover {
    background: var(--primary-blue);
    transform: scale(1.05);
}

.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .posicion-charts-grid {
        grid-template-columns: 1fr;
    }
}

/* --- PUNTOS DE POSICION --- */
.puntos-total-banner {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    color: white;
    border-radius: 12px;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.puntos-label {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.9;
}

.puntos-value {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.contratos-historico {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.contrato-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.7);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    border-left: 3px solid var(--primary-blue-light);
}

.contrato-pts-badge {
    font-weight: 700;
    color: var(--primary-blue);
    background: rgba(59,130,246,0.1);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.posicion-charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 0;
}

.posicion-card {
    text-align: center;
    padding: 20px;
}

.posicion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.posicion-header i {
    font-size: 1.8rem;
}

.posicion-header h4 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--primary-blue);
}

.posicion-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.posicion-badge {
    margin-left: auto;
    background: #22c55e;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.posicion-info {
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.chart-container-sm {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.chart-center-text span {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.ejecutivo-card .posicion-header i { color: #f59e0b; }
.coordinador-card .posicion-header i { color: #6366f1; }
.director-card .posicion-header i { color: #eab308; }

/* Countdown cards */
.countdown-card {
    text-align: center;
}

.countdown-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.countdown-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-blue);
}

.countdown-number.vencido {
    color: #ef4444;
}

.countdown-number.conseguido {
    color: #22c55e;
    font-size: 2rem;
}

.countdown-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.fecha-inicio-input {
    padding: 10px 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    background: rgba(255,255,255,0.8);
    transition: var(--transition);
}

.fecha-inicio-input:focus {
    border-color: var(--primary-blue-light);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* ================================================================ */
/* RECURSOS ADICIONALES — CALCULADORA COMPARADORA                    */
/* ================================================================ */

/* --- Inputs panel grid --- */
.calc-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 10px;
}

@media (max-width: 860px) {
    .calc-inputs-grid { grid-template-columns: 1fr; }
}

.calc-panel {
    background: rgba(248,250,252,0.8);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 20px;
}

.calc-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calc-field-single {
    margin-bottom: 14px;
}

.calc-label-top {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.calc-table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 4px 4px;
    border-bottom: 2px solid rgba(0,0,0,0.07);
    margin-bottom: 4px;
}

.calc-section-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 4px 2px;
    background: rgba(59,130,246,0.06);
    border-radius: 4px;
    margin: 4px 0;
}

.calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    align-items: center;
    padding: 4px 0;
}

.calc-row:has(input:only-of-type) {
    grid-template-columns: 1fr 1fr;
}

.calc-concept {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* RED INPUT — cells that user must fill */
.calc-input-red {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #ef4444;
    border-radius: 7px;
    font-size: 0.88rem;
    font-family: 'Outfit', sans-serif;
    background: #fff5f5;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.calc-input-red:focus {
    border-color: #dc2626;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}

.calc-auto-cell {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 10px;
    background: rgba(0,0,0,0.04);
    border-radius: 7px;
    border: 1px solid rgba(0,0,0,0.07);
    text-align: center;
}

/* Tariff blocks in right panel */
.calc-tariff-block {
    margin-bottom: 14px;
}

.calc-tariff-header {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-blue);
    padding: 5px 6px;
    background: rgba(59,130,246,0.08);
    border-radius: 5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ekyner-ref-block .calc-tariff-header,
.ekyner-header {
    background: rgba(16,185,129,0.1);
    color: #059669;
}

.calc-ref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 6px;
    font-size: 0.83rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.calc-ref-row span:last-child {
    font-weight: 700;
    color: #059669;
}

/* Results divider */
.calc-results-divider {
    display: flex;
    align-items: center;
    margin: 30px 0 20px;
    gap: 15px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--primary-blue);
    letter-spacing: 0.06em;
}

.calc-results-divider::before,
.calc-results-divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,0.3), transparent);
}

/* ---------------------------------------------------------------- */
/* COMPARISON TABLE                                                  */
/* ---------------------------------------------------------------- */
.comp-table {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 24px;
    font-size: 0.88rem;
}

.comp-head {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.5fr;
    background: var(--primary-blue);
    color: white;
}

.comp-cell-label {
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
}

.comp-cell-group {
    border-left: 1px solid rgba(255,255,255,0.15);
    display: flex;
    flex-direction: column;
}

.comp-group-title {
    padding: 8px 16px;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.current-title { background: rgba(255,255,255,0.08); }
.ekyner-title  { background: rgba(16,185,129,0.3); }

.comp-subheads {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.comp-subheads span {
    padding: 6px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    opacity: 0.85;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.comp-section-row {
    background: rgba(59,130,246,0.08);
    color: var(--primary-blue);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 6px 16px;
    text-transform: uppercase;
    border-top: 1px solid rgba(0,0,0,0.06);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.comp-data-row,
.comp-total-row {
    display: grid;
    grid-template-columns: 2fr 0.75fr 0.75fr 0.75fr 0.75fr;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.comp-data-row {
    background: white;
    transition: background 0.15s;
}

.comp-data-row:hover { background: #f8faff; }

.comp-data-row span,
.comp-total-row span {
    padding: 9px 10px;
    display: flex;
    align-items: center;
}

.comp-concept { font-weight: 500; color: var(--text-primary); }
.comp-rate    { font-size: 0.8rem; color: var(--text-secondary); justify-content: center; }
.comp-imp     { font-weight: 600; justify-content: center; }
.ekyner-val   { color: #059669; }

.comp-disc-row { background: rgba(249,250,251,0.8); opacity: 0.85; font-style: italic; }

.comp-total-row {
    background: rgba(30,58,138,0.04);
    font-weight: 700;
    color: var(--primary-blue);
    border-top: 2px solid rgba(59,130,246,0.15);
}

.comp-grand-total {
    background: linear-gradient(90deg, rgba(30,58,138,0.06), rgba(59,130,246,0.04));
    border-top: 2px solid rgba(30,58,138,0.2);
    font-size: 1rem;
}

.comp-grand-total .ekyner-val { color: #059669; font-size: 1rem; }

/* ---------------------------------------------------------------- */
/* SAVINGS CARDS                                                     */
/* ---------------------------------------------------------------- */
.savings-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.saving-card {
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
    border: 2px solid transparent;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: var(--transition);
}

.saving-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }

.saving-icon { font-size: 1.8rem; margin-bottom: 6px; }
.saving-label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.3; }
.saving-value { font-size: 1.6rem; font-weight: 800; }

.current-company-card { border-color: #ef4444; }
.current-company-card .saving-icon { color: #ef4444; }
.current-company-card .saving-value { color: #ef4444; }

.ekyner-company-card { border-color: #10b981; }
.ekyner-company-card .saving-icon { color: #10b981; }
.ekyner-company-card .saving-value { color: #10b981; }

.period-saving-card { border-color: var(--primary-blue-light); }
.period-saving-card .saving-icon { color: var(--primary-blue-light); }
.period-saving-card .saving-value { color: var(--primary-blue-light); }

.annual-saving-card { border-color: #6366f1; }
.annual-saving-card .saving-icon { color: #6366f1; }
.annual-saving-card .saving-value { color: #6366f1; }

.percent-saving-card { border-color: #f59e0b; }
.percent-saving-card .saving-icon { color: #f59e0b; }
.percent-saving-card .saving-value { color: #f59e0b; }

/* ---------------------------------------------------------------- */
/* PREVIEW SUBSECTION (banner-style card)                           */
/* ---------------------------------------------------------------- */
.preview-subsection-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.preview-text-area { flex: 1; min-width: 200px; }
.preview-text-area h3 { margin-bottom: 0; }

.btn-preview-launch {
    width: auto !important;
    padding: 14px 32px !important;
    font-size: 1rem !important;
    white-space: nowrap;
    background: linear-gradient(135deg, #059669, #10b981) !important;
}

.btn-preview-launch:hover {
    box-shadow: 0 4px 18px rgba(16,185,129,0.4) !important;
}

/* ---------------------------------------------------------------- */
/* TIPS GRID                                                         */
/* ---------------------------------------------------------------- */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.tip-card {
    background: white;
    border-radius: 14px;
    padding: 22px 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.tip-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.10); }

.tip-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 14px;
}

.tip-card h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.tip-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ================================================================ */
/* MODAL: VISTA PREVIA CALCULADORA                                   */
/* ================================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.6);
    backdrop-filter: blur(8px);
    z-index: 50000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}

.modal-box {
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    border-radius: 20px;
    overflow-y: auto;
    animation: slideUpModal 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUpModal {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

.modal-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    color: var(--primary-blue);
    gap: 12px;
}

.modal-header-bar h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body-content { padding: 20px 24px 24px; }

/* Preview summary stat cards */
.preview-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.preview-stat-card {
    background: white;
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.preview-stat-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 6px; font-weight: 600; }
.preview-stat-value { font-size: 1.4rem; font-weight: 800; }
.preview-stat-sub   { font-size: 0.72rem; color: var(--text-secondary); margin-top: 3px; }

/* Preview detail table */
.preview-detail-table {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    font-size: 0.88rem;
}

.preview-detail-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    background: var(--primary-blue);
    color: white;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.preview-detail-header span,
.preview-detail-row span {
    padding: 10px 14px;
}

.preview-detail-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    background: white;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.preview-detail-row:hover { background: #f8faff; }

.preview-detail-row .ekyner-val { color: #059669; font-weight: 700; }

.preview-subtotal {
    background: rgba(59,130,246,0.04);
    font-weight: 700;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.preview-grand-total {
    background: var(--primary-blue);
    color: white;
    font-weight: 800;
    font-size: 0.95rem;
}

.preview-grand-total .ekyner-val { color: #6ee7b7; }

/* Vimeo external button override */
.btn-vimeo-external {
    background: #1ab7ea !important;
}
.btn-vimeo-external:hover {
    background: #0f9fd0 !important;
    box-shadow: 0 4px 12px rgba(26,183,234,0.35) !important;
}

/* ================================================================ */
/* DATOS DEL CLIENTE — 4 campos amarillos                            */
/* ================================================================ */
.client-data-block {
    background: rgba(254,252,232,0.8);
    border: 2px solid #eab308;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.client-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
}

@media (max-width: 700px) {
    .client-data-grid { grid-template-columns: 1fr; }
}

.client-field { display: flex; flex-direction: column; }

/* YELLOW INPUT */
.calc-input-yellow {
    width: 100%;
    padding: 9px 12px;
    border: 2px solid #eab308;
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: 'Outfit', sans-serif;
    background: #fefce8;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
    font-weight: 600;
}

.calc-input-yellow:focus {
    border-color: #ca8a04;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(234,179,8,0.2);
}

/* ================================================================ */
/* BOTÓN DESCARGAR PDF                                               */
/* ================================================================ */
.btn-pdf-download {
    width: auto !important;
    padding: 16px 48px !important;
    font-size: 1.05rem !important;
    background: linear-gradient(135deg, #b91c1c, #ef4444) !important;
    letter-spacing: 0.02em;
    gap: 10px;
}

.btn-pdf-download:hover {
    box-shadow: 0 6px 24px rgba(185,28,28,0.4) !important;
    transform: translateY(-2px);
}

.btn-pdf-download:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ================================================================ */
/* OFFER COMPANY SELECTOR                                            */
/* ================================================================ */
.offer-selector-block {
    margin-top: 16px;
    border: 2px solid rgba(59,130,246,0.2) !important;
    background: rgba(239,246,255,0.5);
    border-radius: 10px;
}

.offer-selector-header {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6) !important;
    color: white !important;
    border-radius: 7px 7px 0 0;
    font-size: 0.82rem !important;
}

.offer-company-row {
    margin: 10px 0;
}

.offer-select {
    width: 100%;
    padding: 9px 12px;
    border: 2px solid rgba(59,130,246,0.35);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    background: white;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%233b82f6' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.offer-select:focus {
    border-color: var(--primary-blue-light);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* Rates preview grid */
.offer-rates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(59,130,246,0.2);
}

.offer-rate-item {
    display: flex;
    flex-direction: column;
    padding: 6px 8px;
    background: white;
    border-radius: 7px;
    border: 1px solid rgba(59,130,246,0.12);
}

.offer-rate-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 3px;
}

.offer-rate-value {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-blue);
}

/* ================================================================ */
/* CALC ACTION ROW (Calcular + PDF side by side)                     */
/* ================================================================ */
.calc-action-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 25px 0 10px;
    flex-wrap: wrap;
}

.btn-calc-action {
    width: auto !important;
    padding: 14px 40px !important;
    font-size: 1.05rem !important;
}

/* ================================================================ */
/* CALCULADORA DE INGRESOS — Spreadsheet style                       */
/* ================================================================ */

/* Global params row */
.inc-params-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 900px) { .inc-params-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .inc-params-grid { grid-template-columns: 1fr; } }

.inc-param-field { display: flex; flex-direction: column; }

.inc-param-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.inc-input-global {
    flex: 1;
    padding: 8px 10px;
    border: 2px solid #eab308;
    border-radius: 7px;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    background: #fefce8;
    color: #1a1a1a;
    text-align: center;
    outline: none;
    transition: var(--transition);
}
.inc-input-global:focus {
    border-color: #ca8a04;
    box-shadow: 0 0 0 3px rgba(234,179,8,0.2);
    background: #fff;
}

.inc-unit {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* BAC wrapper */
.bac-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(0,0,0,0.08);
}

.bac-lateral {
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    min-width: 44px;
    width: 44px;
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-align: center;
    padding: 14px 6px;
    flex-shrink: 0;
}

.bac-directo-bg  { background: #92D050; color: #000; }
.bac-indirecto-bg { background: #FFC000; color: #000; }

.bac-content { flex: 1; overflow: hidden; }

/* Scrollable table container */
.inc-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Main income table */
.inc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    font-family: 'Outfit', sans-serif;
    min-width: 680px;
}

.inc-table thead tr {
    background: #FFD700;
}

.inc-table th {
    background: #FFD700;
    color: #000;
    font-weight: 800;
    text-align: center;
    padding: 7px 5px;
    border: 1px solid #B8860B;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* Column widths */
.th-servicio  { min-width: 110px; text-align: left !important; padding-left: 8px !important; }
.th-bono      { min-width: 80px; }
.th-nfact     { min-width: 70px; }
.th-reparto   { min-width: 95px; }
.th-pct       { min-width: 72px; background: #00B0F0 !important; border-color: #0077AA !important; }
.th-ingr      { min-width: 90px; background: #92D050 !important; border-color: #286000 !important; }
.th-extra     { min-width: 80px; }
.th-pts       { min-width: 60px; }

.inc-table td {
    padding: 5px 6px;
    border: 1px solid #ccc;
    text-align: center;
    vertical-align: middle;
    color: #111;
    background: #fff;
}

/* Service label cell */
.td-servicio {
    text-align: left !important;
    font-weight: 700;
    font-size: 0.75rem;
    padding-left: 8px !important;
    background: #E2EFDA !important;
    white-space: nowrap;
}

/* Auto-calculated (blue tint) */
.td-auto {
    background: #BDD7EE !important;
    font-weight: 700;
    color: #1a3d66 !important;
}

/* Fixed constant cells */
.td-fixed {
    background: #E2EFDA !important;
    font-weight: 700;
    color: #2a5900;
}

/* Info label cells */
.td-label {
    background: #FFF2CC !important;
    font-size: 0.68rem;
    font-weight: 700;
    color: #614300;
    white-space: nowrap;
    text-align: left !important;
    padding-left: 5px !important;
}

/* Percentage merged cell */
.td-pct {
    background: #00B0F0 !important;
    font-size: 1.6rem !important;
    font-weight: 900 !important;
    color: #00264d !important;
    text-align: center;
    vertical-align: middle;
    border: 2px solid #0077AA !important;
}

.td-pct-small {
    background: #00B0F0 !important;
    font-weight: 800 !important;
    color: #00264d !important;
}

/* Income result cells */
.td-ingr {
    background: #92D050 !important;
    color: #003300 !important;
    font-weight: 800 !important;
}

/* Total row */
.inc-total-row td {
    background: #FFC000 !important;
    font-weight: 800;
    color: #000 !important;
    border: 1px solid #996000 !important;
}
.inc-total-row .td-ingr {
    background: #FF9900 !important;
    color: #000 !important;
}

/* Electricity row highlight */
.inc-row-elec td { background: #E7F3DA; }

/* Yellow input inside table */
.inc-input {
    width: 100%;
    min-width: 50px;
    padding: 4px 5px;
    border: 2px solid #eab308;
    border-radius: 5px;
    font-size: 0.8rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    background: #FFFF00;
    color: #1a1a1a;
    text-align: center;
    outline: none;
    box-sizing: border-box;
}
.inc-input:focus {
    border-color: #ca8a04;
    box-shadow: 0 0 0 2px rgba(234,179,8,0.3);
}

.inc-input-sm {
    width: 70px !important;
    min-width: 50px;
}

/* Grand total cell */
.td-grand-total {
    background: #FF0000 !important;
    color: #fff !important;
    font-size: 1.1rem !important;
    font-weight: 900 !important;
}

/* Category column (ING. ACTIVO / PASIVO) */
.td-category {
    background: #FF99CC !important;
    font-weight: 900;
    font-size: 0.72rem;
    color: #800040 !important;
    vertical-align: middle;
    width: 48px;
}

/* Ingresos totales layout */
.inc-totales-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.inc-totales-main {
    flex: 1;
    display: flex;
    align-items: stretch;
    gap: 0;
    min-width: 300px;
}

.inc-totales-label {
    background: #FF99CC;
    color: #800040;
    font-weight: 900;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 12px;
    min-width: 80px;
    border-radius: 8px 0 0 8px;
    line-height: 1.4;
}

.inc-totales-table { min-width: 380px; }

/* Méritos panel */
.inc-meritos-panel {
    min-width: 190px;
    border: 2px solid #FFD700;
    border-radius: 10px;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
}

.meritos-header {
    background: #FFD700;
    color: #000;
    font-weight: 900;
    font-size: 0.78rem;
    text-align: center;
    padding: 8px;
    letter-spacing: 0.05em;
}

.meritos-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    border-bottom: 1px solid #FFD700;
    gap: 8px;
    background: #fffbeb;
}

.meritos-row span:first-child {
    font-size: 0.72rem;
    font-weight: 700;
    color: #6b4d00;
    white-space: nowrap;
}

.meritos-auto {
    background: #BDD7EE;
    color: #1a3d66;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 4px;
    min-width: 40px;
    text-align: center;
}

/* New Summary & Pasivos Styles */
.inc-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}
@media (max-width: 850px) { .inc-summary-grid { grid-template-columns: 1fr; } }

.pasivos-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pasivo-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 5px;
    border-left: 3px solid var(--primary-blue);
}

.pasivo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 8px;
    gap: 10px;
    flex-wrap: wrap;
}

.pasivo-data { font-size: 0.85rem; }
.pasivo-data span { color: var(--text-secondary); margin-right: 5px; }

.pasivo-result {
    font-weight: 900;
    color: #10b981;
    font-size: 1.1rem;
    background: rgba(16,185,129,0.1);
    padding: 5px 12px;
    border-radius: 6px;
}

.pasivo-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

/* Earnings Panel */
.highlight-gold {
    border: 2px solid #eab308 !important;
    background: linear-gradient(145deg, rgba(234,179,8,0.05), transparent) !important;
}

.text-gold { color: #eab308 !important; }

.ganancias-total-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ganancia-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ganancia-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.ganancia-value {
    font-weight: 700;
    font-size: 1rem;
}

.ganancia-divider {
    height: 1px;
    background: rgba(234,179,8,0.2);
    margin: 5px 0;
}

.ganancia-item.big {
    margin-top: 5px;
}

.ganancia-value-total {
    font-size: 1.6rem;
    font-weight: 900;
    color: #eab308;
    text-shadow: 0 0 15px rgba(234,179,8,0.3);
}

.ganancia-value-pasivo {
    font-size: 1.2rem;
    font-weight: 800;
    color: #10b981;
}

/* Pack Bonus Badge */
.pack-bonus-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1e293b;
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(234,179,8,0.3);
}

.pack-bonus-label {
    font-size: 0.75rem;
    font-weight: 900;
    color: #eab308;
    letter-spacing: 0.1em;
}

.pack-bonus-counter {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 6px;
}

.pack-bonus-total {
    font-size: 1rem;
    font-weight: 900;
    color: #10b981;
}

.readonly {
    cursor: default;
    user-select: none;
}

/* Progress Bar Pack 5 */
.pack-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0,0,0,0.08);
    border-radius: 10px;
    margin: 8px 0 4px;
    overflow: hidden;
}
#pack-progress-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #eab308, #d97706);
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.3);
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pack-progress-text {
    font-size: 0.72rem;
    color: #475569;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 768px) {
    .inc-grid { grid-template-columns: 1fr; }
    .calculator-wrapper { overflow-x: auto; }
}
/* ================================================================ */
/* ANIMACIÓN HOMER CELEBRATION                                       */
/* ================================================================ */
.ganancias-container {
    position: relative;
    overflow: visible !important;
}

.homer-celebration {
    position: absolute;
    bottom: -10px; /* Sale ligeramente por debajo para dar profundidad */
    left: 50%;
    transform: translate(-50%, 100%) scale(0.5); /* Empieza fuera y pequeño */
    width: 220px; /* Aumentado para que el texto del bocadillo sea claro */
    height: auto;
    z-index: 1000; /* Asegurar que está por encima de todo */
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    /* mix-blend-mode: screen; */ /* Opcional: si el fondo es negro puro, lo hace transparente */
}

.homer-visible {
    opacity: 1 !important;
    transform: translate(-50%, 0) scale(1) !important;
    animation: homer-yuju 2s ease-in-out infinite;
}

.homer-hidden {
    opacity: 0 !important;
    transform: translate(-50%, 100px) scale(0.3) !important;
}

@keyframes homer-yuju {
    0%, 100% { transform: translate(-50%, 0) rotate(0deg); }
    25% { transform: translate(-50%, -15px) rotate(5deg); }
    50% { transform: translate(-50%, 0) rotate(0deg); }
    75% { transform: translate(-50%, -15px) rotate(-5deg); }
}

@media (max-width: 600px) {
    .homer-celebration {
        width: 160px;
        bottom: -5px;
    }
}

/* --- TARJETAS TIPO CARPETA (Folder Docs) --- */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 20px;
    padding: 10px;
}
.folder-card {
    background-color: #f6f7f9;
    border-radius: 16px;
    padding: 30px 20px;
    position: relative;
    cursor: pointer;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
    text-align: left;
}
.folder-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    border-color: #d1d5db;
}
.folder-card::before {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 65%;
    height: 24px;
    background-color: #d1d5db;
    border-top-right-radius: 16px;
    border-bottom-left-radius: 20px;
    clip-path: polygon(15px 0, 100% 0, 100% 100%, 0 100%);
    transition: background-color 0.2s;
}
.folder-card:hover::before {
    background-color: #9ca3af;
}
.folder-card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}
.folder-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

/* --- PAYMENT BUTTONS --- */
.payment-buttons-row {
    margin-top: 15px;
    display: flex;
    gap: 12px;
}

.btn-paypal {
    transition: var(--transition);
    border: 1px solid rgba(0, 112, 186, 0.2);
    box-shadow: 0 4px 12px rgba(0, 112, 186, 0.2);
}

.btn-paypal:hover {
    background: #005ea6 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 112, 186, 0.3);
}

.btn-stripe {
    transition: var(--transition);
    border: 1px solid rgba(99, 91, 255, 0.2);
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.2);
}

.btn-stripe:hover {
    background: #4f46e5 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(99, 91, 255, 0.3);
}

/* --- BOOK CARDS ENHANCEMENTS --- */
.folder-card.download-link {
    position: relative;
    padding-bottom: 20px;
}

.download-overlay-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: var(--primary-blue-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
}

.folder-card:hover .download-overlay-btn {
    opacity: 1;
    transform: scale(1);
}

.download-overlay-btn:hover {
    background: var(--primary-blue);
    transform: scale(1.15) !important;
}

/* --- MOBILE RESPONSIVE STYLES --- */

/* Mobile Header (Hidden on Desktop) */
.mobile-header {
    display: none;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    /* Mobile Header Activation */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 15px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 70px;
        padding: 0 20px;
        z-index: 900;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: var(--shadow-soft);
    }

    .mobile-logo-text {
        font-size: 1.5rem;
        color: var(--primary-blue);
        margin: 0;
        font-weight: 700;
        text-align: center;
        gap: 25px;
    }

    /* Sidebar goes off-canvas */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -320px !important;
        height: 100vh !important;
        max-height: 100vh !important;
        width: 280px !important;
        margin: 0 !important;
        border-radius: 0 !important;
        z-index: 1000 !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border: none !important;
        border-right: 1px solid var(--glass-border) !important;
        background: rgba(255, 255, 255, 0.98) !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .sidebar.open {
        left: 0 !important;
    }
    
    .sidebar-nav {
        flex: 1 !important;
        overflow-y: auto !important;
        padding-bottom: 20px !important;
    }

    /* Native mobile body scroll instead of constrained inner scroll */
    body {
        overflow-y: auto !important;
        height: auto !important;
    }
    
    .app-container {
        height: auto !important;
        min-height: 100vh;
        overflow: visible !important;
        display: block;
    }

    /* Main Content adjustment */
    .main-content {
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }
    
    .content-wrapper {
        padding: 15px 15px 40px 15px !important;
        overflow: visible !important;
        height: auto !important;
    }

    /* Top Header (Título sección + Botones Admin/Líder) */
    .top-header {
        padding-top: 85px !important;  /* Clears the fixed 70px mobile-header + 15px extra space */
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-bottom: 15px !important;
        margin-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        background: transparent !important;
    }
    
    .top-header > div {
        width: 100% !important;
        flex-direction: column !important; /* Stack the buttons on mobile */
        gap: 10px !important;
    }
    
    .top-header > div > button {
        width: 100% !important;
        justify-content: center !important;
    }

    .hero-image {
        justify-content: center;
        flex-direction: column;
        width: 100%;
    }

    .hero-image img, 
    .crowdfunding-banner {
        width: 100%;
        max-width: 100%;
    }
    /* Grids */
    .videos-grid,
    .resources-grid,
    .posicion-charts-grid,
    #admin-boxes-container,
    #leader-boxes-container {
        grid-template-columns: 1fr;
    }
    
    .folder-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Target Charts & Header */
    #bienvenida-objetivos-container > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    #bienvenida-objetivos-container > div:first-child h3 {
        font-size: 1.2rem !important; /* Slightly smaller to fit better */
    }
    
    #bienvenida-objetivos-container > div:nth-child(2) {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Tareas Banner */
    #tasks-banner-container > div {
        flex-direction: column !important;
    }
    
    #tasks-banner-container > div > div:first-child {
        min-width: 100% !important;
        padding: 15px !important;
    }
    
    #tasks-list-scroll {
        flex-direction: column !important;
        align-items: stretch !important;
        white-space: normal !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        max-height: 250px !important;
        padding: 15px !important;
        gap: 15px !important;
    }

    /* Chatbot Widget - Mobile overrides */
    .chatbot-widget {
        bottom: 20px !important;
        right: 20px !important;
    }
    .chatbot-panel {
        width: calc(100vw - 40px) !important;
        max-width: none !important;
        height: 65vh !important;
        max-height: 65vh !important;
        right: 20px !important;
        bottom: 85px !important;
    }

    /* Login Box */
    .login-box {
        padding: 30px 20px;
        margin: 0 15px;
    }

    /* Modals */
    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 25px 15px;
    }

    .admin-table-container,
    .leader-table-container {
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .folder-grid {
        grid-template-columns: 1fr;
    }
    
    .folder-card {
        padding: 25px;
    }

    .top-header h2 {
        font-size: 1.6rem;
    }
}

/* ==========================================================================
   ESTILOS CONTROL DE PROGRESO SEMANAL (MODAL BLANCO & TABLA NEGRA DE MATRIZ)
   ========================================================================== */

.progreso-modal-card {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25) !important;
    border-radius: 20px !important;
    max-width: 680px;
    width: 95vw;
}

.progreso-modal-card label {
    color: #334155 !important;
    font-weight: 800 !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
}

.scale-box {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 16px !important;
    margin-top: 8px !important;
}

.scale-box h4 {
    color: #1e3a8a !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    margin-bottom: 4px !important;
}

.scale-box p {
    color: #64748b !important;
    font-size: 0.82rem !important;
    margin-bottom: 12px !important;
}

/* Redondeles del 0 al 20 */
.scale-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
}

.scale-btn {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important; /* REDONDELES */
    border: 2px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #1e293b !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
}

.scale-btn:hover {
    transform: scale(1.15) !important;
    border-color: #2563eb !important;
    background: #eff6ff !important;
    color: #1e3a8a !important;
}

/* Active State Objective (Amber) */
.scale-btn-obj.active {
    background: #f59e0b !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
    transform: scale(1.15) !important;
}

/* Active State Realized (Green) */
.scale-btn-real.active {
    background: #10b981 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
    transform: scale(1.15) !important;
}

.scale-label-selected {
    margin-top: 12px !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    background: #f1f5f9 !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    border: 1px solid #cbd5e1 !important;
}

/* Professional Matrix Table with Solid Black Borders */
.matrix-table-container {
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 24px !important;
    border: 2px solid #000000 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    overflow-x: auto !important;
    margin-top: 20px !important;
}

.matrix-table-container h3 {
    color: #1e3a8a !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
}

.matrix-table {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important; /* BORDE FORMATO TABLA REGULAR */
    border: 2px solid #000000 !important;
    margin-top: 15px !important;
}

.matrix-table thead {
    display: table-header-group !important;
}

.matrix-table tbody {
    display: table-row-group !important;
}

.matrix-table tr {
    display: table-row !important;
}

.matrix-table th {
    display: table-cell !important;
    background: #0f172a !important;
    color: #ffffff !important;
    padding: 12px 10px !important;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    text-align: center !important;
    border: 1px solid #000000 !important; /* BORDES NEGROS */
    white-space: nowrap !important;
    letter-spacing: 0.5px !important;
}

.matrix-table th.name-th {
    text-align: left !important;
    min-width: 220px !important;
    width: 220px !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 3 !important;
    background: #0f172a !important;
    padding-left: 14px !important;
}

.matrix-table th.motivos-th {
    text-align: left !important;
    min-width: 320px !important;
    width: 320px !important;
    padding-left: 14px !important;
}

.matrix-table td {
    display: table-cell !important;
    padding: 10px 8px !important;
    text-align: center !important;
    font-size: 0.88rem !important;
    background: #ffffff !important;
    border: 1px solid #000000 !important; /* BORDES NEGROS ENTRE CASILLAS */
    vertical-align: middle !important;
    transition: all 0.2s ease !important;
}

.matrix-table td.name-cell {
    text-align: left !important;
    font-weight: 800 !important; /* NOMBRES EN NEGRITA */
    color: #000000 !important;
    background: #f8fafc !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 2 !important;
    min-width: 220px !important;
    width: 220px !important;
    padding-left: 14px !important;
    border: 1px solid #000000 !important;
}

.matrix-table td.motivos-cell {
    text-align: left !important;
    color: #1e293b !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    background: #ffffff !important;
    min-width: 320px !important;
    width: 320px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    line-height: 1.4 !important;
    border: 1px solid #000000 !important; /* BORDES NEGROS */
    white-space: normal !important;
    word-wrap: break-word !important;
}

.matrix-cell-clickable {
    cursor: pointer !important;
    min-width: 75px !important;
    width: 75px !important;
}

.matrix-cell-clickable:hover {
    background: #f1f5f9 !important;
}

.pill-matrix {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 8px !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
    font-size: 0.88rem !important;
    letter-spacing: 0.5px !important;
    width: 100% !important;
    text-align: center !important;
}

.pill-green {
    background: #dcfce7 !important;
    border: 1.5px solid #16a34a !important;
    color: #15803d !important;
}

.pill-yellow {
    background: #fef9c3 !important;
    border: 1.5px solid #eab308 !important;
    color: #854d0e !important;
}

.pill-orange {
    background: #ffedd5 !important;
    border: 1.5px solid #f97316 !important;
    color: #c2410c !important;
}

.pill-amber {
    background: #fef3c7 !important;
    border: 1.5px solid #d97706 !important;
    color: #b45309 !important;
}

.pill-red {
    background: #fee2e2 !important;
    border: 1.5px solid #dc2626 !important;
    color: #b91c1c !important;
}

.pill-empty {
    background: #f8fafc !important;
    border: 1px dashed #94a3b8 !important;
    color: #64748b !important;
    font-weight: 600 !important;
}




