/* apps/hoatdong/static/hoatdong/css/hoatdong.css */

/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* ===== BASE STYLES ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ===== NAVBAR CUSTOMIZATION ===== */
.navbar {
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-size: 1.25rem;
}

.navbar .avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--secondary-color);
}

/* ===== PAGE HEADER ===== */
.page-title {
    color: var(--dark-color);
    font-weight: 600;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: var(--border-radius);
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-2px);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

/* ===== FORMS ===== */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* ===== TABLES ===== */
.table {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    font-weight: 600;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #eee;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* ===== BADGES ===== */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: 20px;
}

/* ===== ACTIVITY STATUS BADGES ===== */
.badge-du-kien {
    background-color: #6c757d;
    color: white;
}

.badge-chuan-bi {
    background-color: #fd7e14;
    color: white;
}

.badge-dang-dien-ra {
    background-color: #198754;
    color: white;
}

.badge-da-ket-thuc {
    background-color: #0dcaf0;
    color: white;
}

.badge-da-huy {
    background-color: #dc3545;
    color: white;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow);
}

.messages-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.messages-container .alert {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== PAGINATION ===== */
.pagination {
    margin-bottom: 0;
}

.page-link {
    border-radius: var(--border-radius);
    margin: 0 3px;
    border: none;
    color: var(--dark-color);
    transition: var(--transition);
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===== BACK TO TOP BUTTON ===== */
#btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: var(--shadow);
    z-index: 1000;
    opacity: 0.9;
    transition: var(--transition);
}

#btn-back-to-top:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/* ===== FOOTER ===== */
footer {
    margin-top: auto;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
    padding-left: 5px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* ===== ACTIVITY CARDS ===== */
.activity-card {
    height: 100%;
}

.activity-card .card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.activity-date {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    display: inline-block;
    font-weight: 500;
}

.activity-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== MODAL ===== */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.25rem solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .navbar-collapse {
        padding: 1rem 0;
    }
    
    .messages-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .form-control, .form-select {
        padding: 0.5rem 0.75rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.shadow-sm {
    box-shadow: var(--shadow) !important;
}

.rounded-lg {
    border-radius: var(--border-radius) !important;
}

.text-underline {
    text-decoration: underline;
}

.hover-lift:hover {
    transform: translateY(-3px);
    transition: var(--transition);
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar, .footer, #btn-back-to-top,
    .btn, .no-print {
        display: none !important;
    }
    
    body {
        background-color: white;
    }
    
    .container {
        width: 100%;
        max-width: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}
/* apps/hoatdong/static/hoatdong/css/hoatdong.css */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    display: none;
}

.dropdown-submenu:hover .dropdown-menu {
    display: block;
}

/* Hoặc dùng Bootstrap 5 class */
.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: -1px;
    border-radius: 0 6px 6px 6px;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}