/* Dashboard and Profile Specific Styles */

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.75rem 1rem;
    margin: 0 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(0, 102, 204, 0.1);
}

.sidebar .nav-link.active {
    color: white;
    background-color: var(--primary-color);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* Notification Badge Styling */
.sidebar .nav-link .badge {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    padding: 0;
    font-size: 0.7rem;
    line-height: 18px;
    border-radius: 50%;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
}

.sidebar .nav-link:hover .badge,
.sidebar .nav-link.active .badge {
    border-color: var(--primary-color);
}

.sidebar .nav-link.active .badge {
    border-color: white;
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
}

/* Main Content Area */
main {
    margin-left: 240px;
    padding-top: 56px;
}

@media (max-width: 768px) {
    .sidebar {
        top: 56px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    main {
        margin-left: 0;
        padding-top: 56px;
    }
}

/* Dashboard Cards */
.dashboard-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;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.dashboard-card:hover {
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.dashboard-card .card-body {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.dashboard-card .display-6 {
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Gradient Card Variants */
.card.bg-primary {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%) !important;
    border: none;
}

.card.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
    border: none;
}

.card.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%) !important;
    border: none;
}

.card.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
    border: none;
    color: #212529 !important;
}

.card.bg-warning .card-title,
.card.bg-warning h4,
.card.bg-warning h6 {
    color: #212529 !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.card.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%) !important;
    border: none;
}

.card.bg-dark {
    background: linear-gradient(135deg, #343a40 0%, #23272b 100%) !important;
    border: none;
}

/* Enhanced text visibility for gradient cards */
.card.bg-primary .card-title,
.card.bg-primary h4,
.card.bg-primary h6,
.card.bg-success .card-title,
.card.bg-success h4,
.card.bg-success h6,
.card.bg-info .card-title,
.card.bg-info h4,
.card.bg-info h6,
.card.bg-danger .card-title,
.card.bg-danger h4,
.card.bg-danger h6,
.card.bg-dark .card-title,
.card.bg-dark h4,
.card.bg-dark h6 {
    color: white !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

/* Dashboard card icons with subtle animation */
.dashboard-card .display-6 {
    transition: transform 0.3s ease;
}

.dashboard-card:hover .display-6 {
    transform: scale(1.05);
}

/* Card hover glow effect */
.dashboard-card:hover {
    box-shadow: 
        0 0.75rem 1.5rem rgba(0, 0, 0, 0.15),
        0 0 20px rgba(0, 102, 204, 0.2);
}

.card.bg-primary.dashboard-card:hover {
    box-shadow: 
        0 0.75rem 1.5rem rgba(0, 0, 0, 0.15),
        0 0 20px rgba(0, 102, 204, 0.4);
}

.card.bg-success.dashboard-card:hover {
    box-shadow: 
        0 0.75rem 1.5rem rgba(0, 0, 0, 0.15),
        0 0 20px rgba(40, 167, 69, 0.4);
}

.card.bg-info.dashboard-card:hover {
    box-shadow: 
        0 0.75rem 1.5rem rgba(0, 0, 0, 0.15),
        0 0 20px rgba(23, 162, 184, 0.4);
}

.card.bg-warning.dashboard-card:hover {
    box-shadow: 
        0 0.75rem 1.5rem rgba(0, 0, 0, 0.15),
        0 0 20px rgba(255, 193, 7, 0.4);
}

/* Enhanced Button Styles */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1c7430 100%);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid #0066cc;
    color: #0066cc;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.btn-outline-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-outline-primary:hover {
    color: white;
    border-color: #0066cc;
}

.btn-outline-primary:hover::after {
    left: 0;
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.btn-outline-secondary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-outline-secondary:hover {
    color: white;
    border-color: #6c757d;
}

.btn-outline-secondary:hover::after {
    left: 0;
}

/* Enhanced Card Styles for Activity and Notifications */
.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;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
    z-index: 1;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.card-body {
    position: relative;
    z-index: 2;
}

/* Activity Items Styling */
.activity-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05) 0%, rgba(0, 102, 204, 0.02) 100%);
    border-radius: 0.5rem;
    border-left: 4px solid #0066cc;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.activity-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 204, 0.1), transparent);
    transition: left 0.5s ease;
}

.activity-item:hover {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.08) 0%, rgba(0, 102, 204, 0.04) 100%);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.1);
}

.activity-item:hover::before {
    left: 100%;
}

.activity-item i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

/* Notification Items Styling */
.notification-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.notification-item.unread {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    border-left: 4px solid #ffc107;
}

.notification-item.read {
    opacity: 0.7;
}

.notification-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.notification-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.notification-item:hover::before {
    left: 100%;
}

.notification-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Application and Resource Cards */
.application-card,
.resource-card,
.event-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.application-card::before,
.resource-card::before,
.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.02) 0%, rgba(0, 102, 204, 0.01) 100%);
    pointer-events: none;
}

.application-card:hover,
.resource-card:hover,
.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 102, 204, 0.2);
}

/* Application Status Badges */
.application-status {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-draft {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
}

.status-under-review {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.status-approved {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.status-rejected {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
    color: white;
}

/* Table Enhancements */
.table {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table thead th {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05) 0%, rgba(0, 102, 204, 0.02) 100%);
    transform: scale(1.01);
}

/* Event Date Styling */
.event-date {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    border-radius: 0.5rem;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2);
}

/* Resource Icons */
.resource-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2);
}

.resource-card {
    display: flex;
    align-items: center;
}

.resource-actions {
    margin-left: auto;
}

/* Quick Actions Enhancement */
.d-grid .btn {
    padding: 0.75rem 1rem;
    font-weight: 500;
}

/* Filter Button Group */
.btn-group .btn {
    position: relative;
    z-index: 1;
}

.btn-group .btn.active {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    border-color: #0066cc;
    color: white;
    z-index: 2;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Content Sections */
.content-section {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Profile Styles */
.profile-avatar {
    position: relative;
    display: inline-block;
}

.profile-avatar i {
    border-radius: 50%;
    background-color: var(--light-bg);
    padding: 1rem;
}

.profile-progress {
    height: 8px;
    border-radius: 4px;
}

/* Activity Timeline */
.activity-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item i {
    width: 20px;
    flex-shrink: 0;
}

/* Application Cards */
.application-card {
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.application-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 102, 204, 0.1);
}

.application-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3cd;
    color: #664d03;
}

.status-under-review {
    background-color: #cff4fc;
    color: #055160;
}

.status-approved {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* Event Cards */
.event-card {
    border-left: 4px solid var(--primary-color);
    background: white;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.2s ease;
}

.event-card:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
}

.event-date {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    text-align: center;
    min-width: 80px;
}

/* Resource Cards */
.resource-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.resource-card:hover {
    border-color: var(--primary-color);
    background-color: var(--light-bg);
}

.resource-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.resource-icon.pdf {
    background-color: #dc3545;
    color: white;
}

.resource-icon.doc {
    background-color: #0d6efd;
    color: white;
}

.resource-icon.video {
    background-color: #198754;
    color: white;
}

.resource-icon.link {
    background-color: #6f42c1;
    color: white;
}

/* Notification Styles */
.notification-item {
    border-left: 4px solid transparent;
    padding: 1rem;
    background: white;
    border-radius: 0 0.5rem 0.5rem 0;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.notification-item.unread {
    border-left-color: var(--primary-color);
    background-color: rgba(0, 102, 204, 0.05);
}

.notification-item.read {
    border-left-color: var(--border-light);
}

.notification-item:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Admin Tables */
.admin-table {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.admin-table th {
    background-color: var(--light-bg);
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.admin-table td {
    border: none;
    border-top: 1px solid var(--border-light);
    padding: 1rem;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background-color: rgba(0, 102, 204, 0.05);
}

/* Profile Tabs */
.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-light);
    font-weight: 500;
    padding: 1rem 1.5rem;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    background: none;
}

/* Profile Progress Bar */
.profile-completeness {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    border-radius: 0.5rem;
    padding: 1rem;
    color: white;
    text-align: center;
}

.progress-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(white 0deg, white var(--progress, 0deg), rgba(255,255,255,0.3) var(--progress, 0deg));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
}

/* Form Enhancements */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-switch .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Quick Actions */
.quick-actions .btn {
    text-align: left;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.quick-actions .btn:hover {
    border-color: var(--primary-color);
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.quick-actions .btn i {
    width: 20px;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.25rem;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

/* Search and Filter */
.search-filter-bar {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.search-input {
    border: 1px solid var(--border-light);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    main {
        margin-left: 0;
    }
    
    .dashboard-stats {
        margin-bottom: 2rem;
    }
    
    .dashboard-stats .col-md-3 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .application-card,
    .event-card,
    .resource-card {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        border-radius: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .dropdown {
        display: none !important;
    }
    
    main {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
}
