/* Danger Tab (Cierre Caja) */
.tab-btn.danger-tab {
    color: #E11D48 !important;
    font-weight: 900;
}

.sidebar-nav .tab-btn.danger-tab i {
    color: #E11D48 !important;
}

/* --- BRANCH MANAGEMENT ELITE --- */
.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.branch-card-elite {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.branch-card-elite:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-soft);
}

.branch-card-inner {
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.branch-status-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.branch-status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.branch-status-pill.active {
    background: #ecfdf5;
    color: #059669;
}

.branch-status-pill.inactive {
    background: #fef2f2;
    color: #dc2626;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.branch-type-tag {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    background: #f8fafc;
    padding: 4px 8px;
    border-radius: 6px;
}

.branch-visual-icon {
    font-size: 2.2rem;
    color: #cbd5e1;
    margin-bottom: 20px;
    transition: color 0.3s;
}

.branch-card-elite:hover .branch-visual-icon {
    color: var(--primary-soft);
}

.branch-label {
    font-size: 1.15rem;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 8px 0;
    font-family: 'Outfit', sans-serif;
}

.branch-location {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

.branch-location i {
    color: #94a3b8;
    margin-top: 2px;
}

.branch-stats-lite {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
}

.branch-card-footer {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn-branch-action {
    height: 44px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}

.btn-branch-action.edit {
    flex: 1;
    background: #f1f5f9;
    color: #1e293b;
    font-size: 0.9rem;
    gap: 8px;
}

.btn-branch-action.edit:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-branch-action.delete {
    width: 44px;
    background: #fff1f2;
    color: #e11d48;
    font-size: 1.2rem;
}

.btn-branch-action.delete:hover {
    background: #ffe4e6;
    color: #9f1239;
    transform: scale(1.05);
}

.tab-btn.danger-tab.active {
    background: #FFF1F2 !important;
    border: 1.5px solid #E11D48 !important;
}

.tab-btn.danger-tab:hover {
    background: #FFE4E6 !important;
    color: #BE123C !important;
}

.tab-btn.danger-tab:hover i {
    color: #BE123C !important;
}


/* NUCLEUS ACTION BUTTONS V4 - NUCLEAR MASTER GRADE */
td .n-action-btn, .n-action-btn {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.25rem !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    background: #ffffff !important;
    border: 1.5px solid #f1f5f9 !important;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
    vertical-align: middle !important;
    padding: 0 !important;
    margin: 0 4px !important;
    color: #64748b !important;
}

.n-action-btn:hover {
    transform: translateY(-4px) scale(1.1) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
    background: white !important;
}

.n-btn-globe:hover { color: #2563eb !important; border-color: #2563eb !important; }
.n-btn-suspend:hover { color: white !important; background: #ef4444 !important; border-color: #ef4444 !important; }
.n-btn-edit:hover { color: white !important; background: #0f172a !important; border-color: #0f172a !important; }

/* FIX: Contenedores pegados */
#view-nucleus, #nucleus-view-tenants {
    padding: 2.5rem !important;
    min-height: 100vh;
    background: #f8fafc;
}

.nucleus-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.nucleus-metric-card {
    position: relative;
    padding: 2rem;
    border-radius: 24px;
    overflow: hidden;
    color: white;
    border: none;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nucleus-metric-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
}

.n-card-brand-red { background: linear-gradient(135deg, #D31628 0%, #830E19 100%); }
.n-card-midnight { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); }
.n-card-titanium { background: linear-gradient(135deg, #334155 0%, #475569 100%); }

.nucleus-metric-label { font-size: 0.9rem; font-weight: 800; opacity: 0.8; margin-bottom: 0.5rem; }
.nucleus-metric-value { font-size: 2.8rem; font-weight: 950; margin: 0.5rem 0; letter-spacing: -1px; }

.nucleus-section-container {
    background: white;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.n-action-btn i {
    pointer-events: none;
    line-height: 0;
    display: block;
}
