/* Custom Styles for Thao Truong Mang GA */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

main {
    flex: 1;
}

/* Navbar Enhancements */
.navbar-brand {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1.25rem;
}

/* Button Enhancements */
.btn {
    border-radius: 10px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
}

.btn-success {
    background: linear-gradient(135deg, #198754, #157347);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #bb2d3b);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #ffca2c);
}

/* Table Styles */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    color: white;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Badge Styles */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 500;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Dashboard Stats Cards */
.stat-card {
    border-left: 4px solid var(--primary-color);
    background: white;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-left-width: 8px;
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.2;
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 10px;
    border-left: 4px solid;
}

/* Loading Spinner */
.spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    margin-top: auto;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
}

/* Import/Export Section */
.import-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-upload-wrapper input[type=file] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
}

/* Progress Bar */
.progress {
    height: 30px;
    border-radius: 15px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 15px;
    background: linear-gradient(90deg, var(--primary-color), #0a58ca);
    font-weight: 600;
}

/* Project Filter in card headers */
.project-filter-form {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.project-filter-select-wrap {
    position: relative;
    min-width: 240px;
}

.project-filter-icon {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
    color: rgba(13, 110, 253, 0.85);
    pointer-events: none;
}

.project-filter-select {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(3px);
    padding: 0.35rem 2.2rem 0.35rem 2rem;
    min-height: 38px;
    font-weight: 500;
}

.project-filter-select:focus {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.35);
}

.project-filter-btn {
    border-radius: 999px;
    padding: 0.42rem 1rem;
    color: #0a58ca;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.project-filter-btn:hover {
    color: #084298;
    background-color: #fff;
}

@media (max-width: 768px) {
    .project-filter-form {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .project-filter-select-wrap {
        min-width: 210px;
    }
}

/* Compact filters in list headers */
.compact-filter-form {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.compact-filter-select {
    min-width: 170px;
    max-width: 210px;
    min-height: 34px;
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.compact-filter-btn {
    padding: 0.3rem 0.75rem;
    min-height: 34px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.compact-filter-reset {
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.entity-detail-link {
    font-weight: 600;
    text-decoration: none;
}
.entity-detail-link:hover {
    text-decoration: underline;
}
.error-stack {
    white-space: pre-wrap;
    word-break: break-word;
}
