/* ==========================================================================
   1. VARIABLES CSS GLOBALES
   ========================================================================== */
:root {
    /* Colores principales */
    --blue-50: #EFF6FF; --blue-100: #DBEAFE; --blue-200: #BFDBFE;
    --blue-400: #60A5FA; --blue-500: #3B82F6; --blue-600: #2563EB; --blue-700: #1D4ED8;
    --cyan-400: #22D3EE; --cyan-500: #06B6D4;
    --green-400: #4ADE80; --green-500: #22C55E;
    --yellow-400: #FACC15; --yellow-500: #EAB308;
    --orange-400: #FB923C; --orange-500: #F97316;
    --red-400: #F87171; --red-500: #EF4444;
    --purple-500: #A855F7; --pink-500: #EC4899;
    
    /* Fondos y bordes */
    --bg-main: #F0F5FF;
    --bg-card: rgba(255,255,255,0.75);
    --bg-card-solid: #FFFFFF;
    --bg-sidebar: #ffffff;
    --bg-soft: #f8fafc;
    --border-light: #E2E8F0;
    
    /* Textos */
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    
    /* Sombras */
    --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
    --shadow-glow: 0 0 20px rgba(59,130,246,0.15);
    
    /* Bordes redondeados */
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    
    /* Layout */
    --sidebar-width: 260px;
    --topbar-height: 70px;
}

/* ==========================================================================
   2. RESET Y BASE
   ========================================================================== */
* { font-family: 'Inter', -apple-system, sans-serif; box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(59,130,246,0.06) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   3. LOGIN
   ========================================================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1D4ED8 0%, #06B6D4 50%, #3B82F6 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.login-grid-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

.login-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
}

.login-logo { text-align: center; margin-bottom: 28px; }

.login-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(37,99,235,0.35);
}

.login-logo h1 { font-weight: 800; color: var(--blue-700); margin: 0; font-size: 26px; }
.login-logo p { color: var(--text-secondary); font-size: 13px; margin-top: 4px; }

/* ==========================================================================
   4. FORMULARIOS
   ========================================================================== */
.form-label-tech {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.form-control-tech {
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: 14px;
    background: var(--blue-50);
}

.form-control-tech:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
    background: white;
}

/* ==========================================================================
   SELECT: Flecha personalizada (SOLUCIÓN FORZADA)
   ========================================================================== */
select.form-control-tech,
select.form-control,
select.form-select,
.form-control-tech select,
.form-control select {
    /* Forzar eliminación de la flecha nativa */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    
    /* Sobreescribir cualquier background-image de Bootstrap */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 12px !important;
    
    /* Espacio para que el texto no tape la flecha */
    padding-right: 2.5rem !important;
    
    /* Cursor de mano */
    cursor: pointer !important;
}

/* Hover: flecha más oscura */
select.form-control-tech:hover,
select.form-control:hover,
select.form-select:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231e293b' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
}

/* Focus: flecha azul */
select.form-control-tech:focus,
select.form-control:focus,
select.form-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233b82f6' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
}

/* Compatibilidad IE/Edge antiguo */
select::-ms-expand {
    display: none !important;
}

.input-icon-wrap { position: relative; }
.input-icon-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--blue-400);
    z-index: 2;
}
.input-icon-wrap .form-control-tech { padding-left: 40px; }

.btn-login {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    border: none;
    border-radius: var(--radius-sm);
    padding: 13px;
    font-weight: 700;
    color: white;
    width: 100%;
    font-size: 14px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37,99,235,0.4);
    color: white;
}

/* ==========================================================================
   5. LAYOUT PRINCIPAL (App Container, Sidebar, Topbar)
   ========================================================================== */
.app-container {
    display: none;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.app-container.active { display: flex; }

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1050;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-light);
    gap: 0.75rem;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-brand h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--blue-700);
}

.sidebar-brand small {
    color: var(--text-muted);
    font-size: 10px;
}

.nav-section-title {
    padding: 10px 20px 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-left: 3px solid transparent;
    margin: 1px 8px;
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
    transition: all 0.2s;
}

.sidebar-nav li a:hover {
    background: var(--blue-50);
    color: var(--blue-600);
}

.sidebar-nav li a.active {
    background: linear-gradient(90deg, rgba(59,130,246,0.1), transparent);
    color: var(--blue-600);
    border-left-color: var(--blue-600);
    font-weight: 700;
}

.sidebar-nav li a i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

.pro-badge {
    background: linear-gradient(135deg, var(--yellow-400), var(--orange-400));
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    letter-spacing: 0.5px;
}

/* --- MAIN CONTENT --- */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- TOPBAR --- */
.topbar {
    height: var(--topbar-height);
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    gap: 12px;
}

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

.hamburger-btn {
    display: none;
    background: var(--blue-50);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xs);
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    color: var(--blue-600);
    cursor: pointer;
    font-size: 20px;
}

.hamburger-btn:hover { background: var(--blue-100); }

.topbar-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.topbar-title p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

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

.context-badge {
    background: var(--blue-50);
    border: 1px solid var(--blue-200);
    border-radius: 20px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--blue-700);
    cursor: pointer;
    transition: all 0.2s;
}

.context-badge:hover { background: var(--blue-100); }
.context-badge.no-context {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: var(--red-500);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-500), var(--cyan-500));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    position: relative;
}

.user-avatar .status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: var(--green-400);
    border: 2px solid white;
    border-radius: 50%;
}

.user-info .name {
    font-size: 13px;
    font-weight: 600;
}

.user-info .role {
    font-size: 10px;
    color: var(--text-muted);
}

/* --- OVERLAY PARA MÓVIL --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1040;
}

.sidebar-overlay.active { display: block; }

/* ==========================================================================
   6. RESPONSIVE: MÓVIL Y TABLET (< 992px)
   ========================================================================== */
/* ==========================================================================
6. RESPONSIVE: MÓVIL Y TABLET (< 992px)
========================================================================== */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar.active { 
        transform: translateX(0); 
    }
    
    .main-content { margin-left: 0; }
    .hamburger-btn { display: flex; }
    
    .topbar { padding: 0 1rem; }
    .topbar-title p { display: none; }
    .topbar-title h2 { font-size: 16px; }
    
    .user-info { display: none; }
    
    .context-badge span#contextName { display: none; }
    .context-badge {
        padding: 0.5rem;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .page-content { padding: 16px; }
    .topbar-right { gap: 0.75rem; }
}

/* ==========================================================================
   7. CONTENIDO DE PÁGINA
   ========================================================================== */
.page-content {
    flex: 1;
    padding: 24px;
}

.page-section { display: none; }
.page-section.active {
    display: block;
    animation: fadeUp 0.35s ease;
}

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

.context-prompt {
    background: var(--bg-card-solid);
    border: 2px dashed var(--blue-200);
    border-radius: var(--radius);
    padding: 60px 30px;
    text-align: center;
}

.context-prompt-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-500), var(--cyan-500));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(59,130,246,0.3);
}

.context-prompt h4 { font-weight: 800; margin-bottom: 8px; }
.context-prompt p { color: var(--text-muted); margin: 0; }

/* ==========================================================================
   8. COMPONENTES (Cards, Stats, Tables, Badges, Buttons)
   ========================================================================== */
.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.stat-card .icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 14px;
}

.icon-blue { background: rgba(59,130,246,0.1); color: var(--blue-500); }
.icon-cyan { background: rgba(6,182,212,0.1); color: var(--cyan-500); }
.icon-yellow { background: rgba(234,179,8,0.12); color: var(--yellow-500); }
.icon-green { background: rgba(34,197,94,0.1); color: var(--green-500); }
.icon-orange { background: rgba(249,115,22,0.1); color: var(--orange-500); }
.icon-purple { background: rgba(168,85,247,0.1); color: var(--purple-500); }
.icon-red { background: rgba(239,68,68,0.1); color: var(--red-500); }

.stat-card .label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-card .value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.card-tech {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
}

.card-tech-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.card-tech-header h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-tech-body { padding: 20px; }

.table-tech {
    margin: 0;
    font-size: 13px;
}

.table-tech thead th {
    background: var(--blue-50);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 14px;
    border: none;
    white-space: nowrap;
}

.table-tech tbody td {
    padding: 14px;
    vertical-align: middle;
    border-color: var(--border-light);
}

.table-responsive-tech {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.badge-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-active {
    background: rgba(59,130,246,0.1);
    color: var(--blue-500);
}

.btn-gradient {
    background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    padding: 8px 18px;
    font-weight: 700;
    font-size: 12px;
}

.btn-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59,130,246,0.3);
    color: white;
}

.activity-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
}

.activity-content { flex: 1; min-width: 0; }
.activity-content .title { font-size: 12px; font-weight: 500; margin: 0; }
.activity-content .time { font-size: 10px; color: var(--text-muted); }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h4 {
    font-weight: 800;
    font-size: 18px;
    margin: 0;
}

.section-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* ==========================================================================
   9. BADGES DE ROLES Y AVATARES
   ========================================================================== */
.roles-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.badge-role {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-role-admin {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(236, 72, 153, 0.15));
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-role-rp {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(6, 182, 212, 0.15));
    color: #2563EB;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-role-rc {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(6, 182, 212, 0.12));
    color: #16A34A;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-role-miembro {
    background: rgba(148, 163, 184, 0.12);
    color: #64748B;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.mini-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

/* ==========================================================================
   10. PLAN PRO
   ========================================================================== */
.pro-banner {
    background: linear-gradient(135deg, #1D4ED8 0%, #7C3AED 50%, #EC4899 100%);
    border-radius: var(--radius);
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
}

.pro-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.1) 1px, transparent 0);
    background-size: 24px 24px;
}

.pro-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    flex-wrap: wrap;
}

.pro-banner-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.pro-banner-text { flex: 1; color: white; min-width: 200px; }
.pro-banner-text h5 { margin: 0 0 4px; font-weight: 800; font-size: 16px; }
.pro-banner-text p { margin: 0; font-size: 13px; opacity: 0.9; }

.btn-light-pro {
    background: white;
    color: var(--blue-700);
    border: none;
    border-radius: var(--radius-xs);
    padding: 10px 20px;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.btn-light-pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.planpro-hero {
    background: linear-gradient(135deg, #1D4ED8 0%, #06B6D4 100%);
    border-radius: var(--radius);
    padding: 48px 32px;
    text-align: center;
    color: white;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.planpro-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.08) 1px, transparent 0);
    background-size: 32px 32px;
}

.planpro-hero-content { position: relative; }

.planpro-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.planpro-hero h1 { font-weight: 800; font-size: 32px; margin-bottom: 12px; }
.planpro-hero p { font-size: 15px; opacity: 0.9; max-width: 600px; margin: 0 auto; }

.text-gradient {
    background: linear-gradient(90deg, #FACC15, #FB923C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-card {
    background: var(--bg-card-solid);
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px 24px;
    position: relative;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.plan-card.destacado {
    border-color: var(--blue-500);
    background: linear-gradient(180deg, rgba(59,130,246,0.03), white);
    box-shadow: 0 10px 40px rgba(59,130,246,0.15);
}

.plan-card.destacado::before {
    content: 'MÁS POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
    color: white;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
}

.plan-card-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.plan-card-header h4 { font-weight: 800; margin: 0 0 8px; font-size: 18px; }
.plan-card-header p { font-size: 12px; color: var(--text-muted); margin: 0 0 16px; }

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.plan-price .currency { font-size: 16px; font-weight: 700; color: var(--text-secondary); }
.plan-price .amount { font-size: 36px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.plan-price .period { font-size: 12px; color: var(--text-muted); }
.plan-price.free .amount { color: var(--green-500); }

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    flex: 1;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-primary);
}

.plan-features li i {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-top: 2px;
}

.plan-features li.incluido i { background: rgba(34,197,94,0.1); color: var(--green-500); }
.plan-features li.no-incluido { color: var(--text-muted); text-decoration: line-through; opacity: 0.6; }
.plan-features li.no-incluido i { background: rgba(148,163,184,0.1); color: var(--text-muted); }

.btn-plan {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13px;
    transition: all 0.3s;
    border: 2px solid var(--border-light);
    background: white;
    color: var(--text-primary);
}

.btn-plan:hover {
    border-color: var(--blue-500);
    color: var(--blue-600);
}

.btn-plan.primary {
    background: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
    color: white;
    border-color: transparent;
}

.btn-plan.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59,130,246,0.3);
    color: white;
}

.benefit-card {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.3s;
    height: 100%;
}

.benefit-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--blue-200);
}

.benefit-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.benefit-card h6 { font-weight: 700; margin-bottom: 8px; font-size: 15px; }
.benefit-card p { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.5; }

.pro-cta {
    background: linear-gradient(135deg, #1D4ED8 0%, #7C3AED 100%);
    border-radius: var(--radius);
    padding: 40px 32px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.pro-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.08) 1px, transparent 0);
    background-size: 28px 28px;
}

.pro-cta-content { position: relative; }
.pro-cta h4 { font-weight: 800; margin-bottom: 8px; }
.pro-cta p { opacity: 0.9; margin-bottom: 20px; }
.pro-cta .btn-gradient {
    background: white;
    color: var(--blue-700);
    padding: 12px 28px;
    font-size: 14px;
}
.pro-cta .btn-gradient:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.3); }

/* ==========================================================================
   11. SCROLLBAR PERSONALIZADO
   ========================================================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--blue-200); border-radius: 3px; }