/* ============================================================== */
/* Cardology Analytics Dashboard Styles */
/* ============================================================== */

.analytics-dashboard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px 0;
}

.analytics-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.analytics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.analytics-card .card-body {
    padding: 25px;
}

.analytics-stat {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.analytics-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.analytics-stat:hover::before {
    transform: translateX(100%);
}

.analytics-stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.analytics-stat p {
    margin: 10px 0 0 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.analytics-chart {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.analytics-chart h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.analytics-chart h4::before {
    content: '';
    width: 4px;
    height: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.quick-stat {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.quick-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.quick-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: white;
}

.quick-stat-icon.primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.quick-stat-icon.success { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.quick-stat-icon.warning { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.quick-stat-icon.info { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

.quick-stat h4 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #333;
}

.quick-stat p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.analytics-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.analytics-table .table {
    margin: 0;
}

.analytics-table .table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    font-weight: 600;
}

.analytics-table .table td {
    padding: 15px;
    border-color: #f0f0f0;
    vertical-align: middle;
}

.analytics-table .table tbody tr:hover {
    background-color: #f8f9fa;
}

.progress-ring {
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.progress-ring circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.progress-ring .background {
    stroke: #f0f0f0;
}

.progress-ring .progress {
    stroke: #667eea;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.5s ease;
}

.analytics-filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.analytics-filters .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.analytics-filters .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.analytics-filters .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.analytics-filters .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.analytics-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #667eea;
}

.analytics-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.analytics-export {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.analytics-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(17, 153, 142, 0.4);
    color: white;
}

.analytics-refresh {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    margin-left: 10px;
}

.analytics-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quick-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

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

    .analytics-stat h3 {
        font-size: 2rem;
    }

    .analytics-filters .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

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

    .analytics-card .card-body {
        padding: 15px;
    }

    .analytics-stat {
        padding: 15px;
    }

    .analytics-stat h3 {
        font-size: 1.8rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .analytics-card {
        background: rgba(30, 30, 30, 0.95);
        color: #fff;
    }

    .analytics-chart,
    .quick-stat,
    .analytics-table,
    .analytics-filters {
        background: #2d2d2d;
        color: #fff;
    }

    .analytics-table .table td {
        border-color: #444;
    }

    .analytics-table .table tbody tr:hover {
        background-color: #3a3a3a;
    }

    .quick-stat h4 {
        color: #fff;
    }

    .quick-stat p {
        color: #ccc;
    }
}

/* Print Styles */
@media print {
    .analytics-dashboard {
        background: white;
    }

    .analytics-card {
        background: white;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .analytics-filters,
    .analytics-export,
    .analytics-refresh {
        display: none;
    }
}
