:root {
    --bg-main: #FFFFFF; /* Pure white */
    --bg-white: #ffffff;
    --text-primary: #111111;
    --text-secondary: #777777;
    --border-color: #e5e5e5;
    --pill-bg: #e5e5e3;
    --pill-active: #3476A4;
    --pill-active-text: #ffffff;
    --primary-blue: #3476A4; /* Kept for subtle accents if needed */
    
    --border-radius-pill: 50px;
    --border-radius-card: 20px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

.app-container {
    padding: 30px 40px;
    max-width: 1800px;
    margin: 0 auto;
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.header-divider {
    height: 1px;
    background-color: var(--border-color);
    width: 100%;
    margin: 0 auto 40px;
    opacity: 0.6;
}

.nav-left {
    flex: 1;
}

.nav-center {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

/* Notification System */
.notification-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.notification-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.notification-btn:hover {
    background-color: #f0f0f0;
    color: var(--primary-blue);
}

.notification-btn i {
    font-size: 22px;
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: #ef4444; /* Red */
    border-radius: 50%;
    border: 2px solid var(--bg-white);
    display: none;
}

/* Bento Box Dropdown */
.notifications-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: -10px;
    width: 320px;
    background-color: var(--bg-white);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: none;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notifications-dropdown.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.notifications-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.notifications-count {
    background-color: #fef2f2;
    color: #ef4444;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 16px;
    align-items: flex-start;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: #f0f4f8;
}

.notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    flex-shrink: 0;
}

.notification-icon.american-fidelity {
    background-color: rgba(227, 6, 32, 0.1);
    color: #E30620;
}

.notification-icon.bmi {
    background-color: rgba(46, 84, 158, 0.1);
    color: #2E549E;
}

.notification-icon.amfirst-life {
    background-color: rgba(18, 32, 105, 0.1);
    color: #122069;
}

.notification-icon.default {
    background-color: #f1f5f9;
    color: #64748b;
}

.notification-icon i {
    font-size: 18px;
}

.notification-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
}

.notification-text strong {
    font-weight: 600;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 20px 0;
}

.logo-large {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 0.9;
    width: fit-content;
}

.logo-main {
    font-size: 48px;
    font-weight: 900;
    color: #002969; /* Deep blue */
    letter-spacing: -2px;
}

.logo-sub {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-top: 4px;
    margin-right: 2px;
}

.dynamic-pills {
    display: flex;
    gap: 4px;
    background-color: transparent;
    padding: 4px;
    border-radius: var(--border-radius-pill);
    border: 1px solid transparent;
    animation: borderFadeIn 0.8s ease forwards;
    animation-delay: 1.1s;
}

@keyframes borderFadeIn {
    from { border-color: transparent; }
    to { border-color: #e5e5e5; }
}

#company-container {
    min-width: 492px; /* Reserves space for 3 pills to prevent layout jumping */
}

#company-container .nav-pill {
    min-width: 160px;
    justify-content: center;
}

.active-vida {
    background-color: #3476A4 !important;
    color: white !important;
    min-width: 160px;
    justify-content: center;
    border: 1px solid #3476A4 !important;
    box-shadow: none;
    font-weight: 700;
    cursor: default !important;
}

.vertical-divider {
    width: 1px;
    height: 20px;
    background-color: #e5e5e5;
    margin: 0 4px;
}

.dynamic-pills .nav-pill {
    background-color: transparent;
}

.dynamic-pills .nav-pill:hover {
    background-color: rgba(0,0,0,0.03);
}

.dynamic-pills .nav-pill.active-pill {
    background-color: #f8fafc;
    color: var(--text-primary);
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.nav-pill {
    height: 36px;
    padding: 0 16px;
    border-radius: var(--border-radius-pill);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    animation: pillUltraReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pillUltraReveal {
    0% {
        opacity: 0;
        filter: blur(8px);
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

.nav-pill:hover {
    background-color: #F3F4F6;
    transform: translateY(-2px);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.nav-pill.active-pill {
    background-color: var(--pill-active);
    color: var(--pill-active-text);
}

.nav-pill.active-american-fidelity {
    background-color: #E30620 !important;
    color: white !important;
    border-color: #E30620 !important;
    box-shadow: 0 4px 12px rgba(227, 6, 32, 0.2);
}

.nav-pill.active-bmi {
    background-color: #2E549E !important;
    color: white !important;
    border-color: #2E549E !important;
    box-shadow: 0 4px 12px rgba(46, 84, 158, 0.2);
}

.nav-pill.active-amfirst-life {
    background-color: #122069 !important;
    color: white !important;
    border-color: #122069 !important;
    box-shadow: 0 4px 12px rgba(18, 32, 105, 0.2);
}

.nav-pill.logout-pill {
    background-color: transparent;
    border: 1px solid var(--border-color);
    font-size: 13px;
}

.nav-pill.logout-pill:hover {
    background-color: #ffe4e6;
    border-color: #fecaca;
    color: #ef4444;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.user-avatar:hover {
    opacity: 0.85;
}

/* Profile Dropdown */
.profile-wrapper {
    position: relative;
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 280px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #EEEEEE;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    padding: 20px;
    z-index: 1000;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.profile-dropdown.open {
    display: block;
}

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

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-avatar-large {
    width: 48px;
    height: 48px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.profile-identity {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-fullname {
    font-size: 15px;
    font-weight: 700;
    color: #0a0a0a;
}

.profile-role-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #002969;
    background-color: rgba(0, 41, 105, 0.08);
    padding: 2px 8px;
    border-radius: 20px;
    width: fit-content;
}

.profile-divider {
    height: 1px;
    background-color: #EEEEEE;
    margin: 16px 0;
}

.profile-info-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-info-item > i {
    font-size: 18px;
    color: #888;
    flex-shrink: 0;
}

.profile-info-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.profile-info-label {
    font-size: 11px;
    color: #999;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-info-value {
    font-size: 13px;
    color: #1a1a1a;
    font-weight: 500;
}

.profile-reset-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid #EEEEEE;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-reset-btn:hover {
    background-color: #002969;
    border-color: #002969;
    color: white;
}

.profile-reset-btn:active {
    background-color: #002969;
    border-color: #002969;
    color: white;
}

.profile-reset-btn i {
    font-size: 16px;
}

/* Main Content Wrapper (The White Box) */
.main-content {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-white);
    border-radius: 32px;
    padding: 40px;
    border: 1px solid #EEEEEE;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    opacity: 0; /* Oculto inicialmente hasta que empiece la animación */
    animation: ultraModernReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards; /* 0.8s de retraso */
    backface-visibility: hidden;
}

@keyframes ultraModernReveal {
    0% {
        opacity: 0;
        filter: blur(15px);
        transform: translateY(30px) scale(1.05);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0) scale(1);
    }
}

/* Advanced Row Animation */
.users-table tr {
    opacity: 0;
    animation: rowUltraReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes rowUltraReveal {
    0% {
        opacity: 0;
        filter: blur(4px);
        transform: translateX(15px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateX(0);
    }
}


.content-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.content-header h1.fade-out {
    opacity: 0;
    transform: translateY(-5px);
}

/* Actions Bar */
.actions-bar {
    display: flex;
    justify-content: center; /* Centered Search */
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
    padding: 0 10px;
    opacity: 0;
    animation: ultraModernReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}



.pills-navigation-container {
    display: flex;
    align-items: center;
    gap: 8px; /* Reduced gap */
    width: 320px; /* Compact width for 3 months */
    position: relative;
}

.section-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    white-space: nowrap;
    padding: 6px 2px;
    flex: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
    position: relative; /* Added to fix offset calculations */
}

.section-pills .nav-pill {
    flex: 0 0 calc((100% - 16px) / 3); /* Exactly 3 visible with 8px gaps */
    justify-content: center;
    text-align: center;
    padding: 8px 12px; /* More compact padding */
    font-size: 13px;
}

.section-pills .nav-pill.active-pill {
    background-color: #3476A4 !important;
    color: white !important;
    border-color: #3476A4 !important;
}

.section-pills::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.scroll-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.scroll-arrow:hover {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.scroll-arrow i {
    font-size: 14px;
}

.actions-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.tabs {
    display: flex;
    gap: 12px;
    padding: 4px;
    background-color: transparent;
}

.tab-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--border-radius-pill);
    transition: var(--transition);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    color: var(--text-secondary);
    text-align: center;
    gap: 16px;
    animation: fadeIn 0.5s ease;
}

.empty-state i {
    font-size: 64px;
    opacity: 0.2;
    color: var(--primary-blue);
}

.empty-state p {
    font-size: 16px;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tab-btn.active {
    background-color: var(--bg-white);
    color: var(--text-primary);
    border: 1px solid #EEEEEE;
}

/* Benefits Grid */
.benefits-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 10px;
    animation: fadeInUp 0.5s ease forwards;
}

.benefits-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.benefits-section h2 {
    display: none; /* Removed headers as we now use sub-tabs */
}

.plans-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.plan-card {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.04);
}

.plan-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.plan-icon {
    width: 44px;
    height: 44px;
    background-color: #fef2f2;
    color: #ef4444;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.plan-year {
    font-size: 11px;
    font-weight: 700;
    background-color: #f3f4f6;
    padding: 4px 10px;
    border-radius: 50px;
    color: var(--text-secondary);
}

.plan-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.plan-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f9f9f9;
}

.plan-lang {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 4px;
}


/* Inline Expanded Benefits */
.inline-expanded-benefits {
    grid-column: 1 / -1;
    background-color: var(--bg-white);
    border-radius: 32px;
    padding: 50px;
    margin-top: 10px;
    margin-bottom: 30px;
    border: 1px solid #EEEEEE;
    animation: fadeInExpand 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    position: relative;
    border: none;
}

@keyframes fadeInExpand {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.inline-header {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.inline-header-main {
    flex: 1;
}

.inline-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.1;
}

.inline-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
}

.inline-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #f0f0f0;
    background-color: var(--bg-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.inline-close-btn:hover {
    background-color: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
    transform: rotate(90deg);
}

.benefits-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 50px;
    margin-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 40px;
}

.benefit-group h3 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-blue);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.benefit-items-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
}

.benefit-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    border: none;
}

.benefit-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.benefit-value {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.plan-card.expanded {
    border-color: transparent;
    box-shadow: 0 0 0 2px var(--primary-blue);
    transform: translateY(-5px);
}

.search-and-filters {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper input {
    padding: 12px 20px 12px 44px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    font-size: 14px;
    width: 450px; /* Matched to approximate width of company tabs */
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: #3476a4;
    box-shadow: 0 0 0 3px rgba(52, 118, 164, 0.1);
    width: 480px;
}

.search-input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 18px;
}

.filter-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    flex-shrink: 0;
}

.filter-pill:hover {
    background-color: #3476a4;
    border-color: #3476a4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 118, 164, 0.25);
    color: #ffffff;
}

.filter-pill:hover i {
    color: #ffffff;
}

.filter-pill i {
    font-size: 20px;
    color: var(--text-primary);
}

.primary-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: #002969; /* Matches the Vida pill color for brand consistency */
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.primary-btn:hover {
    background-color: #003a94;
    transform: translateY(-2px);
}

.primary-btn i {
    font-size: 18px;
}

/* --- Export Excel Pill Button --- */
.export-excel-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #1a6b3a;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    height: 40px;
}

.export-excel-btn:hover {
    background-color: #1e8347;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 107, 58, 0.35);
}

.export-excel-btn i {
    font-size: 17px;
}

/* --- Circular Add Button --- */
.create-circle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #002969;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.create-circle-btn:hover {
    background-color: #003a94;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 41, 105, 0.35);
}

.create-circle-btn i {
    font-size: 20px;
}

/* --- Tooltip Wrapper --- */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.btn-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 100;
}

.btn-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1e293b;
}

.tooltip-wrapper:hover .btn-tooltip {
    opacity: 1;
}

/* --- Actions Wrapper (right side of controls bar) --- */
.new-insured-wrapper {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}


.row-editing {
    background-color: rgba(52, 118, 164, 0.05) !important;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 20px;
    animation: fadeInUp 0.5s ease forwards;
}

.tool-card {
    background-color: var(--bg-white);
    padding: 24px;
    border-radius: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-blue);
}

.tool-icon {
    width: 64px;
    height: 64px;
    background-color: #f0f4f8;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary-blue);
    transition: var(--transition);
}

.tool-card:hover .tool-icon {
    background-color: var(--primary-blue);
    color: white;
}

.tool-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.tool-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.tool-arrow {
    margin-left: auto;
    font-size: 20px;
    opacity: 0.2;
    transition: var(--transition);
}

.tool-card:hover .tool-arrow {
    opacity: 1;
    transform: translateX(4px);
}

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

.table-container {
    width: 100%;
    max-height: 420px; 
    overflow-y: auto;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: #e5e5e5 transparent;
    isolation: isolate; /* Create new stacking context */
}

.table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
    background-color: #e5e5e5;
    border-radius: 20px;
}

.users-table {
    width: 100%;
    min-width: 2100px;
    border-collapse: separate; 
    border-spacing: 0;
    text-align: left;
    table-layout: auto;
}

.users-table th:first-child,
.users-table td:first-child {
    min-width: 380px;
    padding-left: 24px;
    padding-right: 32px; 
}

.users-table thead {
    position: sticky;
    top: 0;
    z-index: 9999;
}

.users-table th {
    background-color: #ffffff !important;
    background: #ffffff !important;
    padding: 14px 16px 26px 16px; /* Adjusted to lift titles and add space below */
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color); /* Single clean border */
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    background-clip: padding-box; /* Ensures background doesn't cover border */
    text-align: center; /* Center headers */
}

.users-table th i {
    font-size: 14px;
    margin-right: 6px;
    vertical-align: middle;
    opacity: 0.6;
}

.users-table th:first-child {
    text-align: left; /* Keep name column left-aligned for readability */
}

.users-table td {
    padding: 18px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid #f6f6f6;
    color: var(--text-primary);
    vertical-align: middle;
    transition: background-color 0.2s ease;
    text-align: center; /* Center all data */
    white-space: nowrap; /* Prevent wrapping */
    min-width: 150px; /* Base width for columns */
}

.users-table td:first-child {
    text-align: left; /* Keep name column left-aligned */
}

/* Ensure centering for specific content types */
.users-table .actions-cell,
.users-table .switch {
    margin: 0 auto;
}

.users-table .actions-cell {
    justify-content: center;
}

.users-table td.editable:hover {
    background-color: rgba(46, 84, 158, 0.05);
    cursor: text;
}

.users-table td.editing {
    padding: 0 !important;
}

.users-table td.editing input,
.edit-input {
    width: 100%;
    height: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    background: white;
    text-align: center; /* Center input values */
    text-align-last: center; /* Center select values */
}

.users-table td:first-child .edit-input {
    text-align: left; /* Keep name input left-aligned */
    text-align-last: left;
}

.policy-num {
    font-family: 'Monaco', 'Consolas', monospace;
    font-weight: 700;
    color: var(--primary-blue);
    text-align: center;
    vertical-align: middle;
    position: relative;
}

/* Table Footer Summary Styles */
.users-table tfoot {
    background-color: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.summary-cell {
    padding: 12px 24px;
    font-size: 11px;
    color: var(--text-secondary);
}

.summary-val {
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0.8;
}

.policy-num .policy-text {
    vertical-align: middle;
}

.policy-num .copy-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}
.user-cell {
    display: flex;
    gap: 16px;
    align-items: center;
}

.user-cell i {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #10b981; /* Green for status */
}

input:focus + .slider {
  box-shadow: 0 0 1px #10b981;
}

input:checked + .slider:before {
  -webkit-transform: translateX(16px);
  -ms-transform: translateX(16px);
  transform: translateX(16px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.actions-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    background-color: transparent;
    color: #cbd5e1; /* Faint gray by default */
}

/* Hover effect for the entire row */
.users-table tbody tr {
    transition: background-color 0.2s ease;
}

.users-table tbody tr:hover td {
    background-color: #f8fafc; /* Very pale, almost imperceptible gray */
}

.action-btn i {
    font-size: 18px;
}

.edit-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease;
}

.edit-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(52, 118, 164, 0.1);
}

.action-btn.save:hover {
    background-color: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.action-btn.cancel:hover {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.action-btn.edit:hover,
.action-btn.notes:hover,
.action-btn.receipts:hover {
    background-color: rgba(52, 118, 164, 0.1);
    color: var(--primary-blue);
    border-color: rgba(52, 118, 164, 0.2);
}

.action-btn.delete:hover {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}



.user-name {
    font-weight: 600;
    white-space: nowrap;
}

.dealership-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.role-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.cell-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.approve-btn {
    padding: 6px 16px;
    border-radius: var(--border-radius-pill);
    border: 1px solid var(--text-primary);
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.more-btn {
    background: #f0f0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
}

/* Premium Plan Accordion */
.plan-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.accordion-item {
    background-color: var(--bg-white);
    border-radius: 16px;
    border: 1px solid #EEEEEE;
    overflow: hidden;
    transition: all 0.2s ease;
}

.accordion-item:hover:not(.active) {
    border-color: #DDDDDD;
}

/* No divider needed for flat design */

.accordion-item.active {
    background-color: #ffffff;
    border-color: var(--primary-blue);
}

.accordion-header {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.accordion-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.accordion-plan-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.accordion-plan-meta {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.accordion-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.accordion-content {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 32px;
}

.accordion-item.active .accordion-content {
    max-height: 2000px; /* Arbitrary large value */
    opacity: 1;
    visibility: visible;
    padding-bottom: 40px;
}

.accordion-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    border-top: 1px solid #f0f0f0;
    padding-top: 32px;
}

.accordion-benefit-group h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

.accordion-benefit-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accordion-benefit-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.accordion-benefit-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.accordion-benefit-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.accordion-footer {
    margin-top: 32px;
    display: flex;
    justify-content: flex-end;
}

.accordion-pdf-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #FFFFFF;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
    border: 1px solid #EEEEEE;
}

.accordion-pdf-btn:hover {
    background-color: #2a5f85;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 118, 164, 0.3);
}

/* Condicionados Section */
.condicionados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    width: 100%;
    animation: fadeIn 0.5s ease;
}

.condicionado-card {
    background-color: transparent;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.condicionado-card:hover {
    background-color: #f8f9fa;
    border-color: #e0e0e0;
    transform: translateY(-4px);
}

.condicionado-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: rgba(52, 118, 164, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-blue);
}

.condicionado-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.condicionado-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.condicionado-meta {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.condicionado-download {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 800px;
    border-radius: 32px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}

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

.modal-header h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-modal-btn:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

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

.form-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, 
.form-group select {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(0, 41, 105, 0.05);
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

/* Status Badge Styles */
.status-badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #f1f5f9;
    color: #475569;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    display: inline-block;
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid currentColor;
    animation: sonar-ripple 1.5s ease-out infinite;
    opacity: 0;
}

@keyframes sonar-ripple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.status-pagada {
    background-color: #dcfce7;
    color: #166534;
}

.status-pendiente {
    background-color: #fef9c3;
    color: #854d0e;
}

.status-cancelada {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-fin-de-cobertura,
.status-no-renovada {
    background-color: #f1f5f9;
    color: #475569;
}

.interactive-header {
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: underline dotted transparent;
    text-underline-offset: 4px;
}

.interactive-header:hover {
    color: var(--primary-blue);
    text-decoration-color: var(--primary-blue);
}
.plan-management-content {
    margin-top: 20px;
}

.add-plan-input {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.add-plan-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
}

.plans-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

.plans-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.plans-list li:hover {
    background: #f1f5f9;
}

.delete-plan-btn {
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.delete-plan-btn:hover {
    background: #fee2e2;
}

.plans-list::-webkit-scrollbar {
    width: 4px;
}

.plans-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.columns-checkbox-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.column-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.column-item:hover {
    background: #f1f5f9;
}

.column-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.column-item span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.column-item.active {
    border-color: var(--primary-blue);
    background: #f0f7ff;
}

.empty-month-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 40px;
    text-align: center;
    background: #ffffff;
    border-radius: 20px;
    border: 1px dashed var(--border-color);
    margin: 20px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.empty-icon i {
    font-size: 40px;
    color: var(--text-secondary);
    opacity: 0.5;
}

.empty-month-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-month-state p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 320px;
}

/* Copy Policy Button */
.policy-num {
    position: relative;
}

.policy-num .copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
    vertical-align: middle;
    margin-left: 4px;
}

.policy-num:hover .copy-btn {
    opacity: 1;
}

.policy-num .copy-btn:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

/* Fix policy number centering with copy button */
.policy-num {
    text-align: center;
}

.policy-num {
    display: table-cell;
    vertical-align: middle;
}

.policy-num > span.policy-text,
.policy-num > button.copy-btn {
    display: inline-flex;
    vertical-align: middle;
}

#insured-notes-textarea {
    transition: all 0.3s ease;
}

#insured-notes-textarea:focus {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 0 0 3px rgba(52, 118, 164, 0.1);
}

.agent-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.agent-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3476A4, #2E549E);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(46, 84, 158, 0.2);
}

.status-stats-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    padding: 10px 20px; /* Added horizontal padding */
    position: relative; /* Container for absolute positioned items */
    opacity: 0;
    animation: ultraModernReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
    min-height: 60px;
}

.months-tab-wrapper {
    position: absolute;
    left: 20px; /* Spaced from edge */
    top: 50%;
    transform: translateY(-50%);
}

.status-counters-wrapper {
    display: flex;
    gap: 40px; /* Original gap */
    align-items: center;
}

.new-insured-wrapper {
    position: absolute;
    right: 20px; /* Spaced from edge */
    top: 50%;
    transform: translateY(-50%);
}

.spacer-right {
    display: block;
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    padding-bottom: 8px;
}

.stat-item:hover {
    opacity: 0.7;
}

.stat-item.active {
    opacity: 1;
}

.stat-item.active .stat-label,
.stat-item.active .stat-value {
    color: #3476A4;
}

.stat-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20px;
    height: 2px;
    background: #3476A4;
    border-radius: 2px;
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #666;
}

.stat-value {
    font-size: 26px;
    font-weight: 300;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.stat-amount {
    font-size: 13px;
    font-weight: 500;
    color: #999;
}

.stat-divider {
    width: 1px;
    height: 16px;
    background: #eee;
}

/* --- NEW PREMIUM MINIMALIST MODALS --- */

.modal-overlay {
    background-color: rgba(0, 15, 40, 0.15); /* Very subtle dark overlay */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.4s ease;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 32px;
    box-shadow: none;
    border: 1px solid #EEEEEE;
    padding: 32px;
    width: 90%;
    max-width: 550px;
    animation: modalReveal 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes modalReveal {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    border-bottom: none;
    padding-bottom: 0;
}

.header-main {
    display: flex;
    gap: 20px;
    align-items: center;
}

.modal-icon {
    width: 56px;
    height: 56px;
    background: #f0f4f8;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-blue);
}

.modal-title-group h2 {
    font-size: 22px;
    font-weight: 800;
    color: #001a41;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.modal-subtitle {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

.close-btn:hover {
    background: #001a41;
    color: white;
    transform: rotate(90deg);
}

/* Notes Specific Styling */
#notes-textarea {
    width: 100%;
    min-height: 250px;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 24px;
    font-size: 15px;
    line-height: 1.6;
    color: #1e293b;
    background: #f8fafc;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    font-family: inherit;
}

#notes-textarea:focus {
    background: white;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(52, 118, 164, 0.1);
}

/* Receipts Specific Styling */
.receipts-container {
    padding: 0;
}

.receipt-year-section {
    background: #f8fafc;
    border-radius: 24px;
    padding: 24px;
}

.year-header h3 {
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upload-btn-label {
    padding: 10px 18px;
    background: var(--primary-blue);
    color: white;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-btn-label:hover {
    background: #2a618a;
}

.file-list {
    margin-top: 16px;
    gap: 12px;
}

.file-item {
    background: white;
    border: 1px solid rgba(241, 245, 249, 0.8);
    border-radius: 18px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.file-info i {
    width: 40px;
    height: 40px;
    background: #fff1f2;
    color: #e11d48;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.file-name {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.file-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

.file-action-btn.view:hover {
    background: #eff6ff;
    color: #2563eb;
    border-color: #3b82f6;
}

.file-action-btn.download:hover {
    background: #ecfdf5;
    color: #059669;
    border-color: #10b981;
}

.file-action-btn.delete:hover {
    background: #fff1f2;
    color: #e11d48;
    border-color: #f43f5e;
}

.empty-files {
    background: transparent;
    border: 2px dashed #e2e8f0;
    color: #94a3b8;
    padding: 30px;
}

/* ============================================================
   PENDING DASHBOARD — Vista global de pólizas pendientes
   ============================================================ */
#pending-dashboard {
    display: none;
    margin-top: 16px;
    padding: 0 4px;
    animation: fadeIn 0.25s ease;
}

.pending-dashboard-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    margin-bottom: 16px;
}

.pending-dashboard-header i {
    font-size: 1.6rem;
}

.pending-dashboard-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
    margin: 0;
}

.pending-dashboard-header p {
    font-size: 0.8rem;
    color: #b45309;
    margin: 0;
}

.pending-global-table td {
    vertical-align: middle;
}

/* Urgency chips */
.urgency-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    min-width: 46px;
}

.urgency-critical {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    animation: pulse-urgency 1.5s ease-in-out infinite;
}

.urgency-overdue {
    background: #4c0519;
    color: #fecdd3;
    border: 1px solid #9f1239;
}

.urgency-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.urgency-soon {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.urgency-ok {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #86efac;
}

.urgency-none {
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #cbd5e1;
}

@keyframes pulse-urgency {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

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

.notification-panel-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: backdrop-filter 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                -webkit-backdrop-filter 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.5s ease;
}

.notification-panel-overlay.show {
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ── Notification Panel: High-End Redesign ── */
#notification-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    height: 100%;
    max-height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    transform: translateX(110%); /* Hidden by default */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#notification-panel.open {
    transform: translateX(0); /* Visible when open */
}

/* Scrollbar Style */
#notification-panel::-webkit-scrollbar { width: 6px; }
#notification-panel::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 10px; }
#notification-panel::-webkit-scrollbar-thumb:hover { background: #d0d0d0; }

/* Header: Elegant Blue */
#notification-panel .panel-header {
    background: #3476A4 !important;
    padding: 24px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
}

#notification-panel .panel-title-group {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

#notification-panel .bell-icon-container {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
}

#notification-panel h2 {
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #ffffff !important;
}

#notification-panel .badge-red {
    background: #ff3b30 !important;
    color: #ffffff !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    padding: 2px 8px !important;
    border-radius: 20px !important;
    margin-left: 8px !important;
}

#notification-panel .close-panel-btn {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 1.4rem !important;
    cursor: pointer !important;
    padding: 4px !important;
    line-height: 1 !important;
}

#notification-panel .close-panel-btn:hover { color: #ffffff !important; }

/* Section Labels: Modern & Subtle */
.notif-section-label {
    background: #f4f6f9 !important;
    padding: 10px 20px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    color: #8e95a2 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid #edf0f4 !important;
}

.notif-section-label span.count { color: #5a6474; opacity: 0.7; }

/* Notification List Container */
#notifications-list {
    flex: 1 !important;
    overflow-y: auto !important;
    background: #ffffff !important;
}

/* Cards: Premium & Professional */
.notification-item-card {
    background: #ffffff !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid #f2f4f7 !important;
    border-left: 4px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.notification-item-card:hover {
    background: #f9fbff !important;
    box-shadow: inset 0 0 0 1px rgba(0, 41, 105, 0.05) !important;
}

.notification-item-card[data-status="Cancelada"] { border-left-color: #dc2626 !important; }
.notification-item-card[data-status="Pendiente"] { border-left-color: #f59e0b !important; }

.notif-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
}

.notif-insured-name {
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    color: #1a1d23 !important;
}

.notif-policy-num {
    font-family: 'Courier New', monospace !important;
    font-size: 0.7rem !important;
    color: #94a3b8 !important;
    background: #f8fafc !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    border: 1px solid #f1f5f9 !important;
}

.notif-meta-line {
    font-size: 0.78rem !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.notif-meta-line i { font-size: 0.85rem; color: #cbd5e1; }

.notif-card-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 4px !important;
}

.notif-date {
    font-size: 0.72rem !important;
    color: #94a3b8 !important;
}

.notif-action-text {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #002969 !important;
    opacity: 0 !important;
    transform: translateX(5px) !important;
    transition: all 0.2s ease !important;
}

.notification-item-card:hover .notif-action-text {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* Footer Marker */
.notif-footer-marker {
    text-align: center !important;
    padding: 30px 0 50px !important;
    font-size: 0.7rem !important;
    font-weight: 500 !important;
    color: #cbd5e1 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
}
d: #fcfcfc; }


/* ── Notification Card ── */
.notification-item-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e8eaed;
    border-left: 4px solid #e8eaed;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    /* NO overflow:hidden — it was clipping the content */
}

.notification-item-card[data-status="Cancelada"] { border-left-color: #dc2626; }
.notification-item-card[data-status="Pendiente"] { border-left-color: #f59e0b; }

.notif-accent { display: none; }

.notif-content {
    padding: 14px 16px 12px !important;
    display: block !important;   /* block instead of flex to avoid any flex-collapse */
    min-height: 60px;
}

.notification-item-card:hover {
    border-color: #d0d5de;
    border-left-color: inherit;
    box-shadow: 0 4px 12px rgba(0, 41, 105, 0.08);
    transform: translateY(-1px);
}

.notification-item-card:active { transform: translateY(0); }

/* ── Card Row 1: Name + Status Chip ── */
.notif-row-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.notification-item-name {
    font-weight: 700;
    color: #111111;
    font-size: 0.875rem;
    line-height: 1.3;
    flex: 1;
}

/* ── Card Row 2: Meta info ── */
.notif-row-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.notif-meta-left {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.775rem;
    color: #666666;
}

.notif-meta-left i { font-size: 0.8rem; color: #bbbbbb; }

.notif-policy-num {
    font-size: 0.7rem;
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    border: 1px solid #e8eaed;
    padding: 2px 6px;
    border-radius: 5px;
    color: #777777;
    white-space: nowrap;
}

/* ── Card Row 3: Footer ── */
.notif-row-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid #f2f2f2;
}

.notif-date-info {
    font-size: 0.72rem;
    color: #888888;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notif-date-info i { font-size: 0.75rem; }

.notif-action-hint {
    font-size: 0.72rem;
    color: #3476A4;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.notification-item-card:hover .notif-action-hint { opacity: 1; }


/* ── Urgency / Status Chips ── */
.urgency-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
}

.urgency-overdue  { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.urgency-critical { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.urgency-warning  { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.urgency-soon     { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.urgency-ok       { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.urgency-none     { background: #f9fafb; color: #6b7280; border: 1px solid #e5e7eb; }

/* ── Group Label (Canceladas / Pendientes) ── */
.notif-group-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #999999;
    padding: 14px 4px 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notif-group-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ebebeb;
}

/* ── Empty State ── */
.empty-state-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    text-align: center;
    padding: 40px 28px;
}

.empty-state-illustration {
    width: 72px;
    height: 72px;
    background: #f0f2f5;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 1px solid #e8eaed;
}

.empty-state-illustration i {
    font-size: 2rem;
    color: #c0c5cc;
}

.empty-state-panel h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 6px;
}

.empty-state-panel p {
    color: #888888;
    font-size: 0.82rem;
    line-height: 1.6;
    max-width: 240px;
}


