/* Modern Card Styles */

/* Base Card Container */
.modern-card,
.card-modern {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    min-height: min-content;
}

/* Card Header */
.modern-card-header,
.card-modern-header {
    background: white;
    color: #1e293b;
    padding: 30px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #e2e8f0;
}

.modern-card-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    color: #0f172a;
}

.modern-card-subtitle {
    font-size: 1rem;
    color: #64748b;
    font-weight: 400;
}

/* Card Body */
.modern-card-body,
.card-modern-body {
    background: white;
    padding: 20px;
}


/* Stats Card */
.stats-card-modern {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.stats-card-modern .stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stats-card-modern .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.stats-card-modern .stat-icon {
    font-size: 1.25rem;
    color: #6b7280;
    margin-right: 10px;
}

/* Info Card */
.info-card-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 24px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.info-card-modern h5 {
    font-weight: 600;
    margin-bottom: 8px;
}

.info-card-modern p {
    margin-bottom: 0;
    opacity: 0.95;
}

/* Action Card Footer */
.card-modern-footer {
    background: #f8fafc;
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Card with Icon Header */
.card-icon-header {
    display: flex;
    min-height: min-content;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
}

.card-icon-header .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2010ff 0%, #012869 100%);
    color: white;
    font-size: 1.25rem;
    margin-right: 16px;
    animation: iconBounce 0.8s ease-out;
}

.card-icon-header .title {
    flex: 1;
}

.card-icon-header .title h5 {
    margin: 0;
    font-weight: 600;
    color: #1e293b;
}

.card-icon-header .title small {
    color: #64748b;
}

/* Export Button in Card Header */
.btn-export-csv {
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 6px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-export-csv:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    color: #1e293b;
}

.btn-export-csv:active {
    transform: translateY(0);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-export-csv i {
    font-size: 0.875rem;
}

/* Collapsible Card */
.card-collapsible .card-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
}

.card-collapsible .card-header button {
    width: 100%;
    padding: 16px 20px;
    text-align: left;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #374151;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.card-collapsible .card-header button:hover {
    background: #f8fafc;
}

.card-collapsible .card-header button::after {
    content: '\F285';
    font-family: 'bootstrap-icons';
    transition: transform 0.3s ease;
}

.card-collapsible .card-header button[aria-expanded="true"]::after {
    transform: rotate(90deg);
}

/* Animations */

/* Icon bounce animation for card headers */
@keyframes iconBounce {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(20deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

.swoosh-in {
    animation: swooshIn 0.6s ease-out;
}

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

.delayed-swoosh-1 {
    animation: swooshIn 0.6s ease-out;
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

.delayed-swoosh-2 {
    animation: swooshIn 0.6s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.delayed-swoosh-3 {
    animation: swooshIn 0.6s ease-out;
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

.slide-fade-in {
    animation: slideFadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

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

/* Responsive */
@media (max-width: 768px) {
    .modern-card-header,
    .card-modern-header {
        padding: 16px;
    }

    .modern-card-title {
        font-size: 1.25rem;
    }

    .modern-card-subtitle {
        font-size: 0.875rem;
    }

    .modern-card-body,
    .card-modern-body {
        padding: 12px;
    }

    /* Card icon header mobile adjustments */
    .card-icon-header {
        padding: 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .card-icon-header .icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-right: 12px;
    }

    .card-icon-header .title h5 {
        font-size: 1rem;
    }

    .card-icon-header .title small {
        font-size: 0.8rem;
    }

    /* Card footer mobile adjustments */
    .card-modern-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Stats card mobile */
    .stats-card-modern {
        padding: 16px;
        margin-bottom: 12px;
    }

    .stats-card-modern .stat-value {
        font-size: 1.25rem;
    }

    /* Info card mobile */
    .info-card-modern {
        padding: 16px;
        margin-bottom: 12px;
    }

    /* Export button mobile */
    .btn-export-csv {
        width: 100%;
        justify-content: center;
    }
}