/* =====================================================
   QUẢN LÝ THI ĐUA KHEN THƯỞNG - CUSTOM STYLES
   ===================================================== */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Dashboard Stats */
.stat-card {
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.success { border-left-color: var(--success-color); }
.stat-card.warning { border-left-color: var(--warning-color); }
.stat-card.danger { border-left-color: var(--danger-color); }
.stat-card.info { border-left-color: var(--info-color); }

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Tables */
.table-container {
    background: #fff;
    border-radius: 0.375rem;
    padding: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    white-space: nowrap;
}

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

/* DataTables customization */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
}

/* Forms */
.form-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.required::after {
    content: " *";
    color: var(--danger-color);
}

/* Select2 */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 38px;
}

/* Buttons */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-group-action {
    white-space: nowrap;
}

/* Alerts */
.alert-suggestion {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

.alert-suggestion .bi {
    color: var(--warning-color);
}

/* Progress Bars */
.progress-thin {
    height: 6px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
}

.timeline-item.success::before { background: var(--success-color); }
.timeline-item.warning::before { background: var(--warning-color); }
.timeline-item.danger::before { background: var(--danger-color); }

/* Badges */
.badge-year {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Analysis Cards */
.analysis-card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.analysis-card .card-header {
    padding: 0.75rem 1rem;
}

.analysis-card .list-group-item {
    border-left: none;
    border-right: none;
}

/* Suggestion Box */
.suggestion-box {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-radius: 0.5rem;
    padding: 1rem;
    border-left: 4px solid var(--warning-color);
}

.suggestion-box h6 {
    color: #664d03;
}

/* Progress Circle */
.progress-circle {
    position: relative;
    width: 80px;
    height: 80px;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-circle .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 1.25rem;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 4rem;
    color: var(--primary-color);
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn, .dataTables_length, .dataTables_filter, .dataTables_paginate, .dataTables_info {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    body {
        background: #fff;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-action {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
}

/* Animation */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Year selector */
.year-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.year-selector .btn {
    min-width: 70px;
}

/* Criteria check list */
.criteria-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.criteria-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.criteria-list li:last-child {
    border-bottom: none;
}

.criteria-list .bi-check-circle-fill {
    color: var(--success-color);
}

.criteria-list .bi-x-circle-fill {
    color: var(--danger-color);
}

.criteria-list .bi-dash-circle {
    color: var(--secondary-color);
}

/* Tooltip custom */
.tooltip-inner {
    max-width: 300px;
    text-align: left;
}
