/* ===================================
   Nitpicker Persona - Legal News Portal
   Hybrid Layout with Sidebar
   =================================== */

/* Override base template container styles */
main.container-fluid:has(.nitpicker-layout) {
    padding: 0 !important;
    max-width: 100% !important;
}

/* Fallback: Use negative margin to counteract parent padding (only horizontal) */
.nitpicker-layout {
    margin: 0 -0.75rem -1.5rem -0.75rem;
    width: calc(100% + 1.5rem);
}

/* Material Symbols Configuration */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* Primary color override for Nitpicker (legal blue) */
.nitpicker-layout {
    --np-primary: #195de6;
    --np-primary-light: #3b7af0;
    --np-primary-bg: rgba(25, 93, 230, 0.1);
}

/* ===================================
   Main Layout Container
   =================================== */
.nitpicker-layout {
    display: flex;
    min-height: calc(100vh - 120px);
    background-color: var(--ts-bg-body);
    position: relative;
}

/* ===================================
   Sidebar Navigation
   =================================== */
.np-sidebar {
    width: 260px;
    flex-shrink: 0;
    background-color: var(--ts-bg-card);
    border-right: 1px solid var(--ts-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    min-height: 100%;
    transition: width 0.3s ease, margin 0.3s ease;
}

/* Sidebar collapsed state */
.np-sidebar.collapsed {
    width: 0;
    margin-left: -1px;
    overflow: hidden;
}

/* Sidebar toggle button */
.np-sidebar-toggle {
    position: fixed;
    left: 244px;
    top: 140px;
    width: 28px;
    height: 28px;
    background-color: var(--ts-bg-card);
    border: 1px solid var(--ts-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: left 0.3s ease, background-color 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.np-sidebar-toggle:hover {
    background-color: var(--ts-bg-hover);
}

.np-sidebar-toggle .material-symbols-outlined {
    font-size: 16px;
    color: var(--ts-text-muted);
    transition: transform 0.3s ease;
}

/* When sidebar is collapsed, move toggle to the left edge */
.np-sidebar-toggle.sidebar-collapsed {
    left: 8px;
}

.np-sidebar-toggle.sidebar-collapsed .material-symbols-outlined {
    transform: rotate(180deg);
}

.np-sidebar-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Sidebar Brand */
.np-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.np-brand-icon {
    width: 40px;
    height: 40px;
    background-color: var(--np-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.np-brand-icon .material-symbols-outlined {
    font-size: 20px;
}

.np-brand-text h1 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--ts-text);
    line-height: 1.2;
}

.np-brand-text p {
    font-size: 0.75rem;
    color: var(--ts-text-muted);
    margin: 0;
}

/* Sidebar Navigation */
.np-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.np-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    color: var(--ts-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
}

.np-nav-item:hover {
    background-color: var(--ts-bg-hover);
    color: var(--ts-text);
}

.np-nav-item.active {
    background-color: var(--np-primary-bg);
    color: var(--np-primary);
}

.np-nav-item .material-symbols-outlined {
    font-size: 20px;
}

/* Sidebar Section Label */
.np-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ts-text-light);
    padding: 0 0.875rem;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

/* Sidebar Footer */
.np-sidebar-footer {
    margin-top: auto;
    padding: 1.5rem;
    border-top: 1px solid var(--ts-border);
}

.np-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.np-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--ts-border);
    background-size: cover;
    background-position: center;
}

.np-user-details {
    overflow: hidden;
}

.np-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ts-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.np-user-role {
    font-size: 0.75rem;
    color: var(--ts-text-muted);
}

/* ===================================
   Main Content Area
   =================================== */
.np-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-width: 0;
}

/* Content Header */
.np-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ts-border);
}

[data-theme="dark"] .np-header {
    background-color: rgba(30, 30, 30, 0.8);
}

/* Search Box */
.np-search-wrapper {
    flex: 1;
    max-width: 600px;
}

.np-search {
    display: flex;
    align-items: center;
    background-color: var(--ts-bg-hover);
    border-radius: 0.5rem;
    padding: 0 1rem;
    height: 44px;
}

.np-search .material-symbols-outlined {
    color: var(--ts-text-light);
    font-size: 20px;
}

.np-search input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    color: var(--ts-text);
    outline: none;
}

.np-search input::placeholder {
    color: var(--ts-text-light);
}

/* Header Actions */
.np-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.np-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.np-btn-primary {
    background-color: var(--np-primary);
    color: white;
}

.np-btn-primary:hover {
    background-color: var(--np-primary-light);
}

.np-btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    background-color: var(--ts-bg-hover);
    color: var(--ts-text-muted);
    position: relative;
}

.np-btn-icon:hover {
    background-color: var(--ts-border);
    color: var(--ts-text);
}

.np-btn-icon .material-symbols-outlined {
    font-size: 20px;
}

.np-notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: var(--ts-danger);
    border-radius: 50%;
}

/* Content Body */
.np-content {
    padding: 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ===================================
   Hero + Trending Section
   =================================== */
.np-hero-section {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* Hero Article */
.np-hero {
    flex: 2;
}

.np-hero-card {
    display: flex;
    flex-direction: column;
    background-color: var(--ts-bg-card);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--ts-border);
    transition: box-shadow 0.2s ease;
    height: 100%;
}

.np-hero-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.np-hero-image {
    height: 280px;
    background-size: cover;
    background-position: center;
    background-color: var(--ts-border-light);
    position: relative;
}

.np-hero-jurisdiction {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.np-hero-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.np-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.np-category-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background-color: var(--np-primary-bg);
    color: var(--np-primary);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0.25rem;
}

.np-category-badge.regulatory { background-color: var(--np-primary-bg); color: var(--np-primary); }
.np-category-badge.ip { background-color: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.np-category-badge.environmental { background-color: var(--ts-success-bg); color: var(--ts-success); }
.np-category-badge.litigation { background-color: rgba(249, 115, 22, 0.1); color: #f97316; }
.np-category-badge.corporate { background-color: var(--np-primary-bg); color: var(--np-primary); }
.np-category-badge.class-action { background-color: rgba(249, 115, 22, 0.1); color: #f97316; }
.np-category-badge.legislation { background-color: var(--ts-success-bg); color: var(--ts-success); }
.np-category-badge.privacy { background-color: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.np-time-info {
    font-size: 0.75rem;
    color: var(--ts-text-light);
}

.np-hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ts-text);
    margin: 0;
}

.np-hero-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.np-hero-title a:hover {
    color: var(--np-primary);
}

.np-hero-summary {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ts-text-muted);
    margin: 0;
}

.np-hero-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
}

.np-hero-actions {
    display: flex;
    gap: 1rem;
}

.np-action-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--ts-text-light);
    font-size: 0.75rem;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
    padding: 0.5rem 0.625rem;
    min-height: 44px;
}

.np-action-btn:hover {
    color: var(--np-primary);
}

.np-action-btn .material-symbols-outlined {
    font-size: 18px;
}

.np-read-more {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--np-primary);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
}

.np-read-more .material-symbols-outlined {
    font-size: 16px;
}

/* Trending Sidebar */
.np-trending {
    flex: 1;
    min-width: 300px;
}

.np-trending-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ts-text);
    margin-bottom: 1rem;
}

.np-trending-header .material-symbols-outlined {
    color: var(--np-primary);
    font-size: 22px;
}

.np-trending-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.np-trending-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--ts-bg-card);
    border-radius: 0.75rem;
    border: 1px solid var(--ts-border);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    overflow: hidden;
}

.np-trending-item:hover {
    border-color: var(--np-primary);
    transform: translateX(2px);
}

.np-trending-thumb {
    width: 70px;
    height: 70px;
    border-radius: 0.5rem;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.np-trending-jurisdiction {
    position: absolute;
    bottom: 4px;
    left: 4px;
    font-size: 0.55rem;
    font-weight: 700;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.np-trending-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    overflow: hidden;
}

.np-trending-category {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.np-trending-title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ts-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-trending-stats {
    font-size: 0.65rem;
    color: var(--ts-text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.np-trending-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 0.5rem;
    background-color: var(--ts-bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
}

.np-trending-icon .material-symbols-outlined {
    font-size: 24px;
    color: var(--ts-text-light);
}

/* ===================================
   News Grid Section
   =================================== */
.np-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--ts-border);
}

.np-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ts-text);
    margin: 0;
}

.np-view-toggle {
    display: flex;
    gap: 0.25rem;
}

.np-view-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
    background-color: transparent;
    color: var(--ts-text-light);
    transition: all 0.15s ease;
}

.np-view-btn:hover {
    background-color: var(--ts-bg-hover);
}

.np-view-btn.active {
    background-color: var(--ts-bg-hover);
    color: var(--ts-text);
}

.np-view-btn .material-symbols-outlined {
    font-size: 20px;
}

/* News Grid */
.np-news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* News Card */
.np-news-card {
    display: flex;
    flex-direction: column;
    background-color: var(--ts-bg-card);
    border-radius: 0.75rem;
    border: 1px solid var(--ts-border);
    overflow: hidden;
    transition: all 0.2s ease;
}

.np-news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.np-news-card:hover .np-card-title {
    color: var(--np-primary);
}

.np-card-image {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: var(--ts-border-light);
    position: relative;
}

.np-card-jurisdiction {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.55rem;
    font-weight: 700;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.np-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.np-card-category {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.np-card-title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ts-text);
    transition: color 0.15s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-card-title a {
    color: inherit;
    text-decoration: none;
}

.np-card-summary {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--ts-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.np-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.75rem;
}

.np-card-time {
    font-size: 0.625rem;
    color: var(--ts-text-light);
    font-weight: 500;
}

.np-card-actions {
    display: flex;
    gap: 0.5rem;
}

.np-card-action {
    color: var(--ts-text-light);
    cursor: pointer;
    transition: color 0.15s ease;
    background: none;
    border: none;
    padding: 0;
}

.np-card-action:hover {
    color: var(--np-primary);
}

.np-card-action .material-symbols-outlined {
    font-size: 18px;
}

/* ===================================
   Quick Briefs Section
   =================================== */
.np-quick-briefs {
    margin-top: 3rem;
    margin-bottom: 4rem;
}

/* Footer fix for nitpicker layout */
.nitpicker-layout ~ footer.footer,
body:has(.nitpicker-layout) .footer {
    padding: 1.5rem 1rem !important;
    text-align: center;
}

.nitpicker-layout ~ footer.footer .text-muted,
body:has(.nitpicker-layout) .footer .text-muted {
    display: block;
    width: 100%;
    text-align: center;
}

.np-briefs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.np-brief-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background-color: var(--ts-bg-card);
    border-radius: 0.5rem;
    border: 1px solid var(--ts-border);
    text-decoration: none;
    transition: all 0.15s ease;
}

.np-brief-item:hover {
    border-color: var(--np-primary);
    background-color: var(--ts-bg-hover);
}

.np-brief-icon {
    color: var(--np-primary);
    margin-top: 0.125rem;
}

.np-brief-icon .material-symbols-outlined {
    font-size: 22px;
}

.np-brief-content h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ts-text);
    margin: 0 0 0.25rem 0;
}

.np-brief-content p {
    font-size: 0.75rem;
    color: var(--ts-text-muted);
    margin: 0;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1400px) {
    .np-news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .np-hero-section {
        flex-direction: column;
    }

    .np-trending {
        min-width: 100%;
    }

    .np-trending-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .np-trending-item {
        flex: 1;
        min-width: 280px;
    }
}

/* Mobile Filter Bar - hidden by default */
.np-mobile-filters {
    display: none;
}

@media (max-width: 991px) {
    .np-sidebar {
        display: none;
    }

    .np-sidebar-toggle {
        display: none;
    }

    /* Show mobile filter bar when sidebar is hidden */
    .np-mobile-filters {
        display: flex;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        background: var(--ts-bg-card);
        border-bottom: 1px solid var(--ts-border);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .np-mobile-filters::-webkit-scrollbar {
        display: none;
    }

    .np-mobile-filter-btn {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        padding: 0.5rem 0.875rem;
        min-height: 44px;
        background: var(--ts-bg-hover);
        border: 1px solid var(--ts-border);
        border-radius: 20px;
        color: var(--ts-text-muted);
        font-size: 0.8rem;
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.2s;
    }

    .np-mobile-filter-btn .material-symbols-outlined {
        font-size: 1rem;
    }

    .np-mobile-filter-btn:hover {
        background: var(--ts-bg-section);
        color: var(--ts-text);
    }

    .np-mobile-filter-btn.active {
        background: var(--np-primary, #2563eb);
        border-color: var(--np-primary, #2563eb);
        color: white;
    }

    .np-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .np-briefs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .np-content {
        padding: 1rem;
    }

    .np-header {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 768px) {
    .np-news-grid {
        grid-template-columns: 1fr;
    }

    .np-briefs-grid {
        grid-template-columns: 1fr;
    }

    .np-trending-list {
        flex-direction: column;
    }

    .np-trending-item {
        min-width: 0;
    }

    .np-hero-image {
        height: 200px;
    }

    .np-hero-title {
        font-size: 1.25rem;
    }

    .np-header-actions .np-btn-primary span {
        display: none;
    }
}

/* Mobile (576px) */
@media (max-width: 576px) {
    .nitpicker-layout {
        width: 100%;
        margin: 0;
    }

    .np-content {
        padding: 0.75rem;
    }

    .np-header {
        padding: 0.5rem 0.75rem;
    }

    .np-header h1 {
        font-size: 1.125rem;
    }

    .np-search {
        max-width: 100%;
    }

    .np-search-input {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    .np-hero-section {
        gap: 1rem;
    }

    .np-hero-card {
        border-radius: 10px;
    }

    .np-hero-image {
        height: 160px;
    }

    .np-hero-content {
        padding: 0.875rem;
    }

    .np-hero-title {
        font-size: 1.1rem;
        margin-bottom: 0.375rem;
    }

    .np-hero-summary {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .np-hero-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .np-hero-actions {
        gap: 0.375rem;
    }

    .np-action-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }

    .np-read-more {
        font-size: 0.8rem;
    }

    .np-section-title {
        font-size: 1rem;
    }

    .np-trending-item {
        padding: 0.625rem;
        border-radius: 8px;
        min-width: 0;
    }

    .np-trending-thumb {
        width: 60px;
        height: 60px;
    }

    .np-trending-title {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .np-trending-stats {
        font-size: 0.65rem;
    }

    .np-news-grid {
        gap: 0.75rem;
    }

    .np-news-card {
        border-radius: 8px;
    }

    .np-card-image {
        height: 120px;
    }

    .np-card-content {
        padding: 0.75rem;
    }

    .np-card-title {
        font-size: 0.875rem;
    }

    .np-card-summary {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
    }

    .np-card-time {
        font-size: 0.65rem;
    }

    .np-briefs-grid {
        gap: 0.75rem;
    }

    .np-brief-item {
        padding: 0.625rem;
    }

    .np-brief-icon {
        width: 32px;
        height: 32px;
    }

    .np-brief-icon .material-symbols-outlined {
        font-size: 16px;
    }

    .np-brief-content h4 {
        font-size: 0.8rem;
    }

    .np-brief-content p {
        font-size: 0.65rem;
    }

    .np-loading,
    .np-empty {
        padding: 2rem;
    }

    .np-loading .material-symbols-outlined,
    .np-empty .material-symbols-outlined {
        font-size: 36px;
    }
}

/* Small phone (480px) */
@media (max-width: 480px) {
    .np-content {
        padding: 0.5rem;
    }

    .np-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .np-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .np-mobile-filters {
        padding: 0.5rem 0.75rem;
    }

    .np-hero-image {
        height: 130px;
    }

    .np-hero-content {
        padding: 0.75rem;
    }

    .np-hero-title {
        font-size: 1rem;
    }

    .np-hero-summary {
        font-size: 0.75rem;
    }

    .np-hero-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .np-trending-item {
        min-width: 0;
    }

    .np-trending-thumb {
        width: 50px;
        height: 50px;
    }

    .np-news-grid {
        gap: 0.5rem;
    }

    .np-briefs-grid {
        gap: 0.5rem;
    }

    .np-card-image {
        height: 100px;
    }

    .np-card-title {
        font-size: 0.8rem;
    }

    .np-card-summary {
        display: none;
    }
}

/* iPhone (390px) */
@media (max-width: 390px) {
    .np-content {
        padding: 0.375rem;
    }

    .np-header {
        padding: 0.5rem;
    }

    .np-hero-image {
        height: 120px;
    }

    .np-card-image {
        height: 90px;
    }
}

/* ===================================
   Loading States
   =================================== */
.np-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--ts-text-muted);
}

.np-loading .material-symbols-outlined {
    font-size: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty State */
.np-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--ts-text-muted);
    text-align: center;
}

.np-empty .material-symbols-outlined {
    font-size: 48px;
    margin-bottom: 1rem;
}

.np-empty p {
    margin: 0;
}

/* ===================================
   Dark Mode Adjustments
   =================================== */
[data-theme="dark"] .np-sidebar {
    background-color: var(--ts-bg-card);
    border-right-color: var(--ts-border);
}

[data-theme="dark"] .np-hero-card,
[data-theme="dark"] .np-trending-item,
[data-theme="dark"] .np-news-card,
[data-theme="dark"] .np-brief-item {
    background-color: var(--ts-bg-card);
    border-color: var(--ts-border);
}

[data-theme="dark"] .np-search {
    background-color: var(--ts-bg-hover);
}

[data-theme="dark"] .np-btn-icon {
    background-color: var(--ts-bg-hover);
}
