/* RansomFeed Dashboard Styles */

:root {
    --rf-bg-dark: #1a1d29;
    --rf-bg-panel-dark: #252836;
    --rf-text-dark: #ffffff;
    --rf-text-muted-dark: #9ca3af;
    --rf-border-dark: #374151;
    
    --rf-primary: #3b82f6;
    --rf-success: #10b981;
    --rf-warning: #f59e0b;
    --rf-danger: #ef4444;
    --rf-red: #dc2626;
    --rf-yellow: #fbbf24;
    --rf-blue: #3b82f6;
}

/* Container principale */
.ransomfeed-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

.ransomfeed-dashboard.rf-dark {
    background-color: var(--rf-bg-dark);
    color: var(--rf-text-dark);
}

/* Header */
.rf-header {
    margin-bottom: 30px;
}

.rf-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.rf-icon {
    font-size: 32px;
}

.rf-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.rf-subtitle {
    color: var(--rf-text-muted-dark);
    margin: 0;
    font-size: 14px;
}

/* Stats Grid */
.rf-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.rf-stat-card {
    background: var(--rf-bg-panel-dark);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rf-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.rf-stat-italy {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.rf-stat-icon {
    font-size: 48px;
    line-height: 1;
}

.rf-stat-content {
    flex: 1;
}

.rf-stat-label {
    font-size: 12px;
    color: var(--rf-text-muted-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.rf-stat-italy .rf-stat-label {
    color: rgba(255, 255, 255, 0.9);
}

.rf-stat-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.rf-stat-desc {
    font-size: 13px;
    color: var(--rf-text-muted-dark);
}

.rf-stat-italy .rf-stat-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* Tabs */
.rf-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.rf-tab {
    background: var(--rf-bg-panel-dark);
    color: var(--rf-text-muted-dark);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rf-tab:hover {
    background: #2d3142;
}

.rf-tab.active {
    background: var(--rf-primary);
    color: white;
}

/* Content Grid */
.rf-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Panels */
.rf-panel {
    background: var(--rf-bg-panel-dark);
    border-radius: 12px;
    padding: 25px;
}

.rf-chart-panel {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.rf-panel h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rf-badge {
    background: rgba(59, 130, 246, 0.2);
    color: var(--rf-primary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Panel Header */
.rf-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rf-year-badges {
    display: flex;
    gap: 10px;
}

.rf-year-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
}

/* Chart Container */
.rf-chart-container {
    position: relative;
    height: 350px;
}

/* Stats List */
.rf-stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rf-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--rf-border-dark);
}

.rf-stat-item:last-child {
    border-bottom: none;
}

.rf-stat-label {
    font-size: 14px;
    color: var(--rf-text-muted-dark);
}

.rf-stat-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.rf-stat-badge.rf-red {
    background: rgba(239, 68, 68, 0.2);
    color: var(--rf-danger);
}

.rf-stat-badge.rf-yellow {
    background: rgba(251, 191, 36, 0.2);
    color: var(--rf-yellow);
}

.rf-stat-badge.rf-blue {
    background: rgba(59, 130, 246, 0.2);
    color: var(--rf-blue);
}

/* Data Bars */
.rf-data-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.rf-data-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rf-year {
    font-weight: 600;
    min-width: 50px;
}

.rf-bar {
    flex: 1;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    position: relative;
    overflow: hidden;
}

.rf-bar-green {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.rf-bar-red {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.rf-bar-value {
    font-weight: 700;
    color: white;
    z-index: 1;
}

.rf-info-text {
    font-size: 12px;
    color: var(--rf-text-muted-dark);
    margin: 0;
    font-style: italic;
}

/* Events Panel */
.rf-events-panel {
    grid-column: 1 / -1;
}

.rf-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rf-filter-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--rf-border-dark);
    color: var(--rf-text-dark);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
}

.rf-filter-input::placeholder {
    color: var(--rf-text-muted-dark);
}

.rf-btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--rf-border-dark);
    color: var(--rf-text-dark);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.rf-btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Table */
.rf-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.rf-table {
    width: 100%;
    border-collapse: collapse;
}

.rf-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.rf-table th {
    padding: 15px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--rf-text-muted-dark);
}

.rf-table tbody tr {
    border-bottom: 1px solid var(--rf-border-dark);
    transition: background 0.2s;
}

.rf-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.rf-table tbody tr.rf-row-italy {
    background: rgba(59, 130, 246, 0.05);
}

.rf-table td {
    padding: 15px;
    vertical-align: middle;
}

/* Table Cells */
.rf-date {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rf-date-day {
    font-weight: 600;
    font-size: 14px;
}

.rf-date-time {
    font-size: 12px;
    color: var(--rf-text-muted-dark);
}

.rf-group-badge {
    display: inline-block;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rf-victim strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.rf-victim p {
    margin: 0;
    font-size: 13px;
    color: var(--rf-text-muted-dark);
    line-height: 1.5;
}

.rf-country {
    font-size: 14px;
}

.rf-country-unknown {
    color: var(--rf-text-muted-dark);
    font-style: italic;
}

.rf-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.rf-status-active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--rf-success);
}

/* Responsive */
@media (max-width: 1200px) {
    .rf-content-grid {
        grid-template-columns: 1fr;
    }
    
    .rf-chart-panel {
        grid-column: 1;
        grid-row: auto;
    }
}

@media (max-width: 768px) {
    .rf-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .rf-table-container {
        overflow-x: scroll;
    }
    
    .rf-table {
        min-width: 900px;
    }
    
    .rf-filter-actions {
        flex-wrap: wrap;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rf-table tbody tr {
    animation: fadeIn 0.3s ease forwards;
}

.rf-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.rf-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.rf-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.rf-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.rf-table tbody tr:nth-child(5) { animation-delay: 0.25s; }