/* ============================================
   NOTIFICATIONS PAGE - FULLY RESPONSIVE
   ============================================ */

.notifications-page {
    padding: 1rem;
    min-height: calc(100vh - 200px);
    background: var(--ahda-bg, #F3FAFA);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: var(--ahda-teal, #0B4F66);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header h1 i {
    color: var(--ahda-orange, #F57B2C);
    font-size: 1.5rem;
}

.page-header p {
    color: var(--ahda-text-gray, #465256);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.header-actions button,
.header-actions .btn-outline-ahda {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Stats Grid - Responsive */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--ahda-white, #FFFFFF);
    border-radius: 16px;
    padding: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    border: 1px solid rgba(245, 123, 44, 0.1);
}

.stat-card:active {
    transform: scale(0.98);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ahda-ink, #162C32);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--ahda-text-gray, #465256);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Filter Tabs - Horizontal Scroll on Mobile */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    white-space: nowrap;
}

.filter-tabs::-webkit-scrollbar {
    height: 3px;
}

.filter-tabs::-webkit-scrollbar-track {
    background: rgba(11, 79, 102, 0.1);
    border-radius: 10px;
}

.filter-tabs::-webkit-scrollbar-thumb {
    background: var(--ahda-orange, #F57B2C);
    border-radius: 10px;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    color: var(--ahda-text-gray, #465256);
    text-decoration: none;
    border-radius: 40px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.75rem;
    background: var(--ahda-white, #FFFFFF);
    border: 1px solid rgba(245, 123, 44, 0.15);
    white-space: nowrap;
}

.filter-tab i {
    font-size: 0.75rem;
}

.filter-tab:active {
    transform: scale(0.95);
}

.filter-tab.active {
    background: var(--ahda-orange, #F57B2C);
    color: white;
    border-color: transparent;
}

.filter-tab .badge {
    background: rgba(0, 0, 0, 0.15);
    padding: 0.1rem 0.4rem;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
}

.filter-tab.active .badge {
    background: rgba(255, 255, 255, 0.25);
}

/* Notifications Container */
.notifications-container {
    background: var(--ahda-white, #FFFFFF);
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.notifications-list {
    display: flex;
    flex-direction: column;
}

/* Notification Item - Mobile Optimized */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(11, 79, 102, 0.06);
    transition: all 0.2s ease;
    position: relative;
    background: var(--ahda-white, #FFFFFF);
}

.notification-item:active {
    background: rgba(245, 123, 44, 0.03);
}

.notification-item.unread {
    background: linear-gradient(135deg, rgba(245, 123, 44, 0.04), rgba(20, 119, 109, 0.02));
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--ahda-orange, #F57B2C);
    border-radius: 0 2px 2px 0;
}

/* Notification Icon */
.notification-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.notification-header h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ahda-ink, #162C32);
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.notification-time {
    font-size: 0.6rem;
    color: var(--ahda-text-gray, #888);
    display: flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.notification-time i {
    font-size: 0.55rem;
}

.notification-message {
    color: var(--ahda-text-gray, #465256);
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

/* Notification Meta */
.notification-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.notification-type {
    font-size: 0.55rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.type-course {
    background: rgba(20, 119, 109, 0.12);
    color: #14776D;
}

.type-certificate {
    background: rgba(245, 123, 44, 0.12);
    color: #F57B2C;
}

.type-system {
    background: rgba(11, 79, 102, 0.12);
    color: #0B4F66;
}

.type-reminder {
    background: rgba(172, 26, 44, 0.12);
    color: #AC1A2C;
}

.notification-date {
    font-size: 0.55rem;
    color: var(--ahda-text-gray, #888);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.notification-date i {
    font-size: 0.5rem;
}

/* Notification Actions */
.notification-actions {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
    align-self: center;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--ahda-text-gray, #888);
    text-decoration: none;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.03);
}

.action-btn:active {
    transform: scale(0.92);
}

.action-btn i {
    font-size: 0.8rem;
}

.action-btn.mark-read:active {
    background: rgba(20, 119, 109, 0.15);
    color: #14776D;
}

.action-btn.delete:active {
    background: rgba(172, 26, 44, 0.15);
    color: #AC1A2C;
}

.action-btn.view:active {
    background: rgba(245, 123, 44, 0.15);
    color: #F57B2C;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
}

.empty-state i {
    font-size: 3rem;
    color: var(--ahda-text-gray, #999);
    opacity: 0.4;
    margin-bottom: 0.75rem;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--ahda-ink, #162C32);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--ahda-text-gray, #888);
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
}

.empty-state .btn-ahda {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Pagination - Mobile Optimized */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid rgba(11, 79, 102, 0.08);
    flex-wrap: wrap;
}

.page-link {
    padding: 0.35rem 0.7rem;
    background: var(--ahda-bg, #F3FAFA);
    border-radius: 8px;
    color: var(--ahda-text-gray, #465256);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.page-link:active {
    background: var(--ahda-orange, #F57B2C);
    color: white;
    transform: scale(0.95);
}

.page-numbers {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.page-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--ahda-text-gray, #465256);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    background: var(--ahda-bg, #F3FAFA);
}

.page-number:active {
    background: rgba(245, 123, 44, 0.15);
    color: var(--ahda-orange, #F57B2C);
    transform: scale(0.95);
}

.page-number.active {
    background: var(--ahda-orange, #F57B2C);
    color: white;
}

/* ============================================
   TABLET STYLES (600px and up)
   ============================================ */
@media (min-width: 600px) {
    .notifications-page {
        padding: 1.5rem;
    }
    
    .page-header p {
        display: block;
    }
    
    .stats-grid {
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }
    
    .stat-value {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .filter-tab {
        padding: 0.5rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .notification-item {
        padding: 1rem 1.25rem;
    }
    
    .notification-icon {
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
    }
    
    .notification-header h3 {
        font-size: 0.9rem;
    }
    
    .notification-message {
        font-size: 0.8rem;
    }
}

/* ============================================
   DESKTOP STYLES (1024px and up)
   ============================================ */
@media (min-width: 1024px) {
    .notifications-page {
        padding: 2rem 2.5rem;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .stats-grid {
        gap: 1.5rem;
        max-width: 800px;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-icon {
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .filter-tabs {
        overflow-x: visible;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .filter-tab {
        padding: 0.6rem 1.3rem;
        font-size: 0.85rem;
    }
    
    .notification-item {
        padding: 1.25rem 1.5rem;
        gap: 1rem;
    }
    
    .notification-item:hover {
        background: rgba(245, 123, 44, 0.03);
        transform: translateX(4px);
    }
    
    .notification-icon {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
        border-radius: 14px;
    }
    
    .notification-header h3 {
        font-size: 1rem;
    }
    
    .notification-time {
        font-size: 0.7rem;
    }
    
    .notification-message {
        font-size: 0.85rem;
    }
    
    .notification-actions {
        opacity: 0.6;
        transition: opacity 0.2s ease;
    }
    
    .notification-item:hover .notification-actions {
        opacity: 1;
    }
    
    .action-btn {
        width: 34px;
        height: 34px;
    }
    
    .action-btn:hover {
        transform: translateY(-2px);
    }
    
    .action-btn.mark-read:hover {
        background: rgba(20, 119, 109, 0.12);
        color: #14776D;
    }
    
    .action-btn.delete:hover {
        background: rgba(172, 26, 44, 0.12);
        color: #AC1A2C;
    }
    
    .action-btn.view:hover {
        background: rgba(245, 123, 44, 0.12);
        color: #F57B2C;
    }
    
    .page-link:hover {
        background: var(--ahda-orange, #F57B2C);
        color: white;
        transform: translateY(-2px);
    }
    
    .page-number:hover {
        background: rgba(245, 123, 44, 0.1);
        color: var(--ahda-orange, #F57B2C);
        transform: translateY(-2px);
    }
}

/* ============================================
   SMALL MOBILE STYLES (max 480px)
   ============================================ */
@media (max-width: 480px) {
    .notifications-page {
        padding: 0.75rem;
    }
    
    .page-header {
        margin-bottom: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.2rem;
    }
    
    .page-header h1 i {
        font-size: 1.2rem;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .header-actions button,
    .header-actions .btn-outline-ahda {
        font-size: 0.7rem;
        padding: 0.35rem 0.7rem;
    }
    
    .stats-grid {
        gap: 0.6rem;
        margin-bottom: 1rem;
    }
    
    .stat-card {
        padding: 0.7rem;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 10px;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
    
    .filter-tabs {
        margin-bottom: 1rem;
    }
    
    .filter-tab {
        padding: 0.35rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .filter-tab i {
        font-size: 0.7rem;
    }
    
    .notification-item {
        padding: 0.75rem;
        gap: 0.6rem;
    }
    
    .notification-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
        border-radius: 10px;
    }
    
    .notification-header h3 {
        font-size: 0.8rem;
    }
    
    .notification-time {
        font-size: 0.55rem;
    }
    
    .notification-message {
        font-size: 0.7rem;
        margin-bottom: 0.4rem;
    }
    
    .notification-meta {
        gap: 0.4rem;
    }
    
    .notification-type {
        font-size: 0.5rem;
        padding: 0.12rem 0.45rem;
    }
    
    .notification-date {
        font-size: 0.5rem;
    }
    
    .action-btn {
        width: 28px;
        height: 28px;
    }
    
    .action-btn i {
        font-size: 0.7rem;
    }
    
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state i {
        font-size: 2.5rem;
    }
    
    .empty-state h3 {
        font-size: 1rem;
    }
    
    .empty-state p {
        font-size: 0.7rem;
    }
    
    .pagination {
        padding: 0.75rem;
        gap: 0.4rem;
    }
    
    .page-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .page-number {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
}

/* ============================================
   LANDSCAPE MODE ON MOBILE
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .notifications-page {
        padding: 0.75rem 1rem;
    }
    
    .stats-grid {
        gap: 0.75rem;
    }
    
    .notification-item {
        padding: 0.65rem 0.75rem;
    }
    
    .notification-message {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Touch-friendly tap highlights */
.notification-item,
.filter-tab,
.action-btn,
.page-link,
.page-number,
.stat-card {
    -webkit-tap-highlight-color: rgba(245, 123, 44, 0.2);
    cursor: pointer;
}

/* Animation for loading state */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.notification-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Notification Dropdown Styles */
.notif-list {
    max-height: 400px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(139, 0, 0, 0.08);
    cursor: pointer;
    transition: background 0.2s;
}

.notif-item:hover {
    background: rgba(245, 123, 44, 0.05);
}

.notif-item.unread {
    background: rgba(20, 119, 109, 0.05);
}

.notif-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.1), rgba(245, 123, 44, 0.08));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-icon i {
    font-size: 1rem;
    color: #8B0000;
}

.notif-content {
    flex: 1;
}

.notif-title {
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.notif-message {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 3px;
}

.notif-time {
    font-size: 0.6rem;
    color: #999;
}

.notif-time i {
    margin-right: 3px;
    font-size: 0.6rem;
}

.loading-notif, .empty-notif, .error-notif {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.8rem;
}

.loading-notif i, .empty-notif i {
    margin-right: 8px;
    color: #8B0000;
}

.notif-footer {
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid rgba(139, 0, 0, 0.08);
}

.view-all-link {
    font-size: 0.75rem;
    color: #8B0000;
    text-decoration: none;
}

.view-all-link:hover {
    color: #F57B2C;
}