/* BJS Resume Dashboard - Modern Stylish CSS */

/* ========== Base Styles ========== */
.bjs-resume-dashboard {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Oxygen",
        "Ubuntu", "Cantarell", sans-serif;
    padding: 20px 0;
    position: relative;
}

/* ========== Theme Styles ========== */
.bjs-dashboard-light {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.bjs-dashboard-dark {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.bjs-dashboard-dark .card {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.bjs-dashboard-dark .card-header {
    background-color: #404040 !important;
    color: var(--text-primary) !important;
    border-bottom-color: var(--border-color);
}

.bjs-dashboard-dark .form-control,
.bjs-dashboard-dark .form-select {
    background-color: #3a3a3a;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.bjs-dashboard-dark .form-control:focus,
.bjs-dashboard-dark .form-select:focus {
    background-color: #3a3a3a;
    color: var(--text-primary);
    border-color: #0d6efd;
}

.bjs-dashboard-dark .table {
    color: var(--text-primary);
}

.bjs-dashboard-dark .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

.bjs-dashboard-dark .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.075);
}

/* ========== Header ========== */
.dashboard-header {
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease-out;
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ========== Loading Overlay ========== */
.loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 50px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.bjs-dashboard-dark .loading-overlay {
    background: rgba(42, 42, 42, 0.95);
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ========== Filter Card ========== */
.filter-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.filter-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 15px 25px;
}

.filter-card .card-header h5 {
    font-weight: 600;
}

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

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

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

/* ========== Key Metrics Cards ========== */
.key-metrics {
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    height: 100%;
    min-height: 100px;
    position: relative;
    overflow: visible;
}

.metric-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    z-index: 0;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.metric-card .metric-icon {
    font-size: 2.5rem;
    color: white;
    z-index: 1;
    flex-shrink: 0;
}

.metric-card .metric-content {
    flex: 1;
    z-index: 1;
}

.metric-card .metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: white;
    line-height: 1.2;
    word-break: break-word;
}

.metric-card .metric-label {
    font-size: 0.85rem;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    line-height: 1.3;
}

/* Gradient backgrounds */
.gradient-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.gradient-orange {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.gradient-purple .metric-value,
.gradient-purple .metric-label {
    color: #333;
}

.gradient-purple .metric-icon {
    color: #667eea;
}

/* ========== Chart Cards ========== */
.chart-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out backwards;
    height: 100%;
}

.chart-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.chart-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    padding: 15px 20px;
}

.bjs-dashboard-dark .chart-card .card-header {
    background: linear-gradient(135deg, #404040 0%, #505050 100%);
    border-bottom-color: var(--border-color);
}

.chart-card .card-header h6 {
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.chart-card .card-body {
    padding: 20px;
    position: relative;
    min-height: 300px;
}

.chart-card canvas {
    max-height: 280px !important;
}

/* ========== Buttons ========== */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 25px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #3d4246 100%);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== Animations ========== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Staggered animations for chart cards */
.row .col-lg-4:nth-child(1) .chart-card,
.row .col-lg-6:nth-child(1) .chart-card {
    animation-delay: 0.3s;
}

.row .col-lg-4:nth-child(2) .chart-card,
.row .col-lg-6:nth-child(2) .chart-card {
    animation-delay: 0.4s;
}

.row .col-lg-4:nth-child(3) .chart-card,
.row .col-lg-6:nth-child(3) .chart-card {
    animation-delay: 0.5s;
}

.row .col-lg-4:nth-child(4) .chart-card,
.row .col-lg-6:nth-child(4) .chart-card {
    animation-delay: 0.6s;
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    .dashboard-title {
        font-size: 2rem;
    }

    .dashboard-subtitle {
        font-size: 1rem;
    }

    .metric-card {
        padding: 15px;
        min-height: 90px;
    }

    .metric-card .metric-icon {
        font-size: 2rem;
    }

    .metric-card .metric-value {
        font-size: 1.5rem;
    }

    .metric-card .metric-label {
        font-size: 0.8rem;
    }

    .chart-card .card-body {
        min-height: 250px;
    }

    .chart-card canvas {
        max-height: 220px !important;
    }
}

@media (max-width: 576px) {
    .dashboard-title {
        font-size: 1.5rem;
    }

    .metric-card {
        flex-direction: row;
        text-align: left;
        gap: 10px;
        padding: 12px 15px;
        min-height: 80px;
    }

    .metric-card .metric-icon {
        font-size: 1.75rem;
    }

    .metric-card .metric-value {
        font-size: 1.25rem;
    }

    .metric-card .metric-label {
        font-size: 0.75rem;
    }

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

/* ========== Alert Styles ========== */
.alert {
    border-radius: 12px;
    border: none;
    padding: 15px 20px;
    font-weight: 500;
    animation: fadeInUp 0.6s ease-out;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.bjs-dashboard-dark .alert-info {
    background: linear-gradient(135deg, #1a4d5c 0%, #134851 100%);
    color: #d1ecf1;
}

/* ========== Utility Classes ========== */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shadow-sm {
    box-shadow: var(--card-shadow) !important;
}

/* ========== Scrollbar Styling ========== */
.bjs-resume-dashboard ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.bjs-resume-dashboard ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.bjs-resume-dashboard ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

.bjs-resume-dashboard ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4190 100%);
}

.bjs-dashboard-dark ::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.bjs-dashboard-dark ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ========== Print Styles ========== */
@media print {
    .filter-card,
    .pagination-controls,
    .btn,
    .alert {
        display: none !important;
    }

    .chart-card,
    .metric-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .bjs-resume-dashboard {
        padding: 0;
    }
}
