/* Premium Ads - Dark Theme CSS */
/* Màu chủ đạo hợp với logo */

:root {
    --primary-color: #2d3436;      /* Dark charcoal - giống logo */
    --primary-dark: #1e2124;       /* Darker version */
    --secondary-color: #636e72;     /* Medium gray */
    --accent-color: #74b9ff;        /* Light blue accent */
    --success-color: #00b894;       /* Green */
    --warning-color: #fdcb6e;       /* Yellow */
    --danger-color: #e17055;        /* Red */
    --info-color: #6c5ce7;          /* Purple */
    --light-gray: #f8f9fa;          /* Background */
    --medium-gray: #e9ecef;         /* Borders */
    --dark-gray: #495057;           /* Text */
    --white: #ffffff;
}

/* Global overrides */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 52, 54, 0.4);
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(45, 52, 54, 0.25);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Navbar */
.navbar-brand {
    color: var(--primary-color) !important;
}

.navbar-dark .navbar-brand {
    color: var(--white) !important;
}

.bg-dark {
    background-color: var(--primary-color) !important;
}

/* Sidebar */
.sidebar {
    background-color: var(--light-gray);
    border-right: 1px solid var(--medium-gray);
}

.sidebar .nav-link {
    color: var(--dark-gray);
    font-weight: 500;
    padding: 12px 20px;
    margin: 2px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: var(--medium-gray);
    color: var(--primary-color);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white) !important;
    box-shadow: 0 4px 8px rgba(45, 52, 54, 0.2);
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
    background-color: var(--white);
    border-bottom: 2px solid var(--medium-gray);
    font-weight: 600;
    color: var(--primary-color);
}

/* Stats Cards */
.stats-card {
    border-left: 4px solid var(--primary-color);
}

.stats-card.border-primary {
    border-left-color: var(--primary-color);
}

.stats-card.border-success {
    border-left-color: var(--success-color);
}

.stats-card.border-warning {
    border-left-color: var(--warning-color);
}

.stats-card.border-info {
    border-left-color: var(--info-color);
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(45, 52, 54, 0.3);
}

/* Feature Cards */
.feature-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

/* Form Controls */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(45, 52, 54, 0.25);
}

.form-control:focus-visible {
    outline: none;
    border-color: var(--primary-color);
}

/* Badges */
.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.badge.bg-success {
    background-color: var(--success-color) !important;
}

.badge.bg-warning {
    background-color: var(--warning-color) !important;
}

.badge.bg-info {
    background-color: var(--info-color) !important;
}

/* Alerts */
.alert-primary {
    color: var(--primary-dark);
    background-color: rgba(45, 52, 54, 0.1);
    border-color: rgba(45, 52, 54, 0.2);
}

/* Table */
.table-dark {
    background-color: var(--primary-color);
    color: var(--white);
}

.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: rgba(45, 52, 54, 0.05);
}

/* Pagination */
.page-link {
    color: var(--primary-color);
}

.page-link:hover {
    color: var(--primary-dark);
    background-color: var(--medium-gray);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Loading and animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive improvements */
@media (max-width: 768px) {
    .sidebar .nav-link {
        padding: 10px 15px;
        margin: 1px 5px;
    }
    
    .welcome-card {
        padding: 20px;
        text-align: center;
    }
    
    .stats-card {
        margin-bottom: 20px;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Text colors */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

/* Link colors */
a {
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-dark);
}

/* Select2 theme updates */
.select2-container--default .select2-selection--single:focus,
.select2-container--default .select2-selection--multiple:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(45, 52, 54, 0.25);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: rgba(45, 52, 54, 0.1) !important;
    color: var(--primary-color) !important;
}

/* Login page specific */
.login-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    box-shadow: 0 5px 15px rgba(45, 52, 54, 0.4);
}

/* Background gradient for login */
.login-gradient {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

/* ===== NOTIFICATION SYSTEM STYLING ===== */

/* Notification bell button */
#notificationDropdown {
    border: none !important;
    box-shadow: none !important;
    transition: color 0.3s ease;
}

#notificationDropdown:hover {
    color: var(--accent-color) !important;
    transform: scale(1.1);
}

#notificationDropdown:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* Notification badge */
#notificationBadge {
    font-size: 0.7rem;
    min-width: 20px;
    height: 18px;
    line-height: 18px;
    padding: 0 4px;
    animation: pulse 2s infinite;
    white-space: nowrap;
    text-align: center;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Notification dropdown menu */
.notification-dropdown {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 8px !important; /* Tạo khoảng cách với header để tránh lẫn viền đen */
    animation: dropdownSlide 0.3s ease-out; /* Hiệu ứng xuất hiện mượt mà */
}

.notification-dropdown .dropdown-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    font-weight: 600;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Notification items */
.notification-item {
    padding: 15px 20px 15px 15px;
    border-bottom: 1px solid var(--medium-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 70px;
    display: block !important;
}

.notification-item:hover {
    background-color: rgba(116, 185, 255, 0.1);
    transform: translateX(5px);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background-color: rgba(116, 185, 255, 0.05);
    border-left: 4px solid var(--accent-color);
}

.notification-item.unread:hover {
    background-color: rgba(116, 185, 255, 0.15);
}

/* Unread indicator dot */
.unread-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: absolute;
    right: 15px;
    top: 20px;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Notification content styling */
.notification-item .fw-bold {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.notification-item .text-muted {
    font-size: 0.8rem;
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.notification-item .text-success {
    color: var(--success-color) !important;
}

.notification-item .text-danger {
    color: var(--danger-color) !important;
}

/* Mark all read button */
#markAllReadBtn {
    font-size: 0.8rem;
    padding: 5px 12px;
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

#markAllReadBtn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--white);
}

/* No notifications state */
#noNotifications {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

#noNotifications i {
    color: var(--medium-gray);
    margin-bottom: 10px;
}

/* Notification flex layout */
.notification-item .d-flex {
    align-items: flex-start;
    gap: 10px;
}

.notification-item .flex-grow-1 {
    flex: 1;
    min-width: 0; /* Important for text wrapping */
    overflow-wrap: break-word;
    word-break: break-word;
}

.notification-item .me-3 {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.unread-indicator {
    flex-shrink: 0;
}

/* Responsive design for notifications */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 350px !important;
        left: -310px !important;
        max-width: 95vw !important;
    }
    
    .notification-item {
        padding: 12px 15px 12px 10px;
        min-height: 65px;
    }
    
    .notification-dropdown .dropdown-header {
        padding: 12px 15px;
    }
    
    .notification-item .fw-bold {
        font-size: 0.85rem;
    }
    
    .notification-item .text-muted {
        font-size: 0.75rem;
    }
}

/* Smooth transitions */
.notification-item * {
    transition: color 0.2s ease;
}

/* Custom scrollbar for notification dropdown */
.notification-dropdown::-webkit-scrollbar {
    width: 6px;
}

.notification-dropdown::-webkit-scrollbar-track {
    background: var(--light-gray);
}

.notification-dropdown::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 3px;
}

.notification-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ===== NOTIFICATION TABS STYLING ===== */

/* Notification tabs container */
.notification-tabs {
    border-bottom: 1px solid #e9ecef;
    margin: 0;
}

.notification-tabs .nav-tabs {
    border: none;
    margin: 0;
}

.notification-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: 0;
    transition: all 0.2s ease;
    position: relative;
}

.notification-tabs .nav-link:hover {
    border: none;
    background-color: #f8f9fa;
    color: #495057;
}

.notification-tabs .nav-link.active {
    color: #495057;
    background-color: transparent;
    border-bottom: 2px solid #007bff;
    font-weight: 500;
}

.notification-tabs .badge {
    font-size: 0.675rem;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: none;
}

.notification-tabs .nav-link.active .badge {
    animation: pulse 1s ease-in-out;
}

/* Tab content styling */
.notification-dropdown .tab-content {
    max-height: 350px;
    overflow-y: auto;
}

.notification-dropdown .tab-pane {
    padding: 0;
}

/* Empty state in tabs */
.notification-dropdown .tab-pane .text-center {
    padding: 2rem 1rem;
}

/* Badge animations for tabs */
@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.1); 
    }
}

/* Dropdown slide animation */
@keyframes dropdownSlide {
    0% { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
} 