/* --- NUCLEUS CONTROL CENTER - ULTRA PREMIUM --- */
#view-nucleus {
    padding: 130px 30px 30px 30px !important;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
    font-family: 'Outfit', sans-serif;
}

.nucleus-header {
    background: #ffffff;
    padding: 40px 50px;
    border-radius: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.03);
    width: 100%;
    margin-top: 20px !important;
}

.nucleus-header-watermark {
    position: absolute;
    right: -40px;
    top: -40px;
    font-size: 20rem;
    color: var(--primary);
    opacity: 0.03;
    z-index: 1;
    transform: rotate(-15deg);
}

.nucleus-title {
    font-size: 3.2rem;
    font-weight: 950;
    color: #020617;
    letter-spacing: -2.5px;
    line-height: 0.9;
    margin-bottom: 20px;
    font-style: italic;
}

.nucleus-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 10px;
    font-style: italic;
}

.nucleus-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    color: #16a34a;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid #dcfce7;
}

.nucleus-indicator-dot {
    width: 12px;
    height: 12px;
    background: #16a34a;
    border-radius: 50%;
    animation: nucleus-pulse 2s infinite;
}

@keyframes nucleus-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4);
    }
    70% {
        transform: scale(1.2);
        box-shadow: 0 0 0 12px rgba(22, 163, 74, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
    }
}

.nucleus-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    width: 100%;
}

.nucleus-metric-card {
    padding: 25px 30px;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
    color: white;
    display: flex;
    flex-direction: column;
    min-height: 170px;
}

.n-card-brand-red {
    background: linear-gradient(135deg, #D31628 0%, #830E19 100%);
}

.n-card-midnight {
    background: linear-gradient(135deg, #020617 0%, #1e293b 100%);
}

.n-card-titanium {
    background: linear-gradient(135deg, #64748b 0%, #334155 100%);
}

.n-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.n-card-pill {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nucleus-card-watermark {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    font-size: 7rem;
    color: rgba(255, 255, 255, 0.1);
    z-index: 1;
    pointer-events: none;
}

.nucleus-metric-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 !important;
    font-style: italic;
}

.nucleus-metric-value {
    font-size: 3.5rem;
    font-weight: 950;
    color: white !important;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.n-card-footer {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    font-style: italic;
}

.n-card-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    overflow: hidden;
    margin-top: auto;
}

.n-bar {
    height: 100%;
    background: white;
    border-radius: 100px;
    opacity: 0.8;
}

.nucleus-metric-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

.nucleus-section-container {
    background: white;
    border-radius: 40px;
    padding: 50px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.02);
    border: 1px solid #f8fafc;
}

.nucleus-section-header {
    padding: 2rem 2.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nucleus-section-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nucleus-table-premium {
    width: 100%;
    border-collapse: collapse;
}

.nucleus-table-premium th {
    text-align: left;
    padding: 1.25rem 1rem;
    font-size: 10px;
    font-weight: 900;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: #f8fafc;
}

.nucleus-table-premium td {
    padding: 1rem 1rem;
    border-bottom: 1px solid #f8fafc;
    vertical-align: middle;
}

.nucleus-table-premium tr:last-child td {
    border-bottom: none;
}

.nucleus-tenant-name {
    font-weight: 950;
    color: #020617;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.nucleus-tenant-id {
    font-family: monospace;
    font-size: 10px;
    color: #94a3b8;
    font-weight: 700;
    margin-top: 2px;
}

.hidden { display: none !important; }
.flex { display: flex !important; }
.justify-between { justify-content: space-between !important; }
.items-center { align-items: center !important; }
.gap-10 { gap: 2.5rem !important; }
.w-full { width: 100% !important; }

/* --- FORGE DE PLANES - TAB SYSTEM --- */
.n-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nucleus-tab-btn {
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 12px 24px;
    border-radius: 18px;
    color: #64748b;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.nucleus-tab-btn i {
    font-size: 1.1rem;
    color: #94a3b8;
}

.nucleus-tab-btn:hover {
    background: #ffffff;
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.nucleus-tab-btn.active {
    background: #0f172a;
    color: white;
    box-shadow: 0 12px 20px -5px rgba(15, 23, 42, 0.3);
    border-color: #1e293b;
    transform: translateY(-1px);
}

.nucleus-tab-btn.active i {
    color: var(--primary); /* Gold/Red indicator */
}

.nucleus-btn-premium {
    padding: 12px 24px;
    border-radius: 18px;
    font-weight: 900;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nucleus-btn-green {
    background: #22c55e;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(34, 197, 94, 0.3);
}

.nucleus-btn-green:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(34, 197, 94, 0.4);
}

.nucleus-plans-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 2.5rem 0;
}

.nucleus-plan-card-premium {
    background: white;
    border-radius: 35px;
    padding: 35px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.nucleus-plan-card-premium:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
    border-color: #e2e8f0;
}

.n-plan-title {
    font-size: 2.2rem;
    font-weight: 950;
    color: #0f172a;
    margin-bottom: 5px;
    letter-spacing: -1.5px;
}

.n-plan-price {
    font-size: 1.2rem;
    font-weight: 850;
    color: var(--primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.n-plan-feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    flex-grow: 1;
}

.n-plan-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
}

.n-plan-feature-item i {
    font-size: 1.1rem;
    color: #10b981;
}

.n-plan-feature-item.disabled {
    color: #cbd5e1;
    text-decoration: line-through;
    opacity: 0.6;
}

.n-plan-feature-item.disabled i {
    color: #94a3b8;
}

/* --- CB WRAPPER PREMIUM --- */
.checkbox-wrapper-premium {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-wrapper-premium:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.checkbox-wrapper-premium input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #0f172a;
    cursor: pointer;
}

.cb-label {
    font-size: 0.85rem;
    color: #475569;
}

/* --- MODAL UPDATES --- */
.nucleus-modal-overlay {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.nucleus-input-premium {
    width: 100%;
    padding: 15px 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.2s;
    outline: none;
}

.nucleus-input-premium:focus {
    border-color: #0f172a;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.05);
}

.nucleus-label-premium {
    font-size: 0.7rem;
    font-weight: 950;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    display: block;
}

/* --- PREMIUM MODAL ENHANCEMENTS & BRANDING --- */

.nucleus-modal-card {
    background: #ffffff;
    width: 100%;
    border-radius: 28px !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18) !important;
    overflow: hidden;
}

.nucleus-modal-header {
    background: #ffffff;
    padding: 2rem 2.5rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.nucleus-modal-body {
    padding: 2.5rem 2.5rem !important;
}

.nucleus-modal-footer {
    padding: 1.5rem 2.5rem !important;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

/* Custom Select Dropdowns */
select.nucleus-input-premium {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1rem;
    padding-right: 3rem !important;
    cursor: pointer;
}

/* Premium Brand Action Buttons */
.nucleus-btn-brand {
    background: linear-gradient(135deg, #D31628 0%, #830E19 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 18px !important;
    font-weight: 900 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(211, 22, 40, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none !important;
}

.nucleus-btn-brand:hover {
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 0 15px 30px rgba(211, 22, 40, 0.45) !important;
    filter: brightness(1.1) !important;
}

.nucleus-btn-brand:active {
    transform: translateY(0) scale(1) !important;
}

/* Focus alignment with brand identity */
.nucleus-input-premium:focus {
    border-color: #D31628 !important;
    box-shadow: 0 0 0 4px rgba(211, 22, 40, 0.1) !important;
}

/* --- NUCLEUS PAYMENT AND WHATSAPP ALERT IMPROVEMENTS --- */

/* WhatsApp Badge Capsule Buttons */
.n-wa-badge-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    font-family: var(--font-heading), sans-serif;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border-width: 1px !important;
    border-style: solid !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03) !important;
    text-transform: none !important;
    height: auto !important;
    width: auto !important;
}

.n-wa-badge-btn:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08) !important;
}

.n-wa-badge-btn:active {
    transform: translateY(0) scale(1) !important;
}

/* Variant colors: WhatsApp Green, Amber Warning, Crimson Alert */
.n-wa-welcome {
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}
.n-wa-welcome:hover {
    background: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
}

.n-wa-reminder {
    color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
}
.n-wa-reminder:hover {
    background: #f59e0b !important;
    color: white !important;
    border-color: #f59e0b !important;
}

.n-wa-suspension {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
}
.n-wa-suspension:hover {
    background: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
}

/* Payment Status Select */
.n-payment-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #0f172a !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 0.85rem !important;
    padding: 6px 2.2rem 6px 12px !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    font-family: var(--font-heading), sans-serif;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    border: 2px solid transparent !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
}

.n-payment-select[data-status="paid"] {
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.n-payment-select[data-status="pending"] {
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1) !important;
}

.n-payment-select[data-status="overdue"] {
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.n-payment-select:focus {
    box-shadow: 0 0 0 4px rgba(211, 22, 40, 0.15) !important;
}

/* Payment Date Picker */
.n-payment-date {
    background-color: #0f172a !important;
    border: 2px solid #334155 !important;
    color: #ffffff !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    font-family: var(--font-heading), sans-serif;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    outline: none !important;
}

.n-payment-date:focus {
    border-color: #D31628 !important;
    box-shadow: 0 0 0 3px rgba(211, 22, 40, 0.15) !important;
}

/* Remove default calendar icon styling on webkit for cleaner look, or customize */
.n-payment-date::-webkit-calendar-picker-indicator {
    filter: invert(1); /* makes the calendar icon white */
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.n-payment-date::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* WhatsApp action button inside table */
.n-btn-whatsapp {
    color: #25d366 !important;
    border-color: rgba(37, 211, 102, 0.15) !important;
    background: rgba(37, 211, 102, 0.05) !important;
}

.n-btn-whatsapp:hover {
    color: white !important;
    background: #25d366 !important;
    border-color: #25d366 !important;
}

/* WhatsApp Message Template Cards */
.wa-template-card {
    border: 2px solid #e2e8f0 !important;
    background: #ffffff !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.wa-template-card:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px);
}

.wa-template-card.active {
    border-color: #25D366 !important;
    background: rgba(37, 211, 102, 0.04) !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.06) !important;
}

/* --- UNIFIED NUCLEUS HEADER BUTTONS --- */
.nucleus-header button,
.nucleus-header .nucleus-tab-btn,
.nucleus-header .nucleus-btn-premium {
    height: 48px !important;
    box-sizing: border-box !important;
    font-size: 0.95rem !important; /* Matches NUEVO TENANT design */
    padding: 0 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 24px !important; /* Perfect pill shape for 48px height */
    font-weight: 900 !important; /* Premium brand weight */
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important; /* Force uniform uppercase */
    white-space: nowrap !important; /* Absolutely prevent line breaks and height mismatches */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    gap: 8px !important;
    cursor: pointer !important;
    outline: none !important;
}

/* Inactive tabs & Secondary button */
.nucleus-header .nucleus-tab-btn,
.nucleus-header .nucleus-btn-secondary {
    background: rgba(241, 245, 249, 0.8) !important;
    color: #475569 !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02) !important;
}

.nucleus-header .nucleus-tab-btn:hover,
.nucleus-header .nucleus-btn-secondary:hover {
    background: #ffffff !important;
    color: #0f172a !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05) !important;
    border-color: #cbd5e1 !important;
}

/* Active tab style */
.nucleus-header .nucleus-tab-btn.active {
    background: #0f172a !important;
    color: white !important;
    border: 1px solid #1e293b !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.3) !important;
}

.nucleus-header .nucleus-tab-btn.active:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.4) !important;
}

.nucleus-header .nucleus-tab-btn.active i {
    color: var(--primary) !important; /* Red indicator logo */
}

/* Brand Button (NUEVO TENANT) */
.nucleus-header .nucleus-btn-brand {
    background: linear-gradient(135deg, #D31628 0%, #830E19 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 8px 20px rgba(211, 22, 40, 0.25) !important;
}

.nucleus-header .nucleus-btn-brand:hover {
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 0 15px 30px rgba(211, 22, 40, 0.45) !important;
    filter: brightness(1.1) !important;
}

/* --- NUCLEUS RESPONSIVE OVERRIDES --- */
@media (max-width: 768px) {
    #view-nucleus {
        padding: 90px 15px 30px 15px !important;
        gap: 15px !important;
    }

    .nucleus-header {
        padding: 20px !important;
        border-radius: 20px !important;
        margin-top: 10px !important;
    }

    .nucleus-title {
        font-size: 1.8rem !important;
        letter-spacing: -1px !important;
        margin-bottom: 10px !important;
    }

    .nucleus-subtitle {
        font-size: 0.7rem !important;
        letter-spacing: 2px !important;
    }

    .nucleus-section-container {
        padding: 20px !important;
        border-radius: 20px !important;
    }

    .nucleus-section-header {
        padding: 1rem 0 !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .n-header-actions {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .nucleus-header button,
    .nucleus-header .nucleus-tab-btn,
    .nucleus-header .nucleus-btn-premium,
    .nucleus-header .nucleus-btn-brand {
        width: 100% !important;
        height: 40px !important;
        border-radius: 12px !important;
        font-size: 0.85rem !important;
        padding: 0 16px !important;
    }

    /* Table responsivity in Nucleus (convert to cards) */
    .nucleus-table-premium,
    .nucleus-table-premium thead,
    .nucleus-table-premium tbody,
    .nucleus-table-premium th,
    .nucleus-table-premium td,
    .nucleus-table-premium tr {
        display: block !important;
        width: 100% !important;
    }

    .nucleus-table-premium thead tr {
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
    }

    .nucleus-table-premium tr {
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        margin-bottom: 12px !important;
        background: #ffffff !important;
        padding: 10px !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.02) !important;
    }

    .nucleus-table-premium td {
        border-bottom: 1px solid #f8fafc !important;
        padding: 8px 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: right !important;
        font-size: 0.85rem !important;
    }

    .nucleus-table-premium td:last-child {
        border-bottom: none !important;
        justify-content: flex-end !important;
    }

    .nucleus-table-premium td::before {
        content: attr(data-label) !important;
        font-weight: 850 !important;
        color: #64748b !important;
        text-align: left !important;
        text-transform: uppercase !important;
        font-size: 0.7rem !important;
        letter-spacing: 0.5px !important;
        margin-right: 15px !important;
    }

    .nucleus-table-premium td[style*="text-align:right"] {
        justify-content: space-between !important;
    }

    .nucleus-plans-grid-v2 {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 1rem 0 !important;
    }

    .nucleus-plan-card-premium {
        padding: 20px !important;
        border-radius: 20px !important;
    }

    /* Ajustes específicos para las celdas de inquilino/negocio en las tablas de Nucleus en móvil */
    .nucleus-table-premium td[data-label="Inquilino"],
    .nucleus-table-premium td[data-label="Negocio"] {
        display: block !important;
        text-align: left !important;
        padding: 12px 10px !important;
    }

    .nucleus-table-premium td[data-label="Inquilino"]::before,
    .nucleus-table-premium td[data-label="Negocio"]::before {
        display: none !important;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    #view-nucleus {
        padding: 110px 20px 20px 20px !important;
    }
    
    .nucleus-header {
        padding: 30px !important;
    }

    .nucleus-title {
        font-size: 2.4rem !important;
    }

    .nucleus-section-container {
        padding: 30px !important;
    }
}

/* --- SUBTABS GESTIÓN DE SUSCRIPCIONES --- */
.nucleus-subtabs-container {
    display: flex;
    gap: 8px;
    margin: 15px 0 25px 0;
    flex-wrap: wrap;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.nucleus-subtab-btn {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    color: #64748b !important;
    font-weight: 800 !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    height: auto !important;
    text-transform: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.01) !important;
}

.nucleus-subtab-btn i {
    font-size: 1rem !important;
    color: #94a3b8 !important;
    transition: color 0.2s;
}

.nucleus-subtab-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

.nucleus-subtab-btn.active {
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15) !important;
}

.nucleus-subtab-btn.active i {
    color: #ef4444 !important;
}

.nucleus-subtab-count {
    background: rgba(148, 163, 184, 0.15);
    color: #64748b;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
}

.nucleus-subtab-btn.active .nucleus-subtab-count {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}


