/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.navbar {
    min-height: 60px;
    padding: 0.5rem 1rem;
}

.navbar-brand {
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 45px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: brightness(1.1);
}

.navbar-brand img:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Ensure navbar content is properly aligned */
.navbar-nav {
    align-items: center;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Navigation Styles */
.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-link i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* User dropdown styles */
.navbar-nav .dropdown-toggle::after {
    margin-left: 0.5rem;
}

/* Dropdown Styles */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.dropdown-header {
    font-weight: 600;
    color: var(--primary-color);
}

/* Footer Styles */
.footer {
    padding: 1rem 0;
    margin-top: auto;
    background-color: var(--light-color) !important;
    border-top: 1px solid #dee2e6;
    flex-shrink: 0;
}

/* Main content wrapper */
.content-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* Utility Classes */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .navbar {
        min-height: 50px;
        padding: 0.25rem 1rem;
    }
    
    .navbar-brand img {
        height: 35px;
        max-width: 150px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.375rem 0.75rem;
        margin: 0.125rem 0;
    }
}

@media (max-width: 768px) {
    .navbar-brand img {
        height: 38px;
        max-width: 180px;
    }
}

@media (max-width: 992px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (min-width: 1200px) {
    .navbar-brand img {
        height: 50px;
        max-width: 250px;
    }
}

/* Card Styles */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.75rem 0.75rem 0 0 !important;
    font-weight: 600;
}

/* Button Styles */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Form Styles */
.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    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);
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Notification Styles */
.notification-dropdown {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.75rem;
    overflow: hidden;
}

.notification-dropdown .dropdown-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.9rem;
    font-weight: 600;
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
}

.notification-item {
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: pointer;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.notification-item.notification-unread {
    background-color: #e3f2fd;
    border-left: 4px solid var(--primary-color);
}

.notification-item.notification-unread:hover {
    background-color: #d1e7fd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.notification-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 0 !important;
}

.notification-link:hover {
    background-color: transparent !important;
    color: inherit !important;
    transform: none !important;
}

.notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    font-size: 1.1rem;
}

.notification-content {
    min-width: 0;
}

.notification-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
}

.notification-time {
    font-size: 0.75rem;
    color: #999;
}

.notification-dot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

/* Delete Notification Button */
.delete-notification-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
    text-decoration: none !important;
    border: none;
    background: none;
    padding: 0 4px !important;
}

.delete-notification-btn:hover {
    color: #dc3545 !important;
    background: none !important;
}

.notification-item:hover .delete-notification-btn {
    opacity: 1;
}

/* Notification Badge */
#notification-badge {
    font-size: 0.6rem;
    min-width: 1.2rem;
    height: 1.2rem;
    line-height: 1.2rem;
    font-weight: 600;
}

/* Bell Animation */
@keyframes bellShake {
    0%, 50%, 100% { 
        transform: rotate(0deg); 
    }
    10%, 30% { 
        transform: rotate(-15deg); 
    }
    20%, 40% { 
        transform: rotate(15deg); 
    }
}

.nav-link:hover .fa-bell {
    animation: bellShake 0.8s ease-in-out;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 300px !important;
        max-width: calc(100vw - 2rem);
        left: auto !important;
        right: 0 !important;
    }
    
    .notification-content {
        min-width: 0;
        flex: 1;
    }
    
    .notification-title {
        font-size: 0.85rem;
    }
    
    .notification-message {
        font-size: 0.75rem;
    }
}

/* Loading spinner in notification */
.notification-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6c757d;
}

/* Empty state */
.notification-empty {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.notification-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}