/**
 * Estilos del Portal de Gestión Comercial & Login de Marca Blanca
 * Encolado exclusivamente en la página /portal/ (Cero bloat en el resto de la web)
 */

:root {
    --portal-primary: #0284c7;
    --portal-primary-dark: #0369a1;
    --portal-primary-light: #e0f2fe;
    --portal-bg: #f8fafc;
    --portal-surface: #ffffff;
    --portal-sidebar-bg: #0f172a;
    --portal-sidebar-text: #94a3b8;
    --portal-text-main: #1e293b;
    --portal-text-muted: #64748b;
    --portal-border: #e2e8f0;
    --portal-border-dark: #1e293b;
    --portal-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --portal-radius: 16px;
    --portal-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --portal-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --portal-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* RESET GENERAL PARA MODO APLICACIÓN FULLSCREEN */
body.concesionaria-portal-body {
    margin: 0 !important;
    padding: 0 !important;
    font-family: var(--portal-font) !important;
    background-color: var(--portal-bg) !important;
    color: var(--portal-text-main) !important;
    line-height: 1.5 !important;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

#concesionaria-portal-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#concesionaria-portal-root * {
    box-sizing: border-box;
}

/* AISLAMIENTO TOTAL: ANULACIÓN RADICAL DE BORDES Y COLORES DE TEMA (#c36) */
#concesionaria-portal-root button,
#concesionaria-portal-root [type="button"],
#concesionaria-portal-root [type="submit"],
#concesionaria-portal-root [type="reset"] {
    outline: none !important;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

#concesionaria-portal-root a {
    text-decoration: none;
}

/* ==========================================================================
   1. PANTALLA DE LOGIN DE MARCA BLANCA
   ========================================================================== */
.portal-auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: radial-gradient(circle at 50% 15%, #1e293b 0%, #0f172a 55%, #020617 100%);
    position: relative;
    overflow: hidden;
}

.portal-auth-container::before {
    content: "";
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 650px;
    height: 450px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.22) 0%, rgba(2, 132, 199, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.portal-auth-card {
    width: 100%;
    max-width: 450px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 42px 38px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 40px rgba(2, 132, 199, 0.15);
    position: relative;
    z-index: 1;
}

.portal-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.portal-auth-logo-wrap {
    background: rgba(255, 255, 255, 0.04);
    padding: 10px 18px;
    border-radius: 14px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
}

.portal-auth-logo {
    max-height: 56px;
    max-width: 230px;
    object-fit: contain;
    display: block;
    margin: 0 auto 22px auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
    transition: opacity 0.25s ease;
}

.portal-auth-logo:hover {
    opacity: 1;
}

.portal-auth-logo-text {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.portal-badge-security {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: #7dd3fc;
    background: rgba(2, 132, 199, 0.25);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.portal-auth-title {
    font-size: 25px;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
}

.portal-auth-subtitle {
    font-size: 13.5px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

/* ALERTAS */
.portal-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.portal-alert-info {
    background: rgba(2, 132, 199, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #7dd3fc;
}

.portal-alert-error {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.portal-alert-success {
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #86efac;
}

/* FORMULARIO */
.portal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.portal-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portal-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-label {
    font-size: 13px;
    font-weight: 700;
    color: #cbd5e1;
}

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

.portal-input-wrapper .portal-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
    user-select: none;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-input {
    width: 100%;
    padding: 13px 16px;
    font-size: 14.5px;
    font-family: inherit;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.65);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.portal-input.portal-input-pass {
    padding-right: 46px; /* Espacio para el icono de visualización a la derecha */
}

.portal-input::placeholder {
    color: #64748b;
}

.portal-input:focus {
    background: rgba(2, 6, 23, 0.9);
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.28);
}

.portal-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 8px;
    color: #94a3b8;
    transition: all 0.2s ease;
    z-index: 2;
}

.portal-toggle-password:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.portal-toggle-password .portal-icon-eye {
    display: block;
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.portal-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #94a3b8;
}

.portal-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #cbd5e1;
}

.portal-checkbox-label input {
    cursor: pointer;
    accent-color: var(--portal-primary);
}

.portal-btn-primary {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
    transition: all 0.2s ease;
}

.portal-btn-primary:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5) !important;
}

.portal-btn-primary:active {
    transform: translateY(0);
    background: #0369a1 !important;
}

.portal-btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.portal-auth-footer {
    margin-top: 26px;
    text-align: center;
}

.portal-link-back {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.portal-link-back:hover {
    color: #38bdf8;
}

.portal-auth-watermark {
    margin-top: 22px;
    font-size: 11.5px;
    color: #64748b;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   2. DASHBOARD APP LAYOUT (USUARIO LOGUEADO)
   ========================================================================== */
.portal-app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--portal-bg);
}

/* SIDEBAR */
.portal-sidebar {
    width: 270px;
    background: var(--portal-sidebar-bg);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid #1e293b;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 100;
}

.portal-sidebar-brand {
    padding: 22px 20px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-brand-logo-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.portal-brand-logo-circle img,
.portal-sidebar-logo-circle-img,
.portal-brand-logo-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

.portal-sidebar-logo-circle-fallback {
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-sidebar-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.portal-sidebar-brand-name {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.portal-sidebar-brand-badge {
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* PERFIL DE USUARIO EN SIDEBAR */
.portal-user-profile {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid #1e293b;
}

.portal-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--portal-primary);
}

.portal-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.portal-user-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-user-role-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
    margin-top: 3px;
}

.portal-role-asesor { background: #064e3b; color: #6ee7b7; }
.portal-role-gerente { background: #78350f; color: #fde68a; }
.portal-role-admin { background: #4c1d95; color: #d8b4fe; }
.portal-role-recepcion { background: #0c4a6e; color: #7dd3fc; }
.portal-role-usuario { background: #334155; color: #cbd5e1; }

/* MENÚ SIDEBAR */
.portal-nav {
    flex: 1;
    padding: 18px 12px;
}

.portal-nav-group-title {
    font-size: 10.5px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.8px;
    padding: 8px 12px 4px 12px;
    margin-top: 10px;
}

.portal-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#concesionaria-portal-root .portal-sidebar .portal-nav-link,
.portal-nav-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    color: #94a3b8 !important;
    text-decoration: none !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
}

#concesionaria-portal-root .portal-sidebar .portal-nav-link:hover,
#concesionaria-portal-root .portal-sidebar .portal-nav-link:focus,
.portal-nav-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

#concesionaria-portal-root .portal-sidebar .portal-nav-item.active .portal-nav-link,
.portal-nav-item.active .portal-nav-link {
    background: var(--portal-primary, #0284c7) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4) !important;
    text-decoration: none !important;
}

#concesionaria-portal-root .portal-sidebar .portal-nav-item.active .portal-nav-link *,
.portal-nav-item.active .portal-nav-link * {
    color: #ffffff !important;
}

.portal-nav-icon {
    font-size: 16px;
}

.portal-nav-text {
    flex: 1;
    color: inherit !important;
}

.portal-nav-pill {
    font-size: 10px;
    font-weight: 800;
    background: #1e293b;
    color: #94a3b8;
    padding: 2px 6px;
    border-radius: 6px;
}

#concesionaria-portal-root .portal-sidebar .portal-nav-pill-badge,
.portal-nav-pill-badge {
    font-size: 11px !important;
    font-weight: 800 !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
    min-width: 18px !important;
    text-align: center !important;
}

#concesionaria-portal-root .portal-sidebar .portal-nav-item.active .portal-nav-pill-badge,
.portal-nav-item.active .portal-nav-pill-badge {
    background: #ffffff !important;
    color: var(--portal-primary, #0284c7) !important;
}

/* FOOTER DEL SIDEBAR */
.portal-sidebar-footer {
    padding: 16px 14px;
    border-top: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#concesionaria-portal-root .portal-sidebar .portal-btn-footer-link,
.portal-btn-footer-link {
    font-size: 12.5px !important;
    color: #94a3b8 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
    background: transparent !important;
    border: none !important;
}

#concesionaria-portal-root .portal-sidebar .portal-btn-footer-link:hover,
.portal-btn-footer-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

#concesionaria-portal-root .portal-sidebar .portal-btn-footer-link.admin,
.portal-btn-footer-link.admin {
    color: #cbd5e1 !important;
    font-weight: 600 !important;
}

#concesionaria-portal-root .portal-sidebar .portal-btn-logout,
.portal-btn-logout {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #f87171 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    background: rgba(239, 68, 68, 0.12) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    transition: all 0.2s !important;
}

#concesionaria-portal-root .portal-sidebar .portal-btn-logout:hover,
.portal-btn-logout:hover {
    background: rgba(239, 68, 68, 0.22) !important;
    color: #fca5a5 !important;
    text-decoration: none !important;
}

/* ==========================================================================
   3. ÁREA DE CONTENIDO PRINCIPAL & TOPBAR
   ========================================================================== */
.portal-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.portal-topbar {
    background: var(--portal-surface);
    border-bottom: 1px solid var(--portal-border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.portal-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-menu-toggle,
#portal-menu-toggle {
    display: none !important;
}

.portal-topbar-mobile-logo {
    display: none !important;
}

.portal-topbar-breadcrumb {
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-topbar-brand-title {
    font-weight: 700;
    color: #0f172a;
}

.portal-topbar-breadcrumb .sep {
    color: #cbd5e1;
}

.portal-topbar-breadcrumb .current {
    color: var(--portal-text-muted);
}

.portal-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.portal-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #16a34a;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 4px 10px;
    border-radius: 20px;
}

.portal-status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: portalPulse 2s infinite;
}

@keyframes portalPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.portal-date-badge {
    font-size: 12.5px;
    color: var(--portal-text-muted);
}

/* CUERPO DEL CONTENIDO */
.portal-content-body {
    padding: 32px;
    max-width: 1400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* BANNER DE BIENVENIDA */
.portal-welcome-card {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid var(--portal-border);
    border-radius: 20px;
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: var(--portal-shadow-sm);
    flex-wrap: wrap;
}

.portal-welcome-text {
    flex: 1;
    min-width: 280px;
}

.portal-badge-hero {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--portal-primary);
    background: var(--portal-primary-light);
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.portal-welcome-title {
    font-size: 26px;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.portal-welcome-desc {
    font-size: 14.5px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
    max-width: 750px;
}

.portal-welcome-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portal-meta-chip {
    font-size: 12.5px;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 6px 14px;
    border-radius: 10px;
    white-space: nowrap;
}

/* GRID DE ESTADÍSTICAS */
.portal-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1100px) {
    .portal-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .portal-stats-grid {
        grid-template-columns: 1fr;
    }
}

.portal-stat-card {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    padding: 22px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--portal-shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.portal-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--portal-shadow-md);
}

.portal-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.portal-stat-icon.leads { background: #e0f2fe; }
.portal-stat-icon.stock { background: #fef3c7; }
.portal-stat-icon.sales { background: #dcfce7; }
.portal-stat-icon.security { background: #f3e8ff; }

.portal-stat-data {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.portal-stat-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--portal-text-muted);
    margin-bottom: 4px;
}

.portal-stat-val {
    font-size: 24px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
    margin-bottom: 6px;
}

.portal-stat-hint {
    font-size: 11.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.portal-stat-hint.positive {
    color: #16a34a;
    font-weight: 600;
}

/* TARJETA DE HITO (ETAPA 1) */
.portal-milestone-card {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    padding: 26px 30px;
    box-shadow: var(--portal-shadow-sm);
}

.portal-milestone-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.portal-milestone-icon {
    font-size: 26px;
}

.portal-milestone-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.portal-milestone-desc {
    font-size: 13.5px;
    color: var(--portal-text-muted);
    margin: 0;
}

.portal-milestone-checklist {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (max-width: 750px) {
    .portal-milestone-checklist {
        grid-template-columns: 1fr;
    }
}

.portal-chk-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
}

.portal-chk-item .chk-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.portal-chk-item code {
    background: #e2e8f0;
    color: #0f172a;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 12px;
}

/* ==========================================================================
   4. MODO RESPONSIVO PARA SMARTPHONES Y TABLETS
   ========================================================================== */
@media (max-width: 900px) {
    .portal-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.4);
        z-index: 1000 !important;
    }

    .portal-sidebar.open,
    .portal-sidebar.is-open {
        transform: translateX(0);
    }

    .portal-menu-toggle,
    #portal-menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        background: #f0f9ff !important;
        border: 1.5px solid #bae6fd !important;
        border-radius: 10px !important;
        color: #0284c7 !important;
        padding: 0;
        cursor: pointer;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

    .portal-menu-toggle:hover,
    #portal-menu-toggle:hover {
        background: #e0f2fe !important;
        border-color: #7dd3fc !important;
        color: #0369a1 !important;
    }

    .portal-topbar {
        padding: 12px 16px;
    }

    .portal-topbar-mobile-logo {
        display: inline-block !important;
        height: 28px !important;
        max-height: 28px !important;
        max-width: 90px !important;
        object-fit: contain !important;
        vertical-align: middle !important;
        margin-right: 8px !important;
        flex-shrink: 0 !important;
    }

    /* Ocultar nombre largo de concesionaria y separador en móvil */
    .portal-topbar-brand-title,
    .portal-topbar-breadcrumb .sep {
        display: none !important;
    }

    .portal-topbar-breadcrumb .current {
        font-size: 14.5px !important;
        font-weight: 800 !important;
        color: #0f172a !important;
    }

    /* Pastilla "En Línea" ultracompacta en móvil (solo puntito verde) */
    .portal-status-badge {
        padding: 6px 8px !important;
        min-width: unset !important;
        gap: 0 !important;
        border-radius: 50px !important;
        background: rgba(16, 185, 129, 0.12) !important;
        border: 1px solid rgba(16, 185, 129, 0.3) !important;
    }

    .portal-status-badge span:not(.portal-status-dot) {
        display: none !important;
    }

    .portal-status-dot {
        width: 8px !important;
        height: 8px !important;
        min-width: 8px !important;
        min-height: 8px !important;
        margin: 0 !important;
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.8) !important;
    }

    .portal-content-body {
        padding: 20px;
    }

    .portal-date-badge {
        display: none;
    }
}

/* ==========================================================================
   5. SISTEMA DE PESTAÑAS Y BANDEJA DE ATENCIÓN INMEDIATA (ETAPA 2)
   ========================================================================== */
.portal-tab-pane {
    display: none;
    animation: portalFadeIn 0.25s ease;
}

.portal-tab-pane.active {
    display: block;
}

/* AIREADO Y ESPACIADO VERTICAL DE ISLAS DEL DASHBOARD */
#pane-dashboard.active {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* BANDEJA DE ATENCIÓN INMEDIATA (DASHBOARD) */
.portal-recent-leads-card {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 20px;
    padding: 30px 34px;
    box-shadow: var(--portal-shadow-sm);
}

.portal-rl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.portal-rl-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.portal-rl-subtitle {
    font-size: 13.5px;
    color: var(--portal-text-muted);
    margin: 0;
}

.portal-btn-view-all-leads {
    font-size: 13px;
    font-weight: 700;
    color: var(--portal-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.portal-btn-view-all-leads:hover {
    color: var(--portal-primary-dark);
}

.portal-rl-empty {
    padding: 24px;
    text-align: center;
    color: var(--portal-text-muted);
    font-size: 14px;
    background: #f8fafc;
    border-radius: 12px;
}

.portal-rl-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-rl-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    transition: all 0.2s;
}

.portal-rl-item:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.portal-rl-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.portal-rl-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.portal-rl-name {
    font-size: 14.5px;
    color: #0f172a;
}

.portal-rl-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.portal-rl-time {
    font-size: 11.5px;
    color: #94a3b8;
}

.portal-rl-sub {
    font-size: 13px;
    color: #475569;
}

.portal-btn-wa-compact {
    background: #25D366;
    color: #ffffff;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
    white-space: nowrap;
}

.portal-btn-wa-compact:hover {
    background: #1eb855;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

/* ==========================================================================
   6. MÓDULO DE CONSULTAS & LEADS (CRM OPERATIVO)
   ========================================================================== */
.portal-leads-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* BARRA DE HERRAMIENTAS */
.portal-leads-toolbar {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--portal-shadow-sm);
}

.portal-leads-search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.portal-search-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    pointer-events: none;
}

.portal-search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    font-size: 13.5px;
    font-family: inherit;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s;
}

.portal-search-input:focus {
    background: #ffffff;
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.portal-leads-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.portal-filter-pill,
#concesionaria-portal-root .portal-filter-pill {
    background: #f1f5f9 !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #475569 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    padding: 7px 14px !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.portal-filter-pill:hover,
.portal-filter-pill:focus,
#concesionaria-portal-root .portal-filter-pill:hover,
#concesionaria-portal-root .portal-filter-pill:focus {
    background: #e0f2fe !important;
    border-color: #0284c7 !important;
    color: #0369a1 !important;
    outline: none !important;
    box-shadow: none !important;
}

.portal-filter-pill.active,
.portal-filter-pill:active,
#concesionaria-portal-root .portal-filter-pill.active,
#concesionaria-portal-root .portal-filter-pill:active {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3) !important;
    outline: none !important;
}

#concesionaria-portal-root .portal-filter-pill .pill-count,
.portal-filter-pill .pill-count {
    background: rgba(0, 0, 0, 0.08) !important;
    color: inherit !important;
    padding: 1px 6px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
}

#concesionaria-portal-root .portal-filter-pill.active .pill-count,
.portal-filter-pill.active .pill-count {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* SELECTOR DE CICLO MENSUAL */
.portal-leads-cycle-filter {
    display: flex;
    align-items: center;
}

.portal-select-cycle {
    padding: 7px 14px;
    font-size: 12.5px;
    font-family: inherit;
    font-weight: 700;
    color: #0284c7;
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08);
    transition: all 0.2s;
}

.portal-select-cycle:hover,
.portal-select-cycle:focus {
    border-color: #0284c7;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

.portal-leads-advisor-filter {
    margin-left: auto;
}

.portal-select-advisor {
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

/* BOTONES DE ACCIÓN EN TOOLBAR DE LEADS */
#concesionaria-portal-root .portal-btn-primary-compact,
.portal-btn-primary-compact {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border: none !important;
    outline: none !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25) !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#concesionaria-portal-root .portal-btn-primary-compact:hover,
#concesionaria-portal-root .portal-btn-primary-compact:focus,
.portal-btn-primary-compact:hover,
.portal-btn-primary-compact:focus {
    filter: brightness(1.08) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35) !important;
    border: none !important;
    outline: none !important;
    color: #ffffff !important;
}

#concesionaria-portal-root .portal-btn-export,
.portal-btn-export {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    color: #334155 !important;
    background: #f1f5f9 !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#concesionaria-portal-root .portal-btn-export:hover,
#concesionaria-portal-root .portal-btn-export:focus,
.portal-btn-export:hover,
.portal-btn-export:focus {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    outline: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    text-decoration: none !important;
}

/* ==========================================================================
   LISTA DE TARJETAS HORIZONTALES DE LEADS (CRM PROFESIONAL)
   ========================================================================== */
.portal-leads-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.portal-lead-card.portal-lead-card-horizontal {
    background: var(--portal-surface);
    border: 1.5px solid var(--portal-border);
    border-radius: 18px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--portal-shadow-sm);
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 768px) {
    .portal-lead-card.portal-lead-card-horizontal {
        padding: 14px 16px;
        border-radius: 14px;
    }
}

.portal-lead-card.portal-lead-card-horizontal:hover {
    border-color: #cbd5e1;
    box-shadow: var(--portal-shadow-md);
    transform: translateY(-2px);
}

/* BORDES LATERALES SEGÚN ESTADO */
.portal-lead-card.status-nuevo { border-left: 6px solid #f59e0b !important; }
.portal-lead-card.status-contactado { border-left: 6px solid #0284c7 !important; }
.portal-lead-card.status-en_negociacion { border-left: 6px solid #8b5cf6 !important; }
.portal-lead-card.status-concretado { border-left: 6px solid #10b981 !important; }
.portal-lead-card.status-descartado { border-left: 6px solid #94a3b8 !important; }

.portal-lch-main-row {
    display: grid;
    grid-template-columns: minmax(0, 240px) minmax(0, 1.4fr) minmax(0, 1.1fr) minmax(0, 130px);
    gap: 18px;
    align-items: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

@media (min-width: 769px) and (max-width: 900px) {
    .portal-lch-main-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 14px;
    }
}

@media (min-width: 901px) {
    .portal-leads-grid {
        gap: 10px !important;
    }

    .portal-lead-card.portal-lead-card-horizontal {
        padding: 10px 18px !important;
        border-radius: 12px !important;
    }

    .portal-lch-main-row {
        display: grid !important;
        grid-template-columns: minmax(190px, 230px) minmax(0, 1.3fr) minmax(0, 1.1fr) 145px 115px !important;
        gap: 14px !important;
        align-items: center !important;
        width: 100% !important;
    }

    .portal-lch-col-client {
        display: contents !important;
    }

    .portal-lch-client-header {
        order: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 2px !important;
        min-width: 0 !important;
    }

    .portal-lch-client-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        min-width: 0 !important;
    }

    .portal-lead-name {
        font-size: 14px !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .portal-lead-origin-chip {
        font-size: 10.5px !important;
        padding: 1px 7px !important;
        border-radius: 5px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .portal-lead-time {
        font-size: 11px !important;
        color: #94a3b8 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .portal-lch-col-vehicle {
        order: 2 !important;
        min-width: 0 !important;
        gap: 0 !important;
    }

    .portal-lead-vehicle-box {
        padding: 6px 12px !important;
        border-radius: 10px !important;
        gap: 10px !important;
        min-height: 42px !important;
        box-sizing: border-box !important;
    }

    .portal-lead-veh-img,
    .portal-lead-veh-placeholder {
        width: 40px !important;
        height: 32px !important;
        border-radius: 5px !important;
        font-size: 16px !important;
        flex-shrink: 0 !important;
    }

    .portal-lvi-label {
        font-size: 9.5px !important;
        margin-bottom: 1px !important;
        line-height: 1 !important;
    }

    .portal-lvi-title {
        font-size: 12.5px !important;
        line-height: 1.2 !important;
    }

    .portal-lch-col-contact {
        order: 3 !important;
        padding: 6px 12px !important;
        border-radius: 10px !important;
        gap: 0 !important;
        min-height: 42px !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .portal-lch-phone-row {
        gap: 10px !important;
    }

    .portal-ci-label {
        font-size: 9.5px !important;
        margin-bottom: 1px !important;
        line-height: 1 !important;
    }

    .portal-ci-val {
        font-size: 12.5px !important;
        line-height: 1.2 !important;
    }

    .portal-btn-wa-square {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        border-radius: 8px !important;
    }

    .portal-btn-wa-square svg {
        width: 17px !important;
        height: 17px !important;
    }

    .portal-lead-status-wrapper {
        order: 4 !important;
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .portal-lead-status-select {
        padding: 5px 10px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        height: 34px !important;
        width: 100% !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    }

    .portal-lch-col-actions {
        order: 5 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    #concesionaria-portal-root .portal-btn-toggle-lead-details,
    .portal-btn-toggle-lead-details {
        padding: 6px 12px !important;
        font-size: 12px !important;
        height: 34px !important;
        border-radius: 8px !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 768px) {
    .portal-lead-card.portal-lead-card-horizontal {
        padding: 10px 12px !important;
        border-radius: 12px !important;
        margin-bottom: 6px !important;
    }

    .portal-lch-main-row {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        row-gap: 8px !important;
        column-gap: 10px !important;
        align-items: center !important;
        width: 100% !important;
    }

    /* FILA 1: CLIENTE (Izquierda) + ESTADO (Derecha) */
    .portal-lch-col-client {
        grid-column: 1 / -1 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .portal-lch-client-header {
        flex: 1 !important;
        min-width: 0 !important;
        gap: 0 !important;
    }
    .portal-lch-client-info {
        gap: 2px !important;
        min-width: 0 !important;
    }
    .portal-lead-name {
        font-size: 14px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
    }
    .portal-lead-origin-chip {
        font-size: 10px !important;
        padding: 1px 6px !important;
        border-radius: 4px !important;
    }
    .portal-lead-time {
        font-size: 11px !important;
        color: #94a3b8 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .portal-lead-status-wrapper {
        flex-shrink: 0 !important;
        width: auto !important;
        max-width: 135px !important;
    }
    .portal-lead-status-select {
        padding: 4px 8px !important;
        font-size: 11.5px !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        height: 30px !important;
        line-height: 1.2 !important;
    }

    /* FILA 2: VEHÍCULO DE INTERÉS (Ancho completo, altura compacta) */
    .portal-lch-col-vehicle {
        grid-column: 1 / -1 !important;
        gap: 0 !important;
        width: 100% !important;
    }
    .portal-lead-vehicle-box {
        padding: 4px 8px !important;
        border-radius: 8px !important;
        gap: 8px !important;
        min-height: 34px !important;
        background: #f0f9ff !important;
        border: 1px solid #bae6fd !important;
    }
    .portal-lead-veh-img,
    .portal-lead-veh-placeholder {
        width: 34px !important;
        height: 28px !important;
        border-radius: 4px !important;
        font-size: 14px !important;
        flex-shrink: 0 !important;
    }
    .portal-lvi-label {
        display: none !important;
    }
    .portal-lvi-title {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #0369a1 !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* FILA 3: CONTACTO A LA IZQUIERDA Y VER DETALLE A LA DERECHA */
    .portal-lch-col-contact {
        grid-column: 1 !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        gap: 0 !important;
        justify-content: center !important;
        min-width: 0 !important;
    }
    .portal-lch-phone-row {
        justify-content: flex-start !important;
        gap: 8px !important;
        align-items: center !important;
    }
    .portal-ci-label {
        display: none !important;
    }
    .portal-ci-val {
        font-size: 12.5px !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        line-height: 1 !important;
    }
    .portal-btn-wa-square {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
        border-radius: 7px !important;
        padding: 0 !important;
    }
    .portal-btn-wa-square svg {
        width: 16px !important;
        height: 16px !important;
    }

    /* FILA 3 (DERECHA): TOGGLE VER DETALLE */
    .portal-lch-col-actions {
        grid-column: 2 !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        min-width: 0 !important;
    }
    #concesionaria-portal-root .portal-btn-toggle-lead-details,
    .portal-btn-toggle-lead-details {
        width: auto !important;
        padding: 4px 10px !important;
        font-size: 11.5px !important;
        border-radius: 6px !important;
        white-space: nowrap !important;
        height: 30px !important;
    }
}

/* COLUMNA 1: CLIENTE, FECHA Y ESTADO */
.portal-lch-col-client {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    box-sizing: border-box;
}

.portal-lch-client-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-lch-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.portal-lch-client-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.portal-lead-name {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.portal-lead-origin-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.2px;
}

.portal-lead-time {
    font-size: 11.5px;
    color: #94a3b8;
}

.portal-lead-status-wrapper {
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.portal-lead-status-select {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.portal-lead-status-select:focus {
    border-color: var(--portal-primary);
    background: #ffffff;
}

/* COLUMNA 2: VEHÍCULO DE INTERÉS & PERMUTA */
.portal-lch-col-vehicle {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.portal-lead-vehicle-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 8px 12px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.portal-lead-veh-img {
    width: 48px;
    height: 40px;
    object-fit: cover;
    object-position: center center;
    border-radius: 6px;
    border: 1px solid #bae6fd;
    flex-shrink: 0;
}

.portal-lead-veh-placeholder {
    width: 48px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #e0f2fe;
    border-radius: 6px;
    flex-shrink: 0;
}

.portal-lead-veh-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    flex: 1;
    overflow: hidden;
}

.portal-lvi-label {
    font-size: 10.5px;
    font-weight: 700;
    color: #0369a1;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-lvi-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0c4a6e;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
    min-width: 0;
}

.portal-lvi-title:hover {
    text-decoration: underline;
}

.portal-lead-tradein-badge {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
}

.portal-lead-tradein-badge strong {
    color: #78350f;
}

.portal-lead-message-quote {
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    border-radius: 0 8px 8px 0;
    padding: 6px 10px;
    font-size: 12px;
    color: #475569;
    font-style: italic;
    display: flex;
    gap: 6px;
    line-height: 1.4;
}

.portal-lead-message-quote p {
    margin: 0;
}

/* COLUMNA 3: CONTACTO & ASESOR */
.portal-lch-col-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 10px 14px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.portal-lch-phone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.portal-lch-phone-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

#concesionaria-portal-root .portal-btn-wa-square,
.portal-btn-wa-square {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 9px !important;
    background: #25D366 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.28) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    outline: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
}

#concesionaria-portal-root .portal-btn-wa-square:hover,
#concesionaria-portal-root .portal-btn-wa-square:focus,
.portal-btn-wa-square:hover,
.portal-btn-wa-square:focus {
    background: #1eb855 !important;
    transform: translateY(-1px) scale(1.06) !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45) !important;
    color: #ffffff !important;
}

.portal-btn-wa-square svg {
    display: block !important;
    fill: currentColor !important;
    width: 20px !important;
    height: 20px !important;
}

.portal-lch-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
}

.portal-ci-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 62px;
}

.portal-ci-val {
    font-size: 13px;
    color: #0f172a;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.portal-ci-link {
    text-decoration: none;
    transition: color 0.15s ease;
}

.portal-ci-link:hover,
.portal-ci-link:focus {
    color: #0284c7 !important;
    text-decoration: underline;
}

.portal-lead-reassign-select {
    padding: 4px 8px;
    font-size: 12px;
    font-family: inherit;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    outline: none;
    cursor: pointer;
}

#concesionaria-portal-root .portal-btn-toggle-notes,
.portal-btn-toggle-notes {
    background: none !important;
    border: none !important;
    color: #64748b !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 2px 0 !important;
    margin-top: 2px !important;
    width: fit-content !important;
    transition: color 0.2s !important;
    outline: none !important;
    box-shadow: none !important;
}

#concesionaria-portal-root .portal-btn-toggle-notes:hover,
#concesionaria-portal-root .portal-btn-toggle-notes:focus,
.portal-btn-toggle-notes:hover,
.portal-btn-toggle-notes:focus {
    color: #0284c7 !important;
}

.portal-btn-toggle-notes .has-notes-indicator {
    color: #10b981 !important;
    font-size: 10px !important;
}

/* COLUMNA 4: ACCIÓN INMEDIATA */
.portal-lch-col-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

#concesionaria-portal-root .portal-btn-action.wa,
.portal-btn-action.wa {
    background: #25D366 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    border: none !important;
    outline: none !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.25) !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

#concesionaria-portal-root .portal-btn-action.wa:hover,
#concesionaria-portal-root .portal-btn-action.wa:focus,
.portal-btn-action.wa:hover,
.portal-btn-action.wa:focus {
    background: #1eb855 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 14px rgba(37, 211, 102, 0.35) !important;
    color: #ffffff !important;
}

#concesionaria-portal-root .portal-btn-action.call,
.portal-btn-action.call {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #334155 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    padding: 7px 12px !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
    outline: none !important;
    box-shadow: none !important;
}

#concesionaria-portal-root .portal-btn-action.call:hover,
#concesionaria-portal-root .portal-btn-action.call:focus,
.portal-btn-action.call:hover,
.portal-btn-action.call:focus {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

/* BOTÓN TOGGLE VER DETALLE / NOTAS DE LEADS */
#concesionaria-portal-root .portal-btn-toggle-lead-details,
.portal-btn-toggle-lead-details {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    border-radius: 8px !important;
    padding: 7px 12px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    width: 100% !important;
    box-shadow: none !important;
}

#concesionaria-portal-root .portal-btn-toggle-lead-details:hover,
#concesionaria-portal-root .portal-btn-toggle-lead-details:focus,
.portal-btn-toggle-lead-details:hover,
.portal-btn-toggle-lead-details:focus {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

.portal-btn-toggle-lead-details.is-open {
    background: #e0f2fe !important;
    border-color: #7dd3fc !important;
    color: #0369a1 !important;
}

.portal-btn-toggle-lead-details .has-notes-dot {
    color: #10b981;
    font-size: 11px;
    margin-left: 2px;
}

/* CAJÓN EXPANDIBLE DE DETALLES Y NOTAS (ACORDEÓN COMPACTO) */
.portal-lead-details-drawer {
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px dashed #cbd5e1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: portalFadeIn 0.2s ease;
}

.portal-lead-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.portal-detail-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.portal-detail-box .portal-box-label {
    font-size: 10.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.portal-detail-box .portal-box-link {
    font-size: 13px;
    font-weight: 600;
    color: #0284c7;
    text-decoration: none;
    word-break: break-all;
}

.portal-detail-box .portal-box-link:hover {
    text-decoration: underline;
}

.portal-detail-box .portal-btn-call-direct {
    font-size: 12.5px;
    font-weight: 700;
    color: #047857;
    text-decoration: none;
}

.portal-detail-box .portal-btn-call-direct:hover {
    text-decoration: underline;
}

.portal-lead-notes-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fafafa;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
}

.portal-notes-header {
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.portal-notes-textarea {
    width: 100%;
    min-height: 64px;
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    resize: vertical;
    background: #ffffff;
}

.portal-notes-textarea:focus {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

#concesionaria-portal-root .portal-btn-save-notes,
.portal-btn-save-notes {
    align-self: flex-end !important;
    background: #334155 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 7px 14px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: background 0.2s !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#concesionaria-portal-root .portal-btn-save-notes:hover,
#concesionaria-portal-root .portal-btn-save-notes:focus,
.portal-btn-save-notes:hover,
.portal-btn-save-notes:focus {
    background: #0f172a !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
}

.portal-btn-action {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.portal-btn-action.wa {
    background: #25D366;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}

.portal-btn-action.wa:hover {
    background: #1eb855;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.portal-btn-action.call {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    flex: 0 0 auto;
    padding: 10px 16px;
}

.portal-btn-action.call:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.portal-no-phone {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}

/* ==========================================================================
   7. MÓDULO DE INVENTARIO DE AUTOS (STOCK)
   ========================================================================== */
.portal-stock-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.portal-stock-toolbar {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--portal-shadow-sm);
}

/* CONMUTADOR DE ALCANCE: MIS AUTOS VS TODO EL STOCK */
#concesionaria-portal-root .portal-stock-scope-pills,
.portal-stock-scope-pills {
    display: flex !important;
    align-items: center !important;
    background: #f1f5f9 !important;
    padding: 4px !important;
    border-radius: 12px !important;
    gap: 4px !important;
    border: 1px solid #e2e8f0 !important;
}

#concesionaria-portal-root .portal-scope-pill,
.portal-scope-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 14px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 9px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#concesionaria-portal-root .portal-scope-pill:hover,
#concesionaria-portal-root .portal-scope-pill:focus,
.portal-scope-pill:hover,
.portal-scope-pill:focus {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.7) !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

#concesionaria-portal-root .portal-scope-pill.active,
.portal-scope-pill.active {
    background: #ffffff !important;
    color: #0284c7 !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    outline: none !important;
}

#concesionaria-portal-root .portal-scope-pill .pill-count,
.portal-scope-pill .pill-count {
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
    background: #e2e8f0 !important;
    color: #475569 !important;
    border: none !important;
}

#concesionaria-portal-root .portal-scope-pill.active .pill-count,
.portal-scope-pill.active .pill-count {
    background: #e0f2fe !important;
    color: #0284c7 !important;
    border: none !important;
}

.portal-stock-search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.portal-search-svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    stroke: #64748b;
    pointer-events: none;
}

.portal-stock-search-box .portal-search-input,
.portal-leads-search-box .portal-search-input {
    padding-left: 44px !important;
}

.portal-stock-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* GRILLA DE AUTOS */
.portal-stock-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .portal-stock-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .portal-stock-grid {
        grid-template-columns: 1fr;
    }
}

/* TARJETA INDIVIDUAL DE STOCK */
.portal-stock-card {
    background: var(--portal-surface);
    border: 1.5px solid var(--portal-border);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--portal-shadow-sm);
    transition: all 0.2s;
}

.portal-stock-card:hover {
    box-shadow: var(--portal-shadow-md);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

/* BORDES DE COLOR SEGÚN ESTADO DE STOCK */
.portal-stock-card.stock-card-disponible { border-top: 5px solid #10b981; }
.portal-stock-card.stock-card-reservado  { border-top: 5px solid #f59e0b; }
.portal-stock-card.stock-card-vendido    { border-top: 5px solid #ef4444; opacity: 0.85; }

.portal-stock-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #0f172a;
    overflow: hidden;
}

.portal-stock-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center center !important;
    display: block;
    transition: transform 0.3s ease;
}

.portal-stock-card:hover .portal-stock-thumb {
    transform: scale(1.03);
}

.portal-stock-thumb-none {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #64748b;
}

.portal-stock-badge-cond {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.portal-stock-badge-cond.nuevo,
.portal-stock-badge-cond.cond-0km,
.portal-stock-badge-cond[class*="0km"] {
    background: rgba(2, 132, 199, 0.9);
    color: #ffffff;
}

.portal-stock-badge-cond.usado,
.portal-stock-badge-cond.cond-usado {
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
}

/* Banner llamativo que corta la foto para Reservado y Vendido */
.dealer-status-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-6deg);
    width: 110%;
    padding: 8px 0;
    text-align: center;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    z-index: 10;
    pointer-events: none;
    user-select: none;
}

.dealer-status-banner.is-reservado {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    border-top: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}

.dealer-status-banner.is-vendido {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    border-top: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}

.portal-stock-badge-mine {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.9);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.portal-stock-details {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.portal-stock-title {
    font-size: 15.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.portal-stock-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--portal-text-muted);
}

.portal-stock-price-box {
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 8px 12px;
}

.portal-stock-price {
    font-size: 16px;
    font-weight: 900;
    color: var(--portal-primary);
}

.portal-stock-anticipo {
    font-size: 12px;
    font-weight: 700;
    color: #15803d;
}

.portal-stock-advisor-tag {
    font-size: 12px;
    color: var(--portal-text-muted);
}

.portal-stock-advisor-tag strong {
    color: #334155;
}

/* ACCIÓN DE CAMBIO DE STOCK */
.portal-stock-action-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.portal-stock-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.portal-stock-select-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-stock-status-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.portal-stock-status-select:focus {
    border-color: var(--portal-primary);
}

.portal-stock-card-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.portal-stock-footer-links {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#concesionaria-portal-root .portal-btn-copy-link,
.portal-btn-copy-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 5px 10px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    line-height: 1.3 !important;
}

#concesionaria-portal-root .portal-btn-copy-link:hover,
.portal-btn-copy-link:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    transform: translateY(-1px);
}

#concesionaria-portal-root .portal-btn-copy-link.is-copied,
.portal-btn-copy-link.is-copied {
    background: #dcfce7 !important;
    border-color: #86efac !important;
    color: #166534 !important;
    box-shadow: 0 2px 6px rgba(22, 101, 52, 0.15) !important;
}

#concesionaria-portal-root .portal-stock-link-public,
.portal-stock-link-public {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    transition: color 0.2s !important;
    border: none !important;
    outline: none !important;
}

#concesionaria-portal-root .portal-stock-link-public:hover,
#concesionaria-portal-root .portal-stock-link-public:focus,
.portal-stock-link-public:hover,
.portal-stock-link-public:focus {
    color: #0284c7 !important;
    text-decoration: none !important;
}

/* BOTÓN EDITAR FICHA EN TARJETA DE VEHÍCULO */
#concesionaria-portal-root .portal-btn-edit-vehicle,
.portal-btn-edit-vehicle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    color: #334155 !important;
    background: #f1f5f9 !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#concesionaria-portal-root .portal-btn-edit-vehicle:hover,
#concesionaria-portal-root .portal-btn-edit-vehicle:focus,
.portal-btn-edit-vehicle:hover,
.portal-btn-edit-vehicle:focus {
    color: #0284c7 !important;
    border-color: #0284c7 !important;
    background: #e0f2fe !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2) !important;
    outline: none !important;
}

/* NOTIFICACIÓN TOAST FLOTANTE */
.portal-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    animation: portalToastIn 0.3s ease;
}

@keyframes portalToastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   ETAPA 3: SUPERVISIÓN GERENCIAL, REASIGNACIÓN, EQUIPO Y MÉTRICAS
   ========================================================================== */

/* 1. SELECTOR DE REASIGNACIÓN EN TARJETA DE LEAD */
.portal-lead-reassign-select {
    padding: 4px 8px;
    font-size: 11.5px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    max-width: 160px;
}

.portal-lead-reassign-select:focus,
.portal-lead-reassign-select:hover {
    border-color: var(--portal-primary);
    background: #ffffff;
}

/* 2. BOTÓN DE EXPORTACIÓN A EXCEL / CSV */
.portal-leads-export-wrapper {
    margin-left: auto;
}

.portal-btn-export {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.portal-btn-export:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* 3. PESTAÑA: EQUIPO DE ASESORES */
.portal-team-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.portal-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.portal-team-card {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: var(--portal-shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.portal-team-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--portal-shadow-md);
}

.portal-team-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.portal-team-avatar-wrap {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.portal-team-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid var(--portal-primary);
    background: #e2e8f0;
    display: block;
}

.portal-avatar-online-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 15px;
    height: 15px;
    background: #22c55e;
    border: 2.5px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.portal-team-main-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.portal-team-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.portal-team-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--portal-text);
    margin: 0;
}

.portal-presence-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.portal-presence-online {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.portal-presence-recent {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.portal-presence-away {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.portal-presence-offline {
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
}

.portal-presence-badge .portal-pulse-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    animation: portalPulseDot 1.8s infinite;
}

@keyframes portalPulseDot {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 5px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.portal-team-role-pill {
    display: inline-block;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    background: #e0f2fe;
    color: #0369a1;
    width: fit-content;
}

.portal-team-username {
    font-size: 11.5px;
    color: var(--portal-text-muted);
}

.portal-team-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #f1f5f9;
}

.portal-team-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.portal-tsi-val {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
}

.portal-tsi-val.highlight { color: #8b5cf6; }
.portal-tsi-val.success { color: #16a34a; }
.portal-tsi-val.conversion { color: #0284c7; }

.portal-tsi-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.portal-team-contact-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #475569;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.portal-tci-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.portal-team-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
}

.portal-btn-view-advisor-leads {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    color: var(--portal-text);
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.portal-btn-view-advisor-leads:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.portal-btn-team-wa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    color: #ffffff;
    background: #16a34a;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s;
}

.portal-btn-team-wa:hover {
    background: #15803d;
}

/* 4. PESTAÑA: MÉTRICAS Y REPORTES */
.portal-metrics-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.portal-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

@media (max-width: 1100px) {
    .portal-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .portal-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.portal-kpi-card {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--portal-shadow-sm);
}

.portal-kpi-icon {
    font-size: 26px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.portal-kpi-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.portal-kpi-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--portal-text-muted);
}

.portal-kpi-val {
    font-size: 24px;
    font-weight: 900;
    color: var(--portal-text);
    line-height: 1.2;
}

.portal-kpi-val.highlight-green { color: #16a34a; }
.portal-kpi-val.highlight-blue { color: #0284c7; }

.portal-kpi-subtext {
    font-size: 11.5px;
    color: #64748b;
}

.portal-metrics-card {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--portal-shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.portal-card-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.portal-card-box-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--portal-text);
    margin: 0;
}

.portal-card-box-badge {
    font-size: 11px;
    font-weight: 700;
    color: #0369a1;
    background: #e0f2fe;
    padding: 4px 10px;
    border-radius: 20px;
}

.portal-table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.portal-metrics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.portal-metrics-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.portal-metrics-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

.portal-metrics-table tr:last-child td {
    border-bottom: none;
}

.portal-metrics-table tr:hover td {
    background: #f8fafc;
}

.portal-table-user strong {
    display: block;
    font-weight: 700;
    color: #0f172a;
}

.portal-table-user small {
    color: #64748b;
    font-size: 11.5px;
}

.portal-tag-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
}

.portal-tag-pill.yellow { background: #fef3c7; color: #b45309; }
.portal-tag-pill.purple { background: #f3e8ff; color: #7e22ce; }
.portal-tag-pill.green { background: #dcfce7; color: #15803d; }
.portal-tag-pill.gray { background: #f1f5f9; color: #475569; }

.conversion-val {
    color: #0284c7;
    font-size: 14px;
}

.portal-td-progress {
    min-width: 120px;
}

.portal-progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.portal-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7, #10b981);
    border-radius: 10px;
    transition: width 0.4s ease;
}

/* ==========================================================================
   ETAPA 4: CARGA Y EDICIÓN ÁGIL DE VEHÍCULOS (MODAL FRONTEND)
   ========================================================================== */

/* 1. BOTONES DE ALTA Y EDICIÓN DE VEHÍCULOS */
.portal-stock-action-top {
    margin-left: auto;
}

#concesionaria-portal-root .portal-btn-new-vehicle,
.portal-btn-new-vehicle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 9px 18px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border: none !important;
    outline: none !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25) !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#concesionaria-portal-root .portal-btn-new-vehicle:hover,
#concesionaria-portal-root .portal-btn-new-vehicle:focus,
.portal-btn-new-vehicle:hover,
.portal-btn-new-vehicle:focus {
    filter: brightness(1.08) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35) !important;
    border: none !important;
    outline: none !important;
    color: #ffffff !important;
}

/* 2. MODAL BACKDROP Y CONTENEDOR */
.portal-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.portal-modal-container {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 880px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: portalModalZoom 0.25s ease;
    overflow: hidden;
}

@keyframes portalModalZoom {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.portal-modal-header {
    padding: 20px 28px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-modal-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.portal-modal-title {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

#concesionaria-portal-root .portal-modal-close,
.portal-modal-close {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#concesionaria-portal-root .portal-modal-close:hover,
#concesionaria-portal-root .portal-modal-close:focus,
.portal-modal-close:hover,
.portal-modal-close:focus {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
    outline: none !important;
}

/* 3. FORMULARIO DENTRO DEL MODAL */
.portal-modal-form {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.portal-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.portal-form-fieldset {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.portal-fieldset-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #334155;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.portal-form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (max-width: 768px) {
    .portal-form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.portal-form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 768px) {
    .portal-form-grid-3 {
        grid-template-columns: 1fr;
    }
}

.portal-form-grid-3 .col-span-2 {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .portal-form-grid-3 .col-span-2 {
        grid-column: span 1;
    }
}

.portal-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.portal-form-label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.portal-form-input,
.portal-form-select,
.portal-form-textarea {
    width: 100%;
    padding: 9px 12px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.portal-form-input:focus,
.portal-form-select:focus,
.portal-form-textarea:focus {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.portal-form-hint {
    font-size: 11px;
    color: #94a3b8;
}

/* 4. DRAG & DROP Y PREVISUALIZACIÓN DE FOTO */
.portal-image-upload-wrapper {
    width: 100%;
}

.portal-image-dropzone {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 24px;
    background: #ffffff;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}

.portal-image-dropzone:hover {
    border-color: var(--portal-primary);
    background: #f0f9ff;
}

.portal-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.portal-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.portal-dz-icon {
    font-size: 32px;
}

.portal-dz-text {
    font-size: 13px;
    color: #334155;
}

.portal-dz-hint {
    font-size: 11.5px;
    color: #94a3b8;
}

.portal-image-preview-box {
    position: relative;
    max-height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}

.portal-preview-img {
    max-height: 200px;
    width: auto;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.portal-btn-remove-preview {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.portal-btn-remove-preview:hover {
    background: #ef4444;
}

/* TOGGLES SWITCHES DESTACADOS ("Consultar Precio" y "Destacar en Portada") */
.portal-toggles-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-toggle-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.portal-toggle-card:hover {
    border-color: #0284c7;
    background: #f0f9ff;
}

.portal-toggle-card input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0284c7;
    flex-shrink: 0;
}

.portal-toggle-content,
.portal-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.portal-toggle-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.portal-toggle-desc,
.portal-toggle-hint {
    font-size: 11.5px;
    color: #64748b;
}

.portal-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}

.portal-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.portal-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.portal-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.portal-switch input:checked + .portal-slider {
    background-color: #0284c7;
}

.portal-switch input:checked + .portal-slider:before {
    transform: translateX(22px);
}

/* GALERÍA FOTOGRÁFICA MÚLTIPLE ADICIONAL */
.portal-gallery-dropzone {
    position: relative;
    border: 2px dashed #93c5fd;
    background: #f0f9ff;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.portal-gallery-dropzone:hover {
    border-color: #0284c7;
    background: #e0f2fe;
}

.portal-gallery-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.portal-gallery-thumb-item {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    background: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.portal-gallery-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portal-gallery-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    border: none;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.portal-gallery-remove-btn:hover {
    background: #ef4444;
}

.portal-gallery-thumb-item.new-upload {
    border: 2px solid #0284c7;
}

/* 5. PIE DEL MODAL */
.portal-modal-footer {
    padding: 16px 28px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

#concesionaria-portal-root .portal-btn-cancel-modal,
.portal-btn-cancel-modal {
    padding: 10px 18px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    color: #64748b !important;
    background: #f1f5f9 !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#concesionaria-portal-root .portal-btn-cancel-modal:hover,
#concesionaria-portal-root .portal-btn-cancel-modal:focus,
.portal-btn-cancel-modal:hover,
.portal-btn-cancel-modal:focus {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    outline: none !important;
}

#concesionaria-portal-root .portal-btn-save-vehicle,
.portal-btn-save-vehicle {
    padding: 10px 22px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    color: #ffffff !important;
    background: #10b981 !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25) !important;
    transition: all 0.2s !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#concesionaria-portal-root .portal-btn-save-vehicle:hover,
#concesionaria-portal-root .portal-btn-save-vehicle:focus,
.portal-btn-save-vehicle:hover,
.portal-btn-save-vehicle:focus {
    background: #059669 !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35) !important;
    border: none !important;
    outline: none !important;
    color: #ffffff !important;
}

.portal-btn-save-vehicle:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   10. MÓDULO DE ENTREGAS FELICES & SOCIAL PROOF
   ========================================================================== */
.portal-entregas-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.portal-btn-primary-compact {
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    background: var(--portal-primary);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transition: all 0.2s ease;
}

.portal-btn-primary-compact:hover {
    background: #0369a1;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
    transform: translateY(-1px);
}

.portal-entregas-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: #ffffff;
    border: 1px solid var(--portal-border);
    padding: 14px 20px;
    border-radius: 14px;
}

.portal-entregas-search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.portal-entregas-search-box .portal-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.portal-entregas-search-box .portal-search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    font-size: 13.5px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.portal-entregas-search-box .portal-search-input:focus {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.portal-entregas-advisor-filter {
    display: flex;
    align-items: center;
}

.portal-select-advisor {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.portal-select-advisor:focus {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.portal-entregas-count-badge {
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.portal-entregas-count-badge strong {
    color: #0f172a;
    font-weight: 800;
}

.portal-entregas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.portal-entrega-card {
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.portal-entrega-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.portal-entrega-media {
    position: relative;
    width: 100%;
    height: 210px;
    background: #0f172a;
    overflow: hidden;
}

.portal-entrega-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portal-entrega-card:hover .portal-entrega-img {
    transform: scale(1.04);
}

.portal-entrega-badge-date {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.portal-entrega-no-img {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 32px;
}

.portal-entrega-no-img small {
    font-size: 12px;
    font-weight: 600;
}

.portal-entrega-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
}

.portal-entrega-car-tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--portal-primary);
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    padding: 4px 10px;
    border-radius: 6px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.portal-entrega-client {
    font-size: 17.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.portal-entrega-quote {
    background: #f8fafc;
    border-left: 3px solid var(--portal-primary);
    padding: 12px 16px;
    border-radius: 0 10px 10px 0;
    font-size: 13px;
    color: #475569;
    font-style: italic;
    line-height: 1.5;
    margin-top: auto;
    display: flex;
    gap: 8px;
}

.portal-entrega-quote span {
    font-size: 24px;
    line-height: 1;
    color: var(--portal-primary);
    font-family: Georgia, serif;
    font-weight: 700;
}

.portal-entrega-quote p {
    margin: 0;
    font-size: 12.5px;
}

.portal-entrega-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
    margin-top: 6px;
}

.portal-entrega-advisor {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-ea-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.portal-ea-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.portal-ea-info {
    display: flex;
    flex-direction: column;
}

.portal-ea-label {
    font-size: 10.5px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.portal-ea-name {
    font-size: 13px;
    color: #1e293b;
    font-weight: 700;
}

.portal-advisor-readonly {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
}

.portal-advisor-readonly strong {
    color: #0f172a;
}

/* ==========================================================================
   OPTIMIZACIONES RESPONSIVAS GLOBALES PARA FILTROS, MODALES Y BOTONES MÓVILES
   ========================================================================== */
.portal-leads-new-lead-wrapper {
    margin-left: auto;
}

@media (max-width: 900px) {
    .portal-stock-toolbar,
    .portal-leads-toolbar,
    .portal-entregas-toolbar {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px;
        padding: 14px 16px;
    }

    .portal-stock-search-box,
    .portal-leads-search-box,
    .portal-entregas-search-box {
        width: 100%;
        min-width: 100%;
    }

    .portal-stock-scope-pills {
        width: 100%;
        justify-content: stretch;
    }

    .portal-scope-pill {
        flex: 1;
        justify-content: center;
        text-align: center;
    }

    .portal-stock-filters,
    .portal-leads-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
        justify-content: flex-start;
    }

    .portal-filter-pill {
        white-space: nowrap;
    }

    .portal-leads-advisor-filter,
    .portal-leads-new-lead-wrapper,
    .portal-leads-export-wrapper,
    .portal-stock-action-top {
        margin-left: 0 !important;
        width: 100%;
    }

    .portal-btn-export,
    .portal-btn-primary-compact,
    .portal-btn-new-vehicle {
        width: 100%;
        justify-content: center;
    }

    .portal-select-advisor,
    .portal-select-cycle {
        width: 100%;
    }

    .portal-modal-container {
        max-height: 96vh;
        border-radius: 16px;
    }

    .portal-modal-header {
        padding: 16px 20px;
    }

    .portal-modal-body {
        padding: 18px 20px;
    }

    .portal-modal-footer {
        padding: 14px 20px;
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .portal-modal-footer button {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================ */
/* OVERLAY Y BOTÓN DE CIERRE SIDEBAR EN MÓVIL (BACKDROP BLUR)   */
/* ============================================================ */
.portal-sidebar-backdrop {
    display: none;
}

.portal-sidebar-close {
    display: none !important;
}

@media (max-width: 900px) {
    /* OVERLAY CON FONDO DIFUSO */
    .portal-sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.65);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        display: block;
    }

    .portal-sidebar.open ~ .portal-sidebar-backdrop,
    .portal-sidebar.is-open ~ .portal-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    /* BOTÓN "X" DE CIERRE: DENTRO DEL BACKDROP, FUERA DEL MARGEN DERECHO DEL DRAWER */
    .portal-sidebar-backdrop-close,
    #portal-sidebar-backdrop-close {
        position: absolute !important;
        top: 16px !important;
        right: 16px !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        border-radius: 50% !important;
        background: rgba(15, 23, 42, 0.8) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
        color: #ffffff !important;
        font-size: 20px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
        padding: 0 !important;
        outline: none !important;
        z-index: 999 !important;
    }

    .portal-sidebar-backdrop-close:hover,
    .portal-sidebar-backdrop-close:active,
    #portal-sidebar-backdrop-close:hover,
    #portal-sidebar-backdrop-close:active {
        background: rgba(239, 68, 68, 0.95) !important;
        border-color: #f87171 !important;
        color: #ffffff !important;
        transform: scale(1.08) !important;
    }

    /* OCULTAR BOTÓN VIEJO PEGADO AL NOMBRE DENTRO DEL DRAWER EN MÓVIL */
    .portal-sidebar-close,
    #portal-sidebar-close {
        display: none !important;
    }
}

/* ============================================================ */
/* BOTÓN DISPARADOR EDICIÓN PERFIL (SIDEBAR Y EQUIPO)           */
/* ============================================================ */
.portal-btn-edit-profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #93c5fd !important;
    background: rgba(2, 132, 199, 0.18) !important;
    border: 1px solid rgba(147, 197, 253, 0.35) !important;
    border-radius: 6px;
    padding: 3px 8px;
    margin-top: 5px;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.2s ease;
    outline: none;
}

.portal-btn-edit-profile-trigger:hover {
    background: rgba(2, 132, 199, 0.4) !important;
    color: #ffffff !important;
    border-color: #93c5fd !important;
    transform: translateY(-1px);
}

.portal-btn-team-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #0369a1 !important;
    background: #f0f9ff !important;
    border: 1.5px solid #bae6fd !important;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none !important;
    outline: none;
}

.portal-btn-team-edit:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}

/* ============================================================ */
/* MODAL DE EDICIÓN DE PERFIL COMERCIAL                         */
/* ============================================================ */
.portal-modal-profile-container,
.portal-modal-profile-card {
    max-width: 580px !important;
    width: 100% !important;
}

.portal-profile-avatar-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
}

.portal-profile-avatar-preview-wrap {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #0284c7;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.22);
    background: #ffffff;
}

.portal-profile-avatar-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portal-profile-avatar-info {
    flex-grow: 1;
}

.portal-btn-file-upload {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 700;
    color: #0284c7 !important;
    background: #ffffff !important;
    border: 1.5px solid #0284c7 !important;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
}

.portal-btn-file-upload:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}

.portal-email-lock-badge {
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.portal-input-readonly {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    font-style: italic;
}

/* ==========================================================================
   CABECERA GENERAL DE SECCIÓN CON FILTROS / ACCIONES ALINEADAS
   ========================================================================== */
.portal-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.portal-section-titles {
    flex: 1;
    min-width: 280px;
}

/* ==========================================================================
   16. FILTRO DE PERÍODO COMERCIAL (EQUIPO & MÉTRICAS)
   ========================================================================== */
.portal-metrics-filter-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    flex-wrap: nowrap;
    width: auto;
    align-self: flex-end;
    margin-bottom: 4px;
}

.portal-mft-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
    flex-shrink: 0;
}

.portal-mft-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.portal-mft-select {
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    height: 36px;
    box-sizing: border-box;
    white-space: nowrap;
    flex-shrink: 0;
    width: auto;
}

.portal-mft-select:focus {
    outline: none;
    border-color: #0284c7;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.portal-btn-reset-filters {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    height: 36px;
    box-sizing: border-box;
    white-space: nowrap;
    flex-shrink: 0;
}

.portal-btn-reset-filters:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ==========================================================================
   17. PERITAJES Y TASACIONES (CPT TASACION)
   ========================================================================== */
.portal-tasaciones-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.portal-tasaciones-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-tasacion-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #8b5cf6 !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    padding: 10px 16px !important;
    position: relative !important;
    overflow: hidden !important;
}

.portal-tasacion-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

.portal-tasacion-card.status-pendiente { border-left-color: #eab308 !important; }
.portal-tasacion-card.status-contacto  { border-left-color: #0284c7 !important; }
.portal-tasacion-card.status-peritaje  { border-left-color: #8b5cf6 !important; }
.portal-tasacion-card.status-cotizado  { border-left-color: #10b981 !important; }
.portal-tasacion-card.status-cerrado   { border-left-color: #94a3b8 !important; }

/* FILA PRINCIPAL: FORMATO CRM TABLE CONTINUO (DESKTOP) */
.portal-tasacion-main-row {
    display: grid !important;
    grid-template-columns: 210px minmax(0, 1.8fr) 220px 145px 125px !important;
    align-items: center !important;
    gap: 16px !important;
    min-height: 52px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* En desktop, el contenedor de operaciones se descompone en sus 2 columnas directas */
.portal-tc-col-ops {
    display: contents !important;
}

/* Box 1: Solicitante / Cliente */
.portal-tc-col-client {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.portal-tc-client-line {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.portal-tc-client-name {
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-tc-client-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.portal-tc-time-mobile {
    display: none; /* Solo visible en móvil */
}

/* Box 2: Vehículo y Pills (Protagonista de la fila) */
.portal-tc-col-vehicle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding-right: 8px;
}

.portal-tc-vehicle-header {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.portal-tc-vehicle-title {
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-tc-vehicle-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.portal-tc-pill {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 2px 7px;
    border-radius: 6px;
    line-height: 1.2;
    white-space: nowrap;
}

.portal-tc-pill.appointment {
    background: #f5f3ff !important;
    color: #7c3aed !important;
    border-color: #ddd6fe !important;
}

.portal-tc-pill.appointment-today {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border-color: #fde68a !important;
    font-weight: 800 !important;
    animation: portalAppointmentPulse 2s infinite;
}

@keyframes portalAppointmentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

.portal-tc-pill.price {
    background: #f0fdf4 !important;
    color: #15803d !important;
    border-color: #bbf7d0 !important;
    font-weight: 800 !important;
}

/* Box 3: Contacto & Fecha */
.portal-tc-col-contact {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.portal-tc-contact-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.portal-tc-phone-link {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.portal-tc-phone-link:hover {
    color: #0284c7;
    text-decoration: underline;
}

.portal-tc-email {
    font-size: 11.5px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-tc-time-desktop {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

.portal-tc-date-muted {
    opacity: 0.75;
}

/* Box 4: Estado */
.portal-tc-col-status {
    min-width: 0;
}

.portal-tasacion-status-select {
    width: 100% !important;
    height: 36px !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #f8fafc !important;
    cursor: pointer !important;
}

/* Box 5: Acción */
.portal-tc-col-action {
    min-width: 0;
}

/* CAJÓN DESPLEGABLE DE DETALLES Y GESTIÓN */
.portal-tasacion-details-drawer {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1.5px dashed #e2e8f0;
    animation: portalFadeIn 0.2s ease;
}

.portal-tdd-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 18px;
}

.portal-tdd-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portal-tdd-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.portal-tdd-label {
    font-size: 11.5px;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.portal-tdd-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.portal-tdd-client-comments {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12.5px;
    color: #334155;
    line-height: 1.45;
    font-style: italic;
}

.portal-tdd-textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px 12px;
    font-size: 12.5px;
    font-family: inherit;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    resize: vertical;
    background: #ffffff;
    box-sizing: border-box;
}

.portal-tdd-textarea:focus,
.portal-tdd-input:focus,
.portal-tdd-select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.portal-tdd-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.portal-tdd-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.portal-tdd-input,
.portal-tdd-select {
    width: 100%;
    height: 36px;
    padding: 6px 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    box-sizing: border-box;
    outline: none;
}

.portal-tdd-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.portal-tdd-link-btn:hover {
    background: #0284c7;
    color: #ffffff;
}

.portal-tdd-checkbox-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
}

.portal-tdd-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
}

.portal-tdd-hint {
    font-size: 11px;
    color: #64748b;
    padding-left: 22px;
}

.portal-tdd-actions-col {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.portal-btn-save-tasacion {
    flex: 1;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #1e293b;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    white-space: nowrap;
}

.portal-btn-save-tasacion:hover {
    background: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.portal-tasacion-drawer-wa {
    flex: 1;
    height: 36px;
    box-sizing: border-box;
    padding: 0 12px !important;
}

/* RESPONSIVE MÓVIL (<= 900px) */
@media (max-width: 900px) {
    .portal-tasacion-card {
        padding: 12px 14px !important;
    }

    .portal-tasacion-main-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 2px 0 !important;
        min-height: auto !important;
    }

    /* Box 1: Cliente & Cabecera en Móvil (Nombre completo sin cortar) */
    .portal-tc-col-client {
        width: 100% !important;
    }

    .portal-tc-client-line {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .portal-tc-client-name {
        font-size: 14.5px !important;
        font-weight: 800 !important;
        flex: 1 !important;
        white-space: normal !important; /* Garantiza nombre completo en móvil */
        overflow: visible !important;
        text-overflow: clip !important;
        line-height: 1.25 !important;
    }

    .portal-tc-client-chips {
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .portal-tc-time-mobile {
        display: inline-block !important;
        font-size: 11px !important;
        color: #64748b !important;
        background: #f1f5f9 !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
        white-space: nowrap !important;
    }

    /* Box 2: Vehículo en Móvil */
    .portal-tc-col-vehicle {
        width: 100% !important;
        padding-right: 0 !important;
        gap: 4px !important;
    }

    .portal-tc-vehicle-title {
        font-size: 14px !important;
        white-space: normal !important;
        overflow: visible !important;
        line-height: 1.3 !important;
    }

    /* Box 3: Contacto en Móvil */
    .portal-tc-col-contact {
        width: 100% !important;
        gap: 4px !important;
    }

    .portal-tc-contact-row {
        justify-content: flex-start !important;
        gap: 10px !important;
    }

    .portal-tc-time-desktop {
        display: none !important; /* En móvil ya está en la cabecera Box 1 */
    }

    /* Box 4 & 5: Gestión Operativa en Móvil (1 sola fila con 2 columnas: 58% / 42%) */
    .portal-tc-col-ops {
        display: grid !important;
        grid-template-columns: 1.35fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 2px !important;
    }

    .portal-tc-col-status,
    .portal-tc-col-action {
        width: 100% !important;
    }

    .portal-tasacion-status-select {
        height: 36px !important;
        font-size: 12px !important;
        width: 100% !important;
    }

    .portal-btn-toggle-tasacion {
        height: 36px !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 0 8px !important;
    }

    .portal-tdd-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .portal-tdd-row-2col {
        grid-template-columns: 1fr !important;
    }

    .portal-tdd-actions-col {
        flex-direction: column !important;
        width: 100% !important;
    }

    .portal-btn-save-tasacion,
    .portal-tasacion-drawer-wa {
        width: 100% !important;
    }
}

/* ==========================================================================
   18. HERO BANNERS & PORTADA SLIDER
   ========================================================================== */
.portal-hero-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.portal-hero-slides-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.portal-hero-slide-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.portal-hero-slide-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.portal-hsc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.portal-hsc-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-badge-slide {
    font-size: 11px;
    font-weight: 800;
    color: #0284c7;
    background: #e0f2fe;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.portal-hsc-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.portal-hsc-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-check-micro {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.portal-check-micro input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0284c7;
    cursor: pointer;
}

.portal-btn-delete-row {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.portal-btn-delete-row:hover {
    background: #fca5a5;
    color: #991b1b;
}

.portal-hsc-images-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.portal-hsc-image-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-hib-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-hib-icon {
    font-size: 18px;
}

.portal-hib-header strong {
    font-size: 13px;
    color: #1e293b;
    display: block;
}

.portal-hib-header small {
    font-size: 11px;
    color: #64748b;
    display: block;
}

.portal-hib-preview-wrap {
    width: 100%;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

.portal-hib-preview-wrap.desktop {
    aspect-ratio: 16 / 9;
}

.portal-hib-preview-wrap.mobile {
    aspect-ratio: 4 / 3;
    max-height: 220px;
}

.portal-hib-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portal-hib-empty {
    color: #94a3b8;
    font-size: 12px;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

.portal-btn-upload-slide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #0284c7;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.portal-btn-upload-slide:hover {
    border-color: #0284c7;
    background: #f0f9ff;
}

.portal-hero-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* ==========================================================================
   19. AJUSTES GENERALES DE CONCESIONARIA & TARJETA DIGITAL
   ========================================================================== */
.portal-agency-settings-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.portal-settings-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.portal-routing-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portal-custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.portal-custom-checkbox:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.portal-custom-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0284c7;
    margin-top: 2px;
    cursor: pointer;
}

.portal-cc-text strong {
    display: block;
    font-size: 13.5px;
    color: #0f172a;
    margin-bottom: 2px;
}

.portal-cc-text p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

/* TARJETA DIGITAL (LINKTREE ROW) */
.portal-tarjeta-item-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.2s;
}

.portal-tarjeta-item-row:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.portal-tir-grid {
    display: grid;
    grid-template-columns: 70px 1.4fr 2fr 180px 40px;
    gap: 12px;
    align-items: flex-end;
}

.portal-label-micro {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.portal-tir-icon {
    width: 100%;
}

.portal-tir-icon-input,
.portal-tir-icon .portal-input-icon {
    position: static !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    text-align: center !important;
    font-size: 18px !important;
    padding: 8px 4px !important;
    pointer-events: auto !important;
    z-index: 1 !important;
    box-sizing: border-box !important;
}

.portal-tir-checks {
    display: flex;
    gap: 10px;
    padding-bottom: 8px;
}

.portal-tir-delete {
    padding-bottom: 4px;
}

@media (max-width: 900px) {
    .portal-hsc-images-grid {
        grid-template-columns: 1fr;
    }
    .portal-tir-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .portal-section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .portal-metrics-filter-toolbar {
        width: 100%;
        box-sizing: border-box;
        flex-wrap: wrap;
        padding: 10px 14px;
        gap: 10px;
        align-self: auto;
    }
    .portal-mft-controls {
        flex-wrap: wrap;
        width: 100%;
    }
    .portal-mft-select {
        flex: 1;
        min-width: 140px;
    }
    .portal-btn-reset-filters {
        flex-shrink: 0;
    }
}

@media (max-width: 540px) {
    .portal-mft-label {
        width: 100%;
    }
    .portal-mft-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .portal-mft-select,
    .portal-btn-reset-filters {
        width: 100%;
        justify-content: center;
    }
}

/* Campos bloqueados para condición 0km */
.portal-input-locked {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    user-select: none !important;
}

/* ==========================================================================
   AVISOS Y CONTROL DE LÍMITE DE PLAN EN EL PORTAL
   ========================================================================== */
.portal-stock-limit-alert {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: portalFadeSlideIn 0.3s ease-out;
}

@keyframes portalFadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portal-stock-limit-alert.limit-warning {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-left: 5px solid #f59e0b;
}

.portal-stock-limit-alert.limit-reached {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-left: 5px solid #ef4444;
}

.portal-limit-alert-icon {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}

.portal-limit-alert-content {
    flex: 1;
    min-width: 0;
}

.portal-limit-alert-title {
    margin: 0 0 4px 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

.limit-warning .portal-limit-alert-title {
    color: #92400e !important;
}

.limit-reached .portal-limit-alert-title {
    color: #991b1b !important;
}

.portal-limit-alert-desc {
    margin: 0 !important;
    font-size: 13.5px !important;
    line-height: 1.45 !important;
    color: #475569 !important;
}

.portal-limit-alert-desc strong {
    color: #0f172a !important;
}

.portal-limit-alert-badge {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.limit-warning .portal-limit-alert-badge {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.limit-reached .portal-limit-alert-badge {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* BOTÓN DE NUEVO AUTO BLOQUEADO POR LÍMITE */
.portal-btn-new-vehicle.btn-limit-blocked {
    background: #94a3b8 !important;
    border-color: #64748b !important;
    opacity: 0.85 !important;
    cursor: not-allowed !important;
}

.portal-btn-new-vehicle.btn-limit-blocked:hover {
    background: #ef4444 !important;
    border-color: #dc2626 !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25) !important;
}

/* GRUPO DE ACCIONES DE TARJETA (EDITAR + ELIMINAR) */
.portal-stock-btn-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* BOTÓN ELIMINAR VEHÍCULO */
#concesionaria-portal-root .portal-btn-delete-vehicle,
.portal-btn-delete-vehicle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    color: #64748b !important;
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#concesionaria-portal-root .portal-btn-delete-vehicle:hover,
#concesionaria-portal-root .portal-btn-delete-vehicle:focus,
.portal-btn-delete-vehicle:hover,
.portal-btn-delete-vehicle:focus {
    color: #dc2626 !important;
    border-color: #ef4444 !important;
    background: #fee2e2 !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2) !important;
}

@media (max-width: 640px) {
    .portal-stock-limit-alert {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .portal-limit-alert-badge {
        align-self: flex-start;
    }
}

/* ==========================================================================
   WIDGET Y BARRA DE PROGRESO DE CUPO DE INVENTARIO (PORTAL + MODAL)
   ========================================================================== */
.portal-stock-quota-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.portal-quota-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.portal-quota-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-quota-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.portal-quota-text-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.portal-quota-main-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14.5px;
    color: #1e293b;
}

.portal-quota-label {
    font-weight: 700;
    color: #0f172a;
}

.portal-quota-numbers {
    font-size: 16px;
    font-weight: 800;
    color: #0284c7;
}

.portal-quota-unit {
    color: #64748b;
    font-size: 13.5px;
}

.portal-quota-pct-tag {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 6px;
}

.portal-quota-unlimited-pill {
    font-size: 11.5px;
    font-weight: 700;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 2px 8px;
    border-radius: 9999px;
}

.portal-quota-sub-line {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.4;
}

.portal-quota-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 9999px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.portal-quota-badge.badge-ok {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.portal-quota-badge.badge-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.portal-quota-badge.badge-full {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.portal-quota-badge.badge-unlimited {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* TRACK Y LLENADO DE LA BARRA */
.portal-quota-track {
    width: 100%;
    height: 9px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
    border: 1px solid #e2e8f0;
}

.portal-quota-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-quota-fill.track-ok {
    background: linear-gradient(90deg, #0284c7 0%, #0ea5e9 100%);
}

.portal-quota-fill.track-warning {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.portal-quota-fill.track-full {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.portal-quota-fill.track-unlimited {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

/* BARRA DE CUPO DENTRO DEL MODAL */
.portal-modal-quota-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #0284c7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.portal-modal-quota-box.is-full {
    background: #fef2f2;
    border-color: #fecaca;
    border-left: 4px solid #ef4444;
}

.portal-mqb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.portal-mqb-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #334155;
}

.portal-mqb-title strong {
    color: #0f172a;
}

.portal-mqb-badge {
    font-size: 11.5px;
    font-weight: 700;
}

.portal-mqb-track {
    width: 100%;
    height: 7px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.portal-mqb-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.portal-mqb-fill.track-ok {
    background: #0284c7;
}

.portal-mqb-fill.track-warning {
    background: #f59e0b;
}

.portal-mqb-fill.track-full {
    background: #ef4444;
}

.portal-mqb-fill.track-unlimited {
    background: #10b981;
}

@media (max-width: 640px) {
    .portal-quota-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .portal-quota-right {
        align-self: flex-start;
    }
}

/* ==========================================================================
   ESTILOS PARA TABLAS ORDENABLES (MÉTRICAS Y CANALES)
   ========================================================================== */
.portal-sortable-th {
    cursor: pointer !important;
    user-select: none;
    -webkit-user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    position: relative;
}

.portal-sortable-th:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

.portal-sort-icon {
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    opacity: 0.4;
    vertical-align: middle;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.portal-sortable-th:hover .portal-sort-icon {
    opacity: 0.8;
}

.portal-sortable-th.is-sorted {
    background-color: #f1f5f9 !important;
    color: #1e40af !important;
}

.portal-sortable-th.is-sorted .portal-sort-icon {
    opacity: 1;
    color: #2563eb;
    font-weight: 900;
}

/* ==========================================================================
   PANEL MODULAR DE LICENCIA, CARACTERÍSTICAS Y CUPOS (SUPERADMIN)
   ========================================================================== */
.portal-modules-section {
    padding-bottom: 40px;
}

.portal-quota-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.portal-quota-input-wrap .portal-form-input {
    padding-right: 140px;
}

.portal-quota-input-addon {
    position: absolute;
    right: 14px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    pointer-events: none;
}

.portal-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
    margin-top: 8px;
}

.portal-module-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.portal-module-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.portal-module-card.is-active {
    border-color: #0284c7;
    background: #f8fafc;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.08);
}

.portal-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.portal-module-icon {
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.portal-module-card.is-active .portal-module-icon {
    background: #e0f2fe;
    border-color: #bae6fd;
}

.portal-module-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.35;
}

.portal-module-desc {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
    flex-grow: 1;
}

/* INTERRUPTOR SWITCH MODERNO TIPO IOS */
.portal-toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 25px;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

.portal-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.portal-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    border-radius: 25px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-toggle-slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

.portal-toggle-switch input:checked + .portal-toggle-slider {
    background-color: #0284c7;
}

.portal-toggle-switch input:checked + .portal-toggle-slider:before {
    transform: translateX(21px);
}

/* BARRA DE CUPO DE ASESORES EN EQUIPO COMERCIAL */
.portal-team-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.portal-btn-add-advisor {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #0284c7;
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.portal-btn-add-advisor:hover {
    background: #0369a1;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    transform: translateY(-1px);
}

.portal-btn-add-advisor.is-disabled,
.portal-btn-add-advisor:disabled {
    opacity: 0.55;
    background: #94a3b8 !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.portal-advisor-quota-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 22px;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.portal-advisor-quota-bar.quota-full {
    border-color: #fca5a5;
    background: #fef2f2;
}

.portal-advisor-quota-bar .portal-quota-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-advisor-quota-bar .portal-quota-icon {
    font-size: 20px;
}

.portal-advisor-quota-bar .portal-quota-text {
    font-size: 13.5px;
    color: #334155;
}

.portal-advisor-quota-bar .portal-quota-text strong {
    color: #0f172a;
    margin-right: 4px;
}

.portal-advisor-quota-bar .portal-quota-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-advisor-quota-bar .portal-quota-progress-track {
    width: 140px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.portal-advisor-quota-bar .portal-quota-progress-fill {
    height: 100%;
    background: #0284c7;
    border-radius: 10px;
    transition: width 0.4s ease;
}

.portal-advisor-quota-bar .portal-quota-progress-fill.fill-warning {
    background: #f59e0b;
}

.portal-advisor-quota-bar .portal-quota-progress-fill.fill-full {
    background: #ef4444;
}

.portal-advisor-quota-bar .portal-quota-badge {
    font-size: 11.5px;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    padding: 3px 9px;
    border-radius: 6px;
    white-space: nowrap;
}

.portal-advisor-quota-bar .portal-quota-badge.quota-danger {
    color: #b91c1c;
    background: #fee2e2;
}

.portal-modal-advisor-container {
    max-width: 580px;
}

@media (max-width: 768px) {
    .portal-advisor-quota-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .portal-advisor-quota-bar .portal-quota-right {
        width: 100%;
        justify-content: space-between;
    }
    .portal-advisor-quota-bar .portal-quota-progress-track {
        flex-grow: 1;
    }
    .portal-modules-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   FICHA COMERCIAL 360°, HISTORIAL DEL CLIENTE (TIMELINE), AGENDA & GOOGLE CALENDAR
   ========================================================================== */

/* Badges de recurrencia en listados y fichas */
.portal-lead-recurrent-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

/* Contenedor Modal 360 */
.portal-360-container {
    max-width: 960px !important;
    width: 95% !important;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 16px !important;
}

.portal-360-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    gap: 16px;
    flex-wrap: wrap;
}

.portal-360-header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

.portal-360-client-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.portal-360-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.portal-360-client-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.portal-360-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.portal-360-name {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.portal-360-contact-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.portal-360-chip {
    font-size: 12px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.portal-360-link {
    color: #0284c7;
    text-decoration: none;
    font-weight: 600;
}

.portal-360-link:hover {
    text-decoration: underline;
}

.portal-360-header-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-360-status-box {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.portal-360-control-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#portal-lead-360-close {
    font-size: 20px !important;
    font-weight: 800 !important;
    font-family: Arial, sans-serif !important;
    color: #334155 !important;
    line-height: 1 !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    background: #f1f5f9 !important;
    border: 1.5px solid #cbd5e1 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
}

#portal-lead-360-close:hover,
#portal-lead-360-close:focus {
    color: #0f172a !important;
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
}

/* Pestañas de navegación */
.portal-360-tabs-nav {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
    gap: 6px;
    overflow-x: auto;
}

.portal-360-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 13px 18px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    outline: none;
}

.portal-360-tab-btn:hover {
    color: #0f172a;
    background: rgba(241, 245, 249, 0.6);
}

.portal-360-tab-btn.active {
    color: #0284c7;
    border-bottom-color: #0284c7;
    background: #ffffff;
}

.portal-360-tab-text-short {
    display: none;
}

.portal-360-tab-text-full {
    display: inline;
}

.portal-360-badge-count {
    background: #e2e8f0;
    color: #334155;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
}

.portal-360-tab-btn.active .portal-360-badge-count {
    background: #e0f2fe;
    color: #0284c7;
}

/* Contenido de pestañas */
.portal-360-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #f8fafc;
}

.portal-360-pane {
    display: none;
}

.portal-360-pane.active {
    display: block;
}

/* Pestaña 1: Resumen */
.portal-360-resumen-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.portal-360-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.portal-360-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.portal-360-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.portal-360-card-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: #e0f2fe;
    color: #0369a1;
}

.portal-360-veh-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-360-veh-thumb {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.portal-360-veh-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.portal-360-veh-name {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.portal-360-veh-price-tag {
    font-size: 14px;
    font-weight: 800;
    color: #10b981;
}

.portal-btn-view-unit {
    font-size: 12px;
    font-weight: 700;
    color: #0284c7;
    text-decoration: none;
    margin-top: 2px;
}

.portal-btn-view-unit:hover {
    text-decoration: underline;
}

.portal-360-tradein-section {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 12px;
}

.portal-360-subheading {
    font-size: 11.5px;
    font-weight: 800;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.portal-360-tradein-text {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #78350f;
}

.portal-360-actions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-360-btn-cta-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 13.5px;
    font-weight: 700;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(37, 211, 102, 0.28);
    transition: all 0.2s;
}

.portal-360-btn-cta-wa:hover {
    background: #1eb855;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(37, 211, 102, 0.4);
}

.portal-360-btn-cta-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f1f5f9;
    color: #334155 !important;
    border: 1px solid #cbd5e1;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 700;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.2s;
}

.portal-360-btn-cta-call:hover {
    background: #e2e8f0;
    color: #0f172a !important;
}

.portal-360-reassign-box {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

/* Pestaña 2: Timeline / Historial del Cliente */
.portal-360-new-event-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.portal-360-event-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-360-event-row-top {
    display: flex;
    gap: 10px;
}

.portal-360-timeline-wrapper {
    position: relative;
    padding: 10px 0 10px 10px;
}

.portal-360-timeline-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 27px;
    width: 2px;
    background: #cbd5e1;
}

.portal-360-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.portal-360-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.portal-360-timeline-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.portal-360-timeline-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    flex: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.portal-360-timeline-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.portal-360-timeline-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
}

.portal-360-timeline-date {
    font-size: 11.5px;
    color: #94a3b8;
}

.portal-360-timeline-desc {
    margin: 4px 0 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
    white-space: pre-wrap;
}

.portal-360-empty-timeline {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

/* Pestaña 3: Agenda & Google Calendar */
.portal-360-agenda-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.portal-360-agenda-highlight {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 16px;
}

.portal-360-agenda-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.portal-360-agenda-time-text {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 800;
    color: #166534;
}

.portal-360-agenda-motive-text {
    margin: 0;
    font-size: 13px;
    color: #15803d;
}

.portal-360-btn-gcal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    color: #1a73e8 !important;
    border: 1.5px solid #1a73e8;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 10px;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.15);
}

.portal-360-btn-gcal:hover {
    background: #1a73e8;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.portal-360-hint-text {
    font-size: 11.5px;
    color: #64748b;
    margin: 8px 0 0;
    text-align: center;
}

/* Pestaña 4: Peritajes */
.portal-360-peritajes-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.portal-360-empty-peritajes {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

.portal-360-peritajes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.portal-360-peritaje-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.portal-360-pcard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
}

.portal-360-pcard-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
}

.portal-360-pcard-badge {
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #334155;
}

.portal-360-pcard-badge.p-status-aprobado,
.portal-360-pcard-badge.p-status-tasado {
    background: #dcfce7;
    color: #166534;
}

.portal-360-pcard-badge.p-status-rechazado {
    background: #fee2e2;
    color: #991b1b;
}

.portal-360-pcard-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #64748b;
}

.portal-360-pcard-pricing {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
}

.portal-360-price-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.portal-360-price-val {
    font-size: 15px;
    font-weight: 800;
    color: #0284c7;
}

.portal-360-btn-pdf-report {
    display: block;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #0284c7;
    text-decoration: none;
    padding: 8px;
    border: 1px solid #bae6fd;
    background: #f0f9ff;
    border-radius: 8px;
    transition: all 0.2s;
}

.portal-360-btn-pdf-report:hover {
    background: #e0f2fe;
    color: #0369a1;
}

/* Pie del modal */
.portal-360-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.portal-360-footer-info {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

/* ==========================================================================
   WIDGET AGENDA EN EL TABLERO DEL PORTAL
   ========================================================================== */
.portal-agenda-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.portal-agenda-header-actions {
    display: flex;
    align-items: center;
}

.portal-agenda-count-badge {
    font-size: 12px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0284c7;
}

.portal-agenda-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-agenda-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    gap: 14px;
    transition: all 0.2s;
}

.portal-agenda-item:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.portal-agenda-item.agenda-today {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
}

.portal-agenda-item.agenda-past {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

.portal-agenda-item.agenda-future {
    border-left: 4px solid #0284c7;
}

.portal-agenda-time-box {
    flex-shrink: 0;
}

.portal-agenda-date-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 800;
    white-space: nowrap;
}

.portal-agenda-date-chip.agenda-today {
    background: #dcfce7;
    color: #166534;
}

.portal-agenda-date-chip.agenda-past {
    background: #fef3c7;
    color: #92400e;
}

.portal-agenda-date-chip.agenda-future {
    background: #e0f2fe;
    color: #0369a1;
}

.portal-agenda-info {
    flex: 1;
    min-width: 0;
}

.portal-agenda-client-name {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.portal-agenda-motive {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-left: 4px;
}

.portal-agenda-veh {
    font-size: 12px;
    color: #475569;
    display: block;
    margin-top: 2px;
}

.portal-agenda-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.portal-btn-wa-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #25D366;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.portal-btn-wa-sm:hover {
    background: #1eb855;
}

.portal-btn-lead-360 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.portal-btn-lead-360:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Responsive 360 */
@media (max-width: 768px) {
    /* MODAL COMPLETO TIPO APP MÓVIL */
    .portal-360-backdrop {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    .portal-360-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        border: none !important;
        margin: 0 !important;
        box-shadow: none !important;
    }

    /* CABECERA ULTRA-COMPACTA */
    .portal-360-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 10px 14px !important;
        gap: 8px !important;
    }

    .portal-360-header-top-row {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .portal-360-client-card {
        gap: 10px !important;
        flex: 1 !important;
        min-width: 0 !important;
    }

    .portal-360-avatar {
        width: 38px !important;
        height: 38px !important;
        font-size: 13px !important;
        flex-shrink: 0 !important;
        box-shadow: none !important;
    }

    .portal-360-client-meta {
        gap: 2px !important;
        min-width: 0 !important;
    }

    .portal-360-name {
        font-size: 15.5px !important;
        line-height: 1.2 !important;
    }

    .portal-360-name-row {
        gap: 6px !important;
    }

    .portal-lead-recurrent-chip {
        font-size: 9.5px !important;
        padding: 1px 5px !important;
    }

    .portal-360-contact-bar {
        gap: 6px !important;
        margin-top: 2px !important;
    }

    .portal-360-chip {
        font-size: 11px !important;
    }

    #portal-lead-360-close {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        font-size: 17px !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
        margin-left: 6px !important;
    }

    .portal-360-header-controls {
        width: 100% !important;
        margin-top: 0 !important;
    }

    .portal-360-status-box {
        width: 100% !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }

    .portal-360-control-label {
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    .portal-lead-status-select {
        flex: 1 !important;
        padding: 4px 8px !important;
        font-size: 12px !important;
        height: 32px !important;
    }

    /* PESTAÑAS 100% VISIBLES EN 4 COLUMNAS (25% CADA UNA - SIN SCROLL HORIZONTAL) */
    .portal-360-tabs-nav {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        padding: 0 !important;
        gap: 0 !important;
        overflow: visible !important;
        background: #ffffff !important;
        border-bottom: 2px solid #e2e8f0 !important;
        width: 100% !important;
    }

    .portal-360-tab-btn {
        width: 100% !important;
        padding: 8px 2px !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        gap: 2px !important;
        border-bottom: 3px solid transparent !important;
        position: relative !important;
        background: transparent !important;
        box-sizing: border-box !important;
    }

    .portal-360-tab-btn.active {
        color: #0284c7 !important;
        border-bottom-color: #0284c7 !important;
        background: #f0f9ff !important;
    }

    .portal-360-tab-text-full {
        display: none !important;
    }

    .portal-360-tab-text-short {
        display: inline !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    .portal-360-tab-icon {
        font-size: 15px !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

    .portal-360-badge-count {
        font-size: 9px !important;
        font-weight: 800 !important;
        padding: 1px 4px !important;
        border-radius: 8px !important;
        position: absolute !important;
        top: 3px !important;
        right: 6px !important;
    }

    /* CONTENIDO DEL MODAL OPTIMIZADO */
    .portal-360-tab-content {
        padding: 12px 14px !important;
        flex: 1 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .portal-360-resumen-grid,
    .portal-360-agenda-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .portal-360-card {
        padding: 14px !important;
        gap: 10px !important;
    }

    .portal-360-new-event-box {
        padding: 12px 14px !important;
        margin-bottom: 14px !important;
    }

    .portal-360-event-row-top {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .portal-360-event-row-top select {
        max-width: 100% !important;
    }

    .portal-360-footer {
        padding: 8px 14px !important;
    }

    .portal-360-footer-info {
        font-size: 11px !important;
    }

    .portal-btn-cancel-modal {
        padding: 5px 12px !important;
        font-size: 11.5px !important;
    }

    .portal-agenda-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .portal-agenda-actions {
        width: 100% !important;
        justify-content: flex-end !important;
    }
}

/* ==========================================================================
   ESTILOS: CATÁLOGO OCULTO, CONMUTADOR DE VISIBILIDAD & MODO PRESENTACIÓN
   ========================================================================== */

/* 1. Conmutador de Catálogo (Público / Oculto / Todo) */
.portal-stock-visibility-pills {
    display: inline-flex !important;
    align-items: center !important;
    background: #f1f5f9 !important;
    padding: 3px !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    gap: 2px !important;
}

.portal-vis-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 14px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 9px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#concesionaria-portal-root .portal-vis-pill:hover,
#concesionaria-portal-root .portal-vis-pill:focus,
.portal-vis-pill:hover,
.portal-vis-pill:focus {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.7) !important;
}

#concesionaria-portal-root .portal-vis-pill.active,
.portal-vis-pill.active {
    background: #ffffff !important;
    color: #0284c7 !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

#concesionaria-portal-root .portal-vis-pill.pill-hidden-special.active,
.portal-vis-pill.pill-hidden-special.active {
    color: #b45309 !important;
}

.portal-vis-pill .pill-count {
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
    background: #e2e8f0 !important;
    color: #475569 !important;
}

#concesionaria-portal-root .portal-vis-pill.active .pill-count,
.portal-vis-pill.active .pill-count {
    background: #e0f2fe !important;
    color: #0284c7 !important;
}

#concesionaria-portal-root .portal-vis-pill.pill-hidden-special.active .pill-count,
.portal-vis-pill.pill-hidden-special.active .pill-count {
    background: #fef3c7 !important;
    color: #92400e !important;
}

/* 2. Banner Informativo para Catálogo Oculto */
.portal-hidden-catalog-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(217, 119, 6, 0.08);
    animation: portalFadeIn 0.25s ease;
}

.portal-hcb-icon {
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-hcb-content {
    flex: 1;
}

.portal-hcb-title {
    margin: 0 0 4px 0 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #92400e !important;
}

.portal-hcb-desc {
    margin: 0 !important;
    font-size: 13px !important;
    color: #78350f !important;
    line-height: 1.45 !important;
}

.portal-hcb-count {
    flex-shrink: 0;
}

.portal-hcb-count-badge {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 800;
    color: #92400e;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #fde68a;
    border-radius: 20px;
    white-space: nowrap;
}

/* 3. Badge en Tarjeta de Vehículo Oculto */
.portal-stock-badge-hidden {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
    letter-spacing: 0.3px !important;
}

.portal-stock-card.is-vehicle-hidden {
    border-color: #fef3c7 !important;
}

.portal-stock-card.is-vehicle-hidden:hover {
    border-color: #fde68a !important;
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.1) !important;
}

/* 4. Botón Modo Presentación en Tarjeta */
.portal-btn-present-vehicle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 5px 11px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 7px !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.portal-btn-present-vehicle:hover {
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
    transform: translateY(-1px) !important;
}

.portal-btn-present-vehicle.btn-present-only {
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
}

.portal-btn-present-vehicle.btn-present-only:hover {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
}

/* 5. Modal de Modo Presentación para Clientes */
.portal-presentation-container {
    max-width: 960px !important;
    width: 95% !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25) !important;
}

.portal-presentation-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 26px 16px 26px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.portal-pres-titles {
    flex: 1;
}

.portal-pres-badge {
    display: inline-block;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 800;
    color: #0284c7;
    background: #e0f2fe;
    border-radius: 20px;
    margin-bottom: 6px;
    letter-spacing: 0.4px;
}

.portal-pres-badge.badge-hidden-mode {
    color: #92400e !important;
    background: #fef3c7 !important;
    border: 1px solid #fde68a !important;
}

.portal-pres-title {
    margin: 0 !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1.25 !important;
}

.portal-pres-subtitle {
    margin-top: 4px;
    font-size: 13.5px;
    color: #64748b;
    font-weight: 600;
}

.portal-presentation-body {
    padding: 22px 26px !important;
}

.portal-pres-grid-layout {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 24px;
}

.portal-pres-main-photo-wrap {
    position: relative;
    width: 100%;
    height: 280px;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.portal-pres-img-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.portal-pres-photo-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.portal-pres-thumbs-track {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.portal-pres-thumb-item {
    width: 62px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.65;
    transition: all 0.15s ease;
}

.portal-pres-thumb-item:hover {
    opacity: 0.95;
}

.portal-pres-thumb-item.active {
    border-color: #0284c7;
    opacity: 1;
    transform: scale(1.04);
}

.portal-pres-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Tarjeta de Precio Presentación */
.portal-pres-price-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 18px;
}

.portal-pres-price-tag {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portal-pres-price-amount {
    font-size: 28px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.15;
    margin: 4px 0;
}

.portal-pres-anticipo-box {
    margin-top: 6px;
    font-size: 13.5px;
    color: #166534;
}

.portal-pres-anticipo-box .pres-anticipo-lbl {
    font-weight: 600;
}

.portal-pres-anticipo-box .pres-anticipo-val {
    font-weight: 800;
    font-size: 15px;
}

.portal-pres-llamador {
    margin-top: 8px;
    display: inline-block;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    border-radius: 6px;
}

/* Grilla de Especificaciones Técnicas */
.portal-pres-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.portal-pres-spec-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    padding: 8px 12px;
    border-radius: 8px;
}

.portal-pres-spec-card .pres-spec-icon {
    font-size: 16px;
    line-height: 1;
}

.portal-pres-spec-card .pres-spec-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.portal-pres-spec-card .pres-spec-value {
    margin-left: auto;
    font-size: 12.5px;
    font-weight: 800;
    color: #0f172a;
    text-align: right;
}

/* Bloques Descriptivos */
.portal-pres-details-section {
    margin-top: 22px;
    border-top: 1px solid #f1f5f9;
    padding-top: 18px;
}

.portal-pres-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.portal-pres-detail-block {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 12px 16px;
    border-radius: 10px;
}

.portal-pres-detail-block h4 {
    margin: 0 0 6px 0 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #334155 !important;
}

.portal-pres-detail-block p {
    margin: 0 !important;
    font-size: 13px !important;
    color: #475569 !important;
    line-height: 1.45 !important;
    white-space: pre-line;
}

.portal-pres-detail-block.full-width {
    grid-column: span 2;
}

/* Footer Presentación */
.portal-pres-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 26px !important;
    border-top: 1px solid #f1f5f9 !important;
    background: #f8fafc !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
}

.portal-btn-pres-close {
    padding: 9px 18px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.portal-btn-pres-close:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.portal-btn-pres-whatsapp {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 9px 20px !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    background: #25D366 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.18s ease !important;
}

.portal-btn-pres-whatsapp:hover {
    background: #20ba5a !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4) !important;
    color: #ffffff !important;
}

/* Responsivo para Móviles en Modo Presentación */
@media (max-width: 768px) {
    .portal-pres-grid-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portal-pres-main-photo-wrap {
        height: 220px;
    }

    .portal-pres-specs-grid {
        grid-template-columns: 1fr;
    }

    .portal-pres-details-grid {
        grid-template-columns: 1fr;
    }

    .portal-pres-detail-block.full-width {
        grid-column: span 1;
    }

    .portal-pres-footer {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .portal-btn-pres-close,
    .portal-btn-pres-whatsapp {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .portal-stock-visibility-pills {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .portal-vis-pill {
        flex: 1 !important;
        justify-content: center !important;
        padding: 6px 8px !important;
        font-size: 11.5px !important;
    }
}


