/* Mobile-first dashboard & notes library — load after style.css */

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseSoft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

@keyframes shimmerBar {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fade-in {
    animation: fadeSlideUp 0.45s ease-out both;
}

.notes-library-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.notes-library-header h3 {
    font-size: 1.25rem;
    color: var(--text-main, #fff);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-library-header h3::before {
    content: '';
    width: 4px;
    height: 1.1em;
    background: linear-gradient(180deg, var(--secondary), var(--primary));
    border-radius: 2px;
}

.notes-section-block {
    margin-bottom: 28px;
    animation: fadeSlideUp 0.5s ease-out both;
}

.notes-section-head {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}

.notes-section-head h4 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    color: var(--text-main, #fff);
}

.notes-section-head p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.notes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.note-card {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 100%;
}

.note-icon-pdf {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    margin-top: 10px;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.85rem;
}

.note-subject-line {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.note-type-chip {
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    margin-bottom: 6px;
}

.note-desc {
    font-size: 0.82rem;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.like-btn-locked {
    opacity: 0.65;
    cursor: not-allowed;
}

.note-download-btn {
    flex: 1;
    border: none;
    padding: 8px;
}

/* Pagination */
.pagination-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0 28px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}

.pagination-meta {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.pagination-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.pagination-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pagination-per-page select {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card, #13131c);
    color: inherit;
    min-height: 44px;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    padding: 10px 16px;
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-smooth, 0.25s ease);
}

.pagination-btn:not(.disabled):hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.12);
}

.pagination-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pagination-page-indicator {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0 6px;
}

/* Site brand / logo */
.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.site-brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 12px;
    flex-shrink: 0;
}

.site-brand-fallback {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.site-brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.sidebar-brand-wrap {
    margin-bottom: 28px;
    padding: 4px 0;
}

.navbar-logo.site-brand {
    color: var(--text-main, #fff);
}

.navbar-logo .site-brand-name {
    font-size: 1.25rem;
}

.site-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.header-bar {
    flex-wrap: wrap;
    gap: 12px;
}

.header-bar .search-container {
    order: 3;
    width: 100%;
    max-width: none;
    margin-right: 0 !important;
}

@media (min-width: 640px) {
    .notes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-bar .search-container {
        order: unset;
        width: auto;
        flex: 1;
        max-width: 420px;
    }

    .notes-library-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 900px) {
    .notes-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pagination-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 1200px) {
    .notes-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
