/* ============================================
   ACCOUNTS V2 - ENHANCED DASHBOARD STYLES
   ============================================ */

/* SECTION STYLING */
.dashboard-section {
    margin-top: 20px;
    margin-bottom: 0;
    background: linear-gradient(145deg, rgba(30, 39, 58, 0.5), rgba(42, 52, 75, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.section-title {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 14px;
    color: #90a4ae;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* ============================================
   1. TREEMAP CONTAINER
   ============================================ */

.treemap-container {
    background: rgba(15, 15, 30, 0.6);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.treemap-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #e0e0e0;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.treemap-wrapper {
    min-height: 400px;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 0;
}

.treemap-item {
    position: relative;
    border-radius: 12px;
    padding: clamp(10px, 2.5vw, 18px);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 130px;
    min-height: 100px;
}

.treemap-item:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.treemap-item-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.treemap-item-name {
    font-weight: 700;
    font-size: clamp(9px, 2vw, 12px);
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    word-break: break-word;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.treemap-item-balance {
    font-size: clamp(13px, 2.8vw, 16px);
    font-weight: 900;
    color: #ff9a3c;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.treemap-item-profit {
    font-size: clamp(8px, 1.8vw, 11px);
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-block;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    width: fit-content;
}

.treemap-item-profit.positive {
    background: rgba(0, 208, 132, 0.3);
    color: #00d084;
}

.treemap-item-profit.negative {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.treemap-item-profit.neutral {
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.treemap-item-profit.burned {
    background: rgba(255, 59, 48, 0.5) !important;
    color: #ffffff !important;
}

.treemap-item-profit.superado {
    background: rgba(52, 168, 224, 0.4) !important;
    color: #ffffff !important;
}

.treemap-item-profit.neutral {
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.treemap-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.1), transparent);
    z-index: 1;
}

/* ============================================
   2. PERFORMANCE GRID
   ============================================ */

.performance-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.perf-filter-btn {
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s;
}

.perf-filter-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.perf-filter-btn.active {
    background: linear-gradient(135deg, #ff9a3c 0%, #ff6b35 100%);
    border-color: #ff9a3c;
    color: #fff;
}

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

.performance-card {
    background: linear-gradient(145deg, rgba(15, 15, 30, 0.8), rgba(30, 39, 58, 0.6));
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 40px 24px 24px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
    position: relative;
    overflow: visible;
}

.performance-card:hover {
    background: linear-gradient(145deg, rgba(15, 15, 30, 0.85), rgba(30, 39, 58, 0.65));
    border: 1.5px solid transparent;
    background-clip: padding-box;
    box-shadow: 
        inset 0 0 0 1.5px transparent,
        0 0 30px rgba(255, 154, 60, 0.3),
        0 12px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
}

.performance-card:hover::after {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: 16px;
    padding: 1.5px;
    background: linear-gradient(90deg, #ff9a3c, #ffd700, #ff6b6b);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.performance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0px;
    background: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.performance-card:hover::before {
    opacity: 1;
}

.perf-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.perf-card-name {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    flex: 1;
}

.perf-card-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.priority-badge {
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
}

.perf-card-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #90a4ae;
    margin-bottom: 12px;
    padding: 8px 0;
}

.perf-card-type {
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(255, 154, 60, 0.2);
    color: #ff9a3c;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: 600;
}

.perf-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.perf-metric {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.perf-metric-label {
    font-size: 11px;
    color: #90a4ae;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.perf-metric-value {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

.perf-metric-value.positive {
    color: #00d084;
}

.perf-metric-value.negative {
    color: #ff6b6b;
}

.perf-metric-value.neutral {
    color: #ffd700;
}

.perf-metric-value.warning {
    color: #ffc107;
}

.perf-metric-value.white-text {
    color: #fff;
}

.perf-progress-bar {
    background: rgba(255, 255, 255, 0.06);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
    position: relative;
}

.perf-progress-bar::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    left: 50%;
    top: 0;
}

.perf-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9a3c, #ffc107);
    transition: width 0.5s ease;
}

.perf-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #90a4ae;
    margin-bottom: 12px;
}

.perf-card-footer {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #90a4ae;
    margin-top: 12px;
    padding: 12px 0;
}

.perf-card-toggle {
    display: flex;
    justify-content: center;
    padding: 8px 0;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.perf-toggle-btn:hover {
    color: #ff9a3c;
    background: rgba(255, 154, 60, 0.1);
    border-radius: 6px;
}

.perf-card-btn:hover {
    border-color: currentColor !important;
    background: rgba(255, 255, 255, 0.05) !important;
    transform: translateY(-2px);
}

.perf-badge {
    background: rgba(66, 135, 245, 0.2);
    color: #4287f5;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* ============================================
   3. BADGES GRID
   ============================================ */

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

.badge-card {
    background: linear-gradient(145deg, rgba(15, 15, 30, 0.8), rgba(30, 39, 58, 0.6));
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.badge-card:hover {
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(255, 215, 0, 0.15);
}

.badge-icon {
    font-size: 56px;
    margin-bottom: 12px;
    display: block;
    transition: transform 0.3s;
}

.badge-card:hover .badge-icon {
    transform: scale(1.15) rotate(5deg);
}

.badge-title {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.badge-description {
    font-size: 12px;
    color: #90a4ae;
    margin-bottom: 12px;
    line-height: 1.4;
}

.badge-value {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, #ff9a3c 0%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-card.locked {
    opacity: 0.5;
    border-color: rgba(255, 255, 255, 0.04);
}

.badge-card.locked .badge-icon {
    filter: grayscale(100%);
}

.badge-locked-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 18px;
    opacity: 0.6;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #90a4ae;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state-hint {
    font-size: 13px;
    color: #78909c;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .dashboard-section {
        padding: 20px;
    }

    .section-title {
        font-size: 22px;
    }

    .performance-grid {
        grid-template-columns: 1fr;
    }

    .badges-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .perf-metrics {
        gap: 8px;
    }

    .evolution-container {
        padding: 16px;
        min-height: 260px;
    }

    #evolutionChart {
        max-height: 260px;
    }

    .evolution-stat-item {
        padding: 14px;
    }
}

/* ============================================
   4. EVOLUTION CHART SECTION
   ============================================ */

.evolution-container {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.35), rgba(15, 23, 42, 0.55));
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(51, 65, 85, 0.5);
    margin-bottom: 24px;
    min-height: 350px;
    position: relative;
}

#evolutionChart {
    max-height: 300px;
}

.evolution-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.evolution-stat-item {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.35), rgba(15, 23, 42, 0.55));
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.evolution-stat-label {
    font-size: 12px;
    color: #90a4ae;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.evolution-stat-value {
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile overrides for Evolution (placed AFTER base rules to avoid being overridden) */
@media (max-width: 768px) {
    .evolution-container {
        padding: 16px;
        min-height: 300px;
    }

    #evolutionChart {
        max-height: 300px;
    }

    .evolution-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .evolution-stat-item {
        padding: 12px;
    }

    .evolution-stat-value {
        font-size: 16px;
    }
}

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

/* ============================================
   5. RISK ALERTS SECTION
   ============================================ */

.risk-alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.risk-alert-card {
    background: linear-gradient(145deg, rgba(15, 15, 30, 0.8), rgba(30, 39, 58, 0.6));
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 14px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.risk-alert-card:hover {
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.15);
    transform: translateY(-2px);
}

.risk-alert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff6b6b, transparent);
}

.risk-alert-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.risk-alert-icon {
    font-size: 28px;
}

.risk-alert-name {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    flex-grow: 1;
}

.risk-alert-severity {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-alert-severity.account-lost {
    background: rgba(128, 0, 0, 0.4);
    color: #ff4444;
}

.risk-alert-severity.critical {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.risk-alert-severity.high {
    background: rgba(255, 165, 0, 0.3);
    color: #ffa500;
}

.risk-alert-severity.medium {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.risk-alert-content {
    display: grid;
    gap: 10px;
}

.risk-alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.risk-alert-item-label {
    color: #90a4ae;
}

.risk-alert-item-value {
    color: #ff6b6b;
    font-weight: 700;
}

.risk-alert-recommendation {
    background: rgba(255, 107, 107, 0.1);
    border-left: 3px solid #ff6b6b;
    padding: 12px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 12px;
    color: #ffb4b4;
    line-height: 1.5;
}

.risk-alerts-empty {
    text-align: center;
    padding: 60px 20px;
    color: #00d084;
}

.risk-alerts-empty-icon {
    font-size: 56px;
    margin-bottom: 12px;
}

.risk-alerts-empty-text {
    font-size: 16px;
    font-weight: 600;
}

.risk-alerts-empty-hint {
    font-size: 12px;
    color: #90a4ae;
    margin-top: 8px;
}

/* ============================================
   MODALES - Ver admin-panel.css y components/modals.css
   ============================================ */

/* Archive Zone */
.archive-zone {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: 200px;
    border: 3px dashed #ff6b6b;
    border-radius: 16px;
    background: rgba(255, 107, 107, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s ease;
}

.archive-zone.archive-mode {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.archive-zone.archive-mode.active {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff3b30;
    box-shadow: 0 0 30px rgba(255, 59, 48, 0.3);
    transform: scale(1.05);
}

.archive-zone.unarchive-mode {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.archive-zone.unarchive-mode.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #059669;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
    transform: scale(1.05);
}

.archive-zone.unarchive-mode .archive-content {
    color: #10b981;
}

.archive-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #ff6b6b;
    pointer-events: none;
}

/* ============================================
   RISK ALERTS PANEL - ESTILO NOTIFICACIONES
   ============================================ */

.risk-alerts-panel {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    max-height: 70vh;
    background: linear-gradient(135deg, rgba(20, 33, 61, 0.98), rgba(25, 40, 75, 0.98));
    border: 1px solid rgba(26, 188, 156, 0.3);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(26, 188, 156, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.risk-alerts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(26, 188, 156, 0.2);
    background: rgba(26, 188, 156, 0.05);
}

.risk-alerts-title {
    font-size: 16px;
    font-weight: 700;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.risk-alerts-count {
    background: linear-gradient(135deg, #ff6b6b, #ff4444);
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.risk-alerts-close {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.risk-alerts-close:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.5);
    transform: scale(1.05);
}

.risk-alerts-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.risk-alerts-container::-webkit-scrollbar {
    width: 6px;
}

.risk-alerts-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.risk-alerts-container::-webkit-scrollbar-thumb {
    background: rgba(26, 188, 156, 0.3);
    border-radius: 3px;
}

.risk-alerts-container::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 188, 156, 0.5);
}

.risk-alert-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 8px;
    padding: 12px;
    position: relative;
    animation: slideInAlert 0.3s ease-out;
    transition: all 0.2s;
}

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

.risk-alert-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 107, 107, 0.4);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.15);
}

.risk-alert-card.account-lost {
    border-color: rgba(255, 68, 68, 0.4);
    background: rgba(255, 68, 68, 0.05);
}

.risk-alert-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.risk-alert-icon {
    font-size: 24px;
}

.risk-alert-info {
    flex: 1;
}

.risk-alert-name {
    font-size: 13px;
    font-weight: 700;
    color: #e0e0e0;
    line-height: 1.3;
}

.risk-alert-severity {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 4px;
}

.risk-alert-severity.account-lost {
    background: rgba(128, 0, 0, 0.4);
    color: #ff4444;
}

.risk-alert-severity.critical {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.risk-alert-severity.high {
    background: rgba(255, 165, 0, 0.3);
    color: #ffa500;
}

.risk-alert-severity.medium {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.risk-alert-close-btn {
    background: rgba(255, 107, 107, 0.1);
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.risk-alert-close-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: scale(1.1);
}

.risk-alert-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 11px;
    margin-top: 8px;
}

.risk-alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.risk-alert-item-label {
    color: #90a4ae;
    font-weight: 600;
}

.risk-alert-item-value {
    color: #e0e0e0;
    font-weight: 700;
}

.risk-alert-recommendation {
    font-size: 11px;
    color: #ff9a3c;
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 154, 60, 0.1);
    border-radius: 4px;
    line-height: 1.4;
    font-weight: 600;
}

/* BOTÓN FLOTANTE FAB */
.risk-alerts-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ff4444);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
    z-index: 999;
    animation: pulse 2s infinite;
    transition: all 0.3s;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(255, 107, 107, 0.6);
    }
}

@keyframes slideOutAlert {
    to {
        opacity: 0;
        transform: translateX(100px);
        max-height: 0;
        margin: 0;
        padding: 0;
    }
}

.risk-alerts-fab:hover {
    transform: scale(1.1);
}

.risk-alerts-fab-icon {
    font-size: 28px;
}

.risk-alerts-fab-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #000;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .risk-alerts-panel {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        max-height: 50vh;
        top: 80px;
    }
    
    .risk-alerts-fab {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }
}

.archive-icon {
    font-size: 48px;
}

.archive-text {
    font-weight: 600;
    font-size: 13px;
    text-align: center;
}

/* ============================================
   SETTINGS MODAL - ENHANCED LAYOUT
   ============================================ */

.modal-content-wide {
    max-width: 900px;
    width: 95%;
}

.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0;
}

.settings-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: #90a4ae;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.settings-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.settings-tab.active {
    color: #fff;
}

.settings-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 100%);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: scaleX(0);
        transform-origin: left;
    }
    to {
        transform: scaleX(1);
        transform-origin: left;
    }
}

.settings-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.settings-tab-content.active {
    display: block;
}

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

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

@media (max-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .modal-content-wide {
        max-width: 95%;
    }
}

/* ============================================
   PAYOUT SECTION
   ============================================ */

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

.payout-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: linear-gradient(145deg, rgba(30, 39, 58, 0.6), rgba(42, 52, 75, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 154, 60, 0.5);
    box-shadow: 0 8px 24px rgba(255, 154, 60, 0.2);
}

.metric-label {
    font-size: 12px;
    color: #90a4ae;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.metric-value {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #ff9a3c, #ff8500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.payout-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.payout-item {
    background: linear-gradient(145deg, rgba(30, 39, 58, 0.5), rgba(42, 52, 75, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.payout-item:hover {
    border-color: rgba(255, 154, 60, 0.3);
    transform: translateX(4px);
}

.payout-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #ff9a3c, #ff8500);
}

.payout-info {
    flex: 1;
}

.payout-amount {
    font-size: 20px;
    font-weight: 700;
    color: #4ade80;
    margin-bottom: 4px;
}

.payout-date {
    font-size: 13px;
    color: #90a4ae;
    display: flex;
    align-items: center;
    gap: 6px;
}

.payout-notes {
    font-size: 12px;
    color: #b0bec5;
    margin-top: 6px;
    font-style: italic;
}

.payout-actions {
    display: flex;
    gap: 8px;
}

.payout-delete-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.payout-delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

/* ============================================
   NOTES SECTION - DAILY JOURNAL NOTES
   ============================================ */

.month-navigator {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(145deg, rgba(30, 39, 58, 0.6), rgba(42, 52, 75, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 16px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: #90a4ae;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 154, 60, 0.1);
    color: #ff9a3c;
}

.current-month {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    min-width: 200px;
    text-align: center;
}

.notes-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.daily-note-item {
    background: linear-gradient(145deg, rgba(30, 39, 58, 0.5), rgba(42, 52, 75, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.daily-note-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

.daily-note-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.note-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.note-day {
    font-size: 12px;
    color: #90a4ae;
    text-transform: capitalize;
    font-weight: 600;
}

.note-day-num {
    font-size: 16px;
    font-weight: 700;
    color: #3b82f6;
    text-transform: capitalize;
}

.note-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.note-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.note-badge.outcome-win {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.note-badge.outcome-loss {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.note-badge.outcome-breakeven {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.note-badge.sentiment {
    background: rgba(255, 154, 60, 0.15);
    border: 1px solid rgba(255, 154, 60, 0.3);
    font-size: 16px;
}

.note-content {
    font-size: 14px;
    color: #e0e0e0;
    line-height: 1.6;
    white-space: pre-wrap;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #90a4ae;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.empty-state small {
    display: block;
    font-size: 13px;
}

/* Scrollbar styling */
.payout-list::-webkit-scrollbar,
.notes-list::-webkit-scrollbar {
    width: 6px;
}

.payout-list::-webkit-scrollbar-track,
.notes-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.payout-list::-webkit-scrollbar-thumb,
.notes-list::-webkit-scrollbar-thumb {
    background: rgba(255, 154, 60, 0.3);
    border-radius: 10px;
}

.payout-list::-webkit-scrollbar-thumb:hover,
.notes-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 154, 60, 0.5);
}
