/* LearnLink - Student Resource Management System
   Modern ERP Design System */

:root {
    --ll-primary: #3B7DD8;
    --ll-primary-dark: #2C5F9E;
    --ll-primary-light: #E8F0FC;
    --ll-accent: #E8B84B;
    --ll-accent-dark: #D4A23A;
    --ll-secondary: #64748b;
    --ll-success: #10b981;
    --ll-warning: #E8B84B;
    --ll-danger: #ef4444;
    --ll-info: #5BA4E6;
    --ll-dark: #1e293b;
    --ll-light: #f8fafc;
    --ll-sidebar-width: 260px;
    --ll-sidebar-collapsed-width: 70px;
    --ll-header-height: 48px;
    --ll-border-radius: 0.5rem;
    --ll-transition: all 0.3s ease;
}


/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f1f5f9;
    color: var(--ll-dark);
    margin: 0;
    overflow-x: hidden;
}

/* Sidebar Styles */
.ll-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--ll-sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--ll-dark) 0%, #0f172a 100%);
    color: #fff;
    z-index: 1040;
    transition: var(--ll-transition);
    display: flex;
    flex-direction: column;
}

.ll-sidebar.collapsed {
    width: var(--ll-sidebar-collapsed-width);
}

.ll-sidebar.collapsed .ll-sidebar-brand {
    justify-content: center;
    padding: 1rem 0.5rem;
}

.ll-sidebar-brand {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: var(--ll-header-height);
}

.ll-sidebar-brand .brand-icon {
    width: 56px;
    height: 56px;
    background: transparent;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ll-sidebar-brand .brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ll-sidebar-brand .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    white-space: nowrap;
    transition: var(--ll-transition);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.ll-sidebar.collapsed .brand-icon {
    width: 40px;
    height: 40px;
}

.ll-sidebar.collapsed .brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Sidebar School Badge */
.ll-sidebar-school-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #93c5fd;
    background: rgba(59, 125, 216, 0.15);
    border: 1px solid rgba(59, 125, 216, 0.25);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.02em;
    transition: var(--ll-transition);
}

.ll-sidebar.collapsed .ll-sidebar-school-badge {
    font-size: 0;
    padding: 0.35rem;
}

.ll-sidebar.collapsed .ll-sidebar-school-badge i {
    font-size: 0.85rem;
    margin: 0 !important;
}

.ll-sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.ll-nav-section {
    padding: 0 0.75rem;
    margin-bottom: 1rem;
}

.ll-nav-section-title {
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
}

.ll-sidebar.collapsed .ll-nav-section-title {
    text-align: center;
    font-size: 0;
}

.ll-sidebar.collapsed .ll-nav-section-title::after {
    content: '•••';
    font-size: 0.5rem;
}

.ll-nav-item {
    margin-bottom: 0.25rem;
}

.ll-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: #ffffff !important;
    font-weight: bold;
    text-decoration: none;
    border-radius: var(--ll-border-radius);
    transition: var(--ll-transition);
    white-space: nowrap;
}

.ll-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.ll-nav-link.active {
    background: var(--ll-accent);
    color: #1e293b !important;
    font-weight: 600;
}

.ll-nav-link i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.ll-nav-link .nav-text {
    transition: var(--ll-transition);
}

.ll-sidebar.collapsed .ll-nav-link .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.ll-nav-link .badge {
    margin-left: auto;
}

.ll-sidebar.collapsed .ll-nav-link .badge {
    display: none;
}

/* User Profile in Sidebar */
.ll-sidebar-user {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ll-sidebar-user .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ll-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.ll-sidebar-user .user-info {
    flex: 1;
    min-width: 0;
}

.ll-sidebar.collapsed .ll-sidebar-user .user-info {
    display: none;
}

.ll-sidebar-user .user-name {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ll-sidebar-user .user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Main Content Area */
.ll-main {
    margin-left: var(--ll-sidebar-width);
    min-height: 100vh;
    transition: var(--ll-transition);
}

.ll-sidebar.collapsed~.ll-main {
    margin-left: var(--ll-sidebar-collapsed-width);
}

/* Header */
.ll-header {
    height: var(--ll-header-height);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.ll-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.ll-sidebar-toggle {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--ll-border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ll-transition);
}

.ll-sidebar-toggle:hover {
    background: var(--ll-light);
}

.ll-search-box {
    position: relative;
    width: 100%;
    max-width: 800px;
}

.ll-search-box input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    background: var(--ll-light);
    transition: var(--ll-transition);
}

.ll-search-box input:focus {
    outline: none;
    border-color: var(--ll-primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--ll-primary-light);
}

.ll-search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ll-secondary);
}

.ll-header-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ll-header-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--ll-transition);
    color: var(--ll-secondary);
}

.ll-header-btn:hover {
    background: var(--ll-light);
    color: var(--ll-dark);
}

.ll-header-btn .notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--ll-danger);
    color: #fff;
    border-radius: 50%;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.ll-user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    background: #fff;
    cursor: pointer;
    transition: var(--ll-transition);
}

.ll-user-dropdown:hover {
    border-color: var(--ll-primary);
}

.ll-user-dropdown .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ll-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Content Area */
.ll-content {
    padding: 1.5rem;
}

/* Page Header */
.ll-page-header {
    margin-bottom: 1.5rem;
}

.ll-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ll-dark);
    margin-bottom: 0.25rem;
}

.ll-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--ll-secondary);
}

.ll-breadcrumb a {
    color: var(--ll-primary);
    text-decoration: none;
}

.ll-breadcrumb a:hover {
    text-decoration: underline;
}

/* Cards */
.ll-card {
    background: #fff;
    border-radius: var(--ll-border-radius);
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: var(--ll-transition);
}

.ll-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ll-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ll-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.ll-card-body {
    padding: 1.25rem;
}

/* Stat Cards */
.ll-stat-card {
    background: #fff;
    border-radius: var(--ll-border-radius);
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--ll-transition);
}

.ll-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.ll-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ll-stat-icon.primary {
    background: var(--ll-primary-light);
    color: var(--ll-primary);
}

.ll-stat-icon.success {
    background: #d1fae5;
    color: var(--ll-success);
}

.ll-stat-icon.warning {
    background: #fef3c7;
    color: var(--ll-warning);
}

.ll-stat-icon.info {
    background: #cffafe;
    color: var(--ll-info);
}

.ll-stat-content {
    flex: 1;
}

.ll-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ll-dark);
    line-height: 1.2;
}

.ll-stat-label {
    font-size: 0.875rem;
    color: var(--ll-secondary);
    margin-top: 0.25rem;
}

.ll-stat-change {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ll-stat-change.positive {
    color: var(--ll-success);
}

.ll-stat-change.negative {
    color: var(--ll-danger);
}

.ll-stat-change.neutral {
    color: var(--ll-secondary);
}

/* Resource Cards (moved to bottom) */

.ll-resource-type {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ll-resource-content {
    padding: 1rem;
}

.ll-resource-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ll-resource-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--ll-secondary);
    margin-bottom: 0.75rem;
}

.ll-resource-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ll-resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.ll-tag {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--ll-secondary);
}

/* Activity Feed */
.ll-activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.ll-activity-item:last-child {
    border-bottom: none;
}

.ll-activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ll-primary-light);
    color: var(--ll-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.ll-activity-content {
    flex: 1;
}

.ll-activity-text {
    font-size: 0.875rem;
    line-height: 1.5;
}

.ll-activity-text strong {
    font-weight: 600;
}

.ll-activity-time {
    font-size: 0.75rem;
    color: var(--ll-secondary);
    margin-top: 0.25rem;
}

/* Tables */
.ll-table {
    width: 100%;
    border-collapse: collapse;
}

.ll-table th {
    text-align: left;
    padding: 0.875rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ll-secondary);
    background: var(--ll-light);
    border-bottom: 1px solid #e2e8f0;
}

.ll-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
}

.ll-table tr:hover td {
    background: #f8fafc;
}

.ll-table-detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ll-table-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ll-table-detail-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ll-secondary);
}

.ll-table-detail-value {
    font-size: 0.875rem;
    color: var(--ll-dark);
    word-break: break-word;
}

/* Buttons */
.ll-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--ll-border-radius);
    border: none;
    cursor: pointer;
    transition: var(--ll-transition);
    text-decoration: none;
}

.ll-btn-primary {
    background: var(--ll-primary);
    color: #fff;
}

.ll-btn-primary:hover {
    background: var(--ll-primary-dark);
    color: #fff;
}

.ll-btn-outline {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: var(--ll-dark);
}

.ll-btn-outline:hover {
    border-color: var(--ll-primary);
    color: var(--ll-primary);
}

.ll-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.ll-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
}

/* Status Badges */
.ll-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 50px;
    background: transparent;
    border: 1px solid currentColor;
}

.ll-badge-success {
    color: #059669;
}

.ll-badge-warning {
    color: #d97706;
}

.ll-badge-danger {
    color: #dc2626;
}

.ll-badge-info {
    color: #2563eb;
}

/* Discussion Cards */
.ll-discussion-card {
    background: #fff;
    border-radius: var(--ll-border-radius);
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: var(--ll-transition);
}

.ll-discussion-card:hover {
    border-color: var(--ll-primary);
}

.ll-discussion-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ll-discussion-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ll-primary), var(--ll-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.ll-discussion-info {
    flex: 1;
}

.ll-discussion-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--ll-dark);
}

.ll-discussion-title:hover {
    color: var(--ll-primary);
}

.ll-discussion-meta {
    font-size: 0.8125rem;
    color: var(--ll-secondary);
}

.ll-discussion-excerpt {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.ll-discussion-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.8125rem;
    color: var(--ll-secondary);
}

.ll-discussion-stats span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ===== Facebook-style Knowledge Portal ===== */
.fb-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e4e6eb;
    overflow: hidden;
}
.fb-card-body {
    padding: 1rem 1.25rem;
}

/* Avatars */
.fb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ll-primary), var(--ll-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.fb-avatar-lg {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ll-primary), var(--ll-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}
.fb-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ll-primary), var(--ll-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* Create Post Box */
.fb-create-post-input {
    flex: 1;
    padding: 0.625rem 1rem;
    border-radius: 20px;
    border: none;
    background: #f0f2f5;
    color: #65676b;
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}
.fb-create-post-input:hover {
    background: #e4e6eb;
}
.fb-create-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    border-radius: 8px;
    color: #65676b;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.fb-create-action:hover {
    background: #f0f2f5;
}

/* Filter Pills */
.fb-filter-pill {
    padding: 0.375rem 1rem;
    border-radius: 20px;
    border: none;
    background: #e4e6eb;
    color: #65676b;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.fb-filter-pill:hover {
    background: #d8dadf;
}
.fb-filter-pill.active {
    background: #e7f0ff;
    color: #1877f2;
}

/* Post Card */
.fb-post-card {
    transition: none;
}
.fb-post-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #1c1e21;
    word-wrap: break-word;
}
.fb-post-content p:last-child {
    margin-bottom: 0;
}

/* Tags */
.fb-tag {
    color: #1877f2;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
}
.fb-tag:hover {
    text-decoration: underline;
}

/* Engagement Summary */
.fb-likes-summary {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.fb-like-icon-sm {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
}

/* Action Bar Buttons */
.fb-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    border: none;
    background: none;
    border-radius: 8px;
    color: #65676b;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    flex: 1;
    justify-content: center;
}
.fb-action-btn:hover {
    background: #f0f2f5;
}
.fb-action-btn.active {
    color: #e74c3c;
}

/* Comment Bubbles */
.fb-comment-bubble {
    background: #f0f2f5;
    border-radius: 18px;
    padding: 0.5rem 0.75rem;
    display: inline-block;
    max-width: 100%;
    word-wrap: break-word;
}
.fb-comment-bubble p {
    margin: 0;
    display: inline;
}

/* Comment Actions (Like, Reply, etc) */
.fb-comment-action {
    font-size: 0.75rem;
    font-weight: 700;
    color: #65676b;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.fb-comment-action:hover {
    text-decoration: underline;
}
.fb-comment-action.active {
    color: #e74c3c;
}
.fb-comment-likes {
    font-size: 0.75rem;
    color: #e74c3c;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Best Answer */
.fb-comment-best {
    border-left: 3px solid #22c55e;
    padding-left: 0.5rem;
}
.fb-best-answer-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #22c55e;
}

/* Quick Comment Input */
.fb-quick-comment-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.fb-quick-comment {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border-radius: 20px;
    border: none;
    background: #f0f2f5;
    font-size: 0.85rem;
    outline: none;
    transition: background 0.2s;
}
.fb-quick-comment:focus {
    background: #fff;
    box-shadow: 0 0 0 1px #1877f2;
}
.fb-quick-comment-send {
    position: absolute;
    right: 0.5rem;
    border: none;
    background: none;
    color: #1877f2;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.fb-quick-comment-send:hover {
    opacity: 1;
}

/* Sidebar */
.fb-sidebar-sticky {
    position: sticky;
    top: 80px;
}
.fb-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: #1c1e21;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.2s;
    border-radius: 8px;
    margin: 2px 4px;
}
.fb-nav-item:hover {
    background: #f0f2f5;
    color: #1c1e21;
}
.fb-nav-item.active {
    background: #e7f0ff;
    color: #1877f2;
}
.fb-nav-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* Trending Tags */
.fb-trending-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f0f2f5;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #1877f2;
    font-weight: 500;
    cursor: pointer;
}
.fb-trending-tag:hover {
    background: #e7f0ff;
}

/* Type Pills (Modal) */
.fb-type-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #e4e6eb;
    background: #fff;
    color: #65676b;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.fb-type-pill:hover {
    border-color: #1877f2;
    color: #1877f2;
}
.fb-type-pill.active {
    background: #e7f0ff;
    border-color: #1877f2;
    color: #1877f2;
}

/* Tag Suggestions (Modal) */
.fb-tag-suggest {
    border: none;
    background: none;
    color: #1877f2;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.125rem 0.25rem;
}
.fb-tag-suggest:hover {
    text-decoration: underline;
}

/* Load More */
.fb-load-more-btn {
    padding: 0.5rem 2rem;
    border-radius: 8px;
    border: 1px solid #e4e6eb;
    background: #fff;
    color: #1877f2;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}
.fb-load-more-btn:hover {
    background: #f0f2f5;
}

/* Reply Editor */
.fb-reply-editor {
    min-height: 80px;
    border-radius: 8px;
}
.fb-reply-editor .ql-toolbar {
    border-radius: 8px 8px 0 0;
    border-color: #e4e6eb;
}
.fb-reply-editor .ql-container {
    border-radius: 0 0 8px 8px;
    border-color: #e4e6eb;
}

/* Comments Preview */
.fb-comments-preview {
    background: #fafbfc;
}

/* Quick Actions */
.ll-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--ll-border-radius);
    text-decoration: none;
    color: var(--ll-dark);
    transition: var(--ll-transition);
}

.ll-quick-action:hover {
    border-color: var(--ll-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    color: var(--ll-dark);
}

.ll-quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.ll-quick-action-icon.primary {
    background: var(--ll-primary-light);
    color: var(--ll-primary);
}

.ll-quick-action-icon.success {
    background: #d1fae5;
    color: var(--ll-success);
}

.ll-quick-action-icon.warning {
    background: #fef3c7;
    color: var(--ll-warning);
}

.ll-quick-action-icon.info {
    background: #cffafe;
    color: var(--ll-info);
}

.ll-quick-action-label {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Progress */
.ll-progress {
    height: 8px;
    background: #e2e8f0;
    border-radius: 50px;
    overflow: hidden;
}

.ll-progress-bar {
    height: 100%;
    border-radius: 50px;
    transition: width 0.6s ease;
}

.ll-progress-bar.primary {
    background: var(--ll-primary);
}

.ll-progress-bar.success {
    background: var(--ll-success);
}

/* Charts placeholder */
.ll-chart-placeholder {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: var(--ll-border-radius);
    color: var(--ll-secondary);
}

/* Empty State */
.ll-empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
}


/* Ensure icons and badges stay above the image */
.ll-repo-card-thumb i, .ll-resource-thumbnail i {
    z-index: 1;
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.ll-repo-card-format, .ll-resource-type {
    z-index: 2;
}

.ll-empty-state-icon {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.ll-empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ll-empty-state-text {
    color: var(--ll-secondary);
    margin-bottom: 1.5rem;
}

/* Responsive */

/* Sidebar overlay backdrop */
.ll-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ll-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 991.98px) {
    .ll-sidebar {
        transform: translateX(-100%);
        width: var(--ll-sidebar-width);
        box-shadow: none;
    }

    .ll-sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    }

    /* Collapsed sidebar should also be hidden on mobile */
    .ll-sidebar.collapsed {
        transform: translateX(-100%);
        width: var(--ll-sidebar-width);
    }

    .ll-sidebar.collapsed.show {
        transform: translateX(0);
        width: var(--ll-sidebar-width);
    }

    .ll-sidebar.collapsed.show .ll-sidebar-brand {
        justify-content: flex-start;
        padding: 1rem 1.25rem;
    }

    /* Reset collapsed overrides on mobile when shown */
    .ll-sidebar.collapsed.show .brand-text,
    .ll-sidebar.collapsed.show .ll-nav-link .nav-text,
    .ll-sidebar.collapsed.show .ll-sidebar-user .user-info {
        opacity: 1;
        width: auto;
        overflow: visible;
        display: block;
    }

    .ll-sidebar.collapsed.show .ll-nav-section-title {
        font-size: 0.7rem;
    }

    .ll-sidebar.collapsed.show .ll-nav-section-title::after {
        content: none;
    }

    .ll-sidebar.collapsed.show .ll-nav-link .badge {
        display: inline-flex;
    }

    .ll-main {
        margin-left: 0 !important;
        overflow-x: hidden;
    }

    .ll-search-box {
        display: flex;
        max-width: none;
    }

    .ll-search-box input {
        font-size: 0.8125rem;
        padding: 0.4rem 0.75rem 0.4rem 2.25rem;
    }

    .ll-header-right .dropdown-toggle {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .ll-content {
        padding: 0.75rem;
    }

    .ll-stat-card {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
        padding: 0.75rem;
        gap: 0.5rem;
        border-radius: 0.75rem;
    }

    .ll-stat-value {
        font-size: 1.25rem;
    }

    .ll-stat-icon {
        width: 42px;
        height: 42px;
        border-radius: 10px;
        font-size: 1.1rem;
    }

    .ll-card,
    .ll-resource-card,
    .ll-discussion-card,
    .ll-quick-action {
        border-radius: 0.75rem;
    }

    /* Hide table on mobile, show mobile card list instead */
    .ll-table-responsive,
    .table-responsive {
        display: none !important;
    }

    .ll-mobile-card-list {
        display: block !important;
    }

    /* Card adjustments */
    .ll-card {
        border-radius: 0.375rem;
    }

    .ll-card-body {
        padding: 0.875rem;
    }

    .ll-card-header {
        padding: 0.75rem 0.875rem;
    }

    /* Resource cards grid */
    .ll-resource-card .ll-resource-content {
        padding: 0.75rem;
    }

    .ll-resource-thumbnail {
        height: 110px;
    }

    /* Discussion cards */
    .ll-discussion-card {
        padding: 1rem;
    }

    .ll-discussion-header {
        gap: 0.75rem;
    }

    .ll-discussion-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .ll-discussion-stats {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    /* Quick actions */
    .ll-quick-action {
        padding: 1rem 0.75rem;
    }

    .ll-quick-action-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    /* Page header */
    .ll-page-title {
        font-size: 1.25rem;
    }

    .ll-breadcrumb {
        font-size: 0.8125rem;
    }

    /* Activity items */
    .ll-activity-item {
        flex-direction: row;
        gap: 0.75rem;
    }

    .ll-activity-avatar {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }

    /* Recommendation cards */
    .ll-recommendation-card {
        flex-direction: row;
        gap: 0.75rem;
    }

    .ll-recommendation-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    /* Buttons */
    .ll-btn {
        font-size: 0.8125rem;
        padding: 0.5rem 1rem;
    }

    /* Progress */
    .ll-progress {
        height: 6px;
    }

    /* Forms */
    .ll-form-control {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 575.98px) {
    #repoFilters .ll-card-body {
        padding: 0.75rem;
    }

    #repoFilters .row {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }

    #repoFilters .ll-form-control {
        font-size: 0.8125rem;
        padding: 0.45rem 0.65rem;
    }

    #repoFilters .ll-btn {
        padding: 0.45rem 0.75rem;
    }

    #categoryFilters {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    #categoryFilters .ll-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Mobile card list (hidden on desktop, shown on mobile) */
.ll-mobile-card-list {
    display: none;
}

@media (min-width: 768px) {
    .ll-best-practices .ll-mobile-card-list {
        display: none !important;
    }

    .ll-best-practices .ll-table-responsive,
    .ll-best-practices .table-responsive {
        display: block !important;
    }
}

.ll-mobile-card-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ll-mobile-card-item:last-child {
    border-bottom: none;
}

.ll-mobile-card-item:active {
    background: #f8fafc;
}

.ll-mobile-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ll-mobile-card-info {
    flex: 1;
    min-width: 0;
}

.ll-mobile-card-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--ll-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ll-mobile-card-sub {
    font-size: 0.75rem;
    color: var(--ll-secondary);
    margin-top: 0.125rem;
}

.ll-mobile-card-chevron {
    color: #cbd5e1;
    flex-shrink: 0;
}

/* Form Styles */
.ll-form-group {
    margin-bottom: 1.25rem;
}

.ll-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--ll-dark);
}

.ll-form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--ll-border-radius);
    transition: var(--ll-transition);
}

.ll-form-control:focus {
    outline: none;
    border-color: var(--ll-primary);
    box-shadow: 0 0 0 3px var(--ll-primary-light);
}

.ll-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* ═══════════════════════════════════════════════════
   Custom Select Dropdown (replaces native <select>)
   ═══════════════════════════════════════════════════ */

select.ll-form-select.ll-select-hidden {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.ll-custom-select {
    position: relative;
    display: inline-block;
    width: 100%;
}
.ll-custom-select.ll-cs-inline {
    width: auto;
    min-width: 150px;
}

.ll-cs-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 0.625rem 0.875rem;
    padding-right: 2.25rem;
    font-size: 0.875rem;
    color: #1e293b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--ll-border-radius, 8px);
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
}
.ll-cs-trigger::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #64748b;
    transition: transform .2s;
}
.ll-custom-select.ll-cs-open .ll-cs-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}
.ll-cs-trigger:hover {
    border-color: #cbd5e1;
}
.ll-cs-trigger:focus,
.ll-custom-select.ll-cs-open .ll-cs-trigger {
    outline: none;
    border-color: var(--ll-primary, #3B7DD8);
    box-shadow: 0 0 0 3px rgba(59,125,216,0.1);
}

.ll-cs-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 100%;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--ll-border-radius, 8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.04);
    z-index: 1050;
    padding: 4px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.ll-custom-select.ll-cs-open .ll-cs-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ll-cs-dropdown::-webkit-scrollbar { width: 5px; }
.ll-cs-dropdown::-webkit-scrollbar-track { background: transparent; }
.ll-cs-dropdown::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.ll-cs-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.85rem;
    color: #334155;
    cursor: pointer;
    transition: background .12s, color .12s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 3px solid transparent;
}
.ll-cs-option:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.ll-cs-option.ll-cs-selected {
    background: var(--ll-primary, #3B7DD8);
    color: #fff;
    font-weight: 600;
    border-left-color: var(--ll-primary-dark, #2C5F9E);
}
.ll-cs-option.ll-cs-selected:hover {
    background: var(--ll-primary-dark, #2C5F9E);
}
.ll-cs-option.ll-cs-disabled {
    color: #94a3b8;
    cursor: default;
    pointer-events: none;
}
.ll-cs-option.ll-cs-placeholder {
    color: #94a3b8;
    font-style: italic;
}
.ll-cs-option.ll-cs-selected::after {
    content: '\2713';
    margin-left: auto;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ll-custom-select.ll-cs-dropup .ll-cs-dropdown {
    top: auto;
    bottom: calc(100% + 4px);
}

@media (max-width: 768px) {
    .ll-cs-trigger {
        padding: 0.5rem 0.75rem;
        padding-right: 2rem;
        font-size: 0.82rem;
    }
    .ll-cs-option {
        padding: 8px 12px;
        font-size: 0.82rem;
    }
}

/* File Upload */
.ll-file-upload {
    border: 2px dashed #e2e8f0;
    border-radius: var(--ll-border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--ll-transition);
}

/* ============================
   Auth Pages (Login/Register)
   ============================ */

/* Auth Header */
.ll-auth-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ll-auth-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    color: var(--ll-primary);
}

.ll-auth-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.ll-auth-logo-text {
    font-size: 1.25rem;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.ll-auth-header .btn {
    min-height: 38px;
}

.ll-auth-nav-link {
    color: var(--ll-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.ll-auth-nav-link:hover {
    color: var(--ll-primary);
}

/* Auth Wrapper */
.ll-auth-body {
    min-height: 100vh;
    background: #f1f5f9;
}

.ll-auth-wrapper {
    background: #f1f5f9;
    min-height: calc(100vh - 73px);
}

/* Left Panel - Branding & Stats */
.ll-auth-left {
    background: linear-gradient(135deg, #3b6fa8 0%, #2e5a8a 60%, #243f6c 100%);
    color: #fff;
    padding: 3rem 3rem;
    display: flex;
    align-items: center;
    min-height: calc(100vh - 73px);
    position: relative;
    overflow: hidden;
}

.ll-auth-left::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ll-auth-left::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232, 184, 75, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ll-auth-branding {
    width: 100%;
}

.ll-auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.ll-auth-brand-logo i {
    font-size: 2rem;
}

.ll-auth-brand-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.ll-auth-brand-subtitle {
    font-size: 1rem;
    opacity: 0.85;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

/* Left panel clean feature list */
.ll-auth-feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 1;
}

.ll-auth-feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
}

.ll-auth-feature-item:hover {
    transform: translateX(4px);
}

.ll-auth-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    color: var(--ll-accent, #E8B84B);
    font-size: 1.15rem;
    flex-shrink: 0;
    transition: var(--ll-transition);
}

.ll-auth-feature-item:hover .ll-auth-feature-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Right Panel - Form */
.ll-auth-right {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    min-height: calc(100vh - 73px);
}

.ll-auth-form-container {
    width: 100%;
    max-width: 480px;
}

.ll-auth-form-container-wide {
    max-width: 640px;
}

.ll-auth-form-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.ll-auth-form-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ll-dark);
    margin-bottom: 0.375rem;
    letter-spacing: -0.02em;
}

.ll-auth-form-subtitle {
    color: var(--ll-secondary);
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

/* Auth form input group with icons */
.ll-auth-input-group {
    position: relative;
}

.ll-auth-input-group .ll-auth-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    z-index: 2;
    transition: color 0.2s ease;
    pointer-events: none;
}

.ll-auth-input-group .form-control,
.ll-auth-input-group .form-select {
    padding-left: 2.75rem;
}

.ll-auth-input-group .form-control:focus~.ll-auth-input-icon,
.ll-auth-input-group:focus-within .ll-auth-input-icon {
    color: var(--ll-primary);
}

.ll-auth-form-card .form-label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--ll-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.ll-auth-form-card .form-control,
.ll-auth-form-card .form-select {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.25s ease;
}

.ll-auth-form-card .ll-auth-input-group .form-control,
.ll-auth-form-card .ll-auth-input-group .form-select {
    padding-left: 2.75rem;
}

.ll-auth-form-card .form-control:hover,
.ll-auth-form-card .form-select:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.ll-auth-form-card .form-control:focus,
.ll-auth-form-card .form-select:focus {
    border-color: var(--ll-primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--ll-primary-light);
}

.ll-auth-form-card .form-control::placeholder {
    color: #94a3b8;
}

/* Auth submit buttons */
.ll-auth-btn-primary {
    background: linear-gradient(135deg, var(--ll-primary) 0%, var(--ll-primary-dark) 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 125, 216, 0.3);
}

.ll-auth-btn-primary:hover {
    background: linear-gradient(135deg, var(--ll-primary-dark) 0%, #1e4d80 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 125, 216, 0.4);
    color: #fff;
}

.ll-auth-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 125, 216, 0.3);
}

.ll-auth-btn-accent {
    background: linear-gradient(135deg, var(--ll-accent) 0%, var(--ll-accent-dark) 100%);
    border: none;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(232, 184, 75, 0.3);
}

.ll-auth-btn-accent:hover {
    background: linear-gradient(135deg, var(--ll-accent-dark) 0%, #c4912e 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(232, 184, 75, 0.4);
    color: #1e293b;
}

.ll-auth-btn-accent:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(232, 184, 75, 0.3);
}

/* Auth divider */
.ll-auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.8125rem;
}

.ll-auth-divider::before,
.ll-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* Google Sign-In button */
.ll-auth-btn-google {
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.08);
}

.ll-auth-btn-google:hover {
    background: #f8f9fa;
    border-color: #c6c9cc;
    box-shadow: 0 2px 8px rgba(60, 64, 67, 0.15);
    transform: translateY(-1px);
    color: #3c4043;
}

.ll-auth-btn-google:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.08);
}

/* Demo accounts box */
.ll-auth-demo-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4f8 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
}

.ll-auth-demo-box .ll-auth-demo-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ll-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ll-auth-demo-box .ll-auth-demo-item {
    font-size: 0.8125rem;
    color: #475569;
    padding: 0.25rem 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.ll-auth-demo-box .ll-auth-demo-item strong {
    color: var(--ll-dark);
    font-weight: 600;
    white-space: nowrap;
}

.ll-auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: var(--ll-secondary);
    font-size: 0.8125rem;
}

/* Responsive Auth Pages */
@media (max-width: 991.98px) {
    .ll-auth-left {
        padding: 2.5rem 2rem;
        min-height: auto;
    }

    .ll-auth-brand-title {
        font-size: 1.75rem;
    }

    .ll-auth-right {
        padding: 2rem 1.5rem;
        min-height: auto;
    }

    .ll-auth-form-card {
        padding: 2rem 1.5rem;
    }

    .ll-auth-form-container-wide {
        max-width: 100%;
    }

    .ll-auth-body {
        overflow: auto;
    }

    .ll-auth-wrapper {
        height: auto;
        overflow: visible;
    }
}

@media (max-width: 767.98px) {
    .ll-auth-header .d-flex.gap-4 {
        display: none !important;
    }

    .ll-auth-left {
        padding: 2rem 1.25rem;
    }

    .ll-auth-brand-logo {
        margin-bottom: 1.5rem;
    }

    .ll-auth-brand-title {
        font-size: 1.5rem;
    }

    .ll-auth-brand-subtitle {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }

    .ll-auth-right {
        padding: 1.5rem 1rem;
    }

    .ll-auth-form-card {
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }

    .ll-auth-form-title {
        font-size: 1.5rem;
    }
}

/* Old Login Styles (legacy) - can be removed if not used */
.ll-login-wrapper {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.ll-login-left {
    background: linear-gradient(135deg, var(--ll-primary) 0%, var(--ll-primary-dark) 100%);
    color: #fff;
    padding: 64px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ll-login-right {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.ll-login-form {
    width: 100%;
    max-width: 760px;
    box-sizing: border-box;
    padding: 48px 48px;
}

.ll-auth-page {
    background: #eef2f7;
}

.ll-login-card {
    background: #dbeafe;
    border-radius: 22px;
    padding: 32px;
    min-height: 520px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.ll-login-hero {
    background: #6ea8fe;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.ll-login-hero-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #fff;
}

.ll-login-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ll-login-form-card {
    background: #dbeafe;
    min-height: 520px;
}

.ll-login-input {
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.ll-login-submit {
    border-radius: 10px;
    background: #6ea8fe;
    border-color: #6ea8fe;
}

.ll-login-submit:hover {
    background: #5b97f5;
    border-color: #5b97f5;
}

.ll-login-google {
    border-radius: 10px;
}

@media (max-width: 991.98px) {
    .ll-login-card {
        min-height: auto;
    }
}

.ll-login-left--30 {
    flex: 0 0 30%;
}

.ll-login-right--70 {
    flex: 0 0 70%;
}

.ll-login-left--35 {
    flex: 0 0 35%;
}

.ll-login-right--65 {
    flex: 0 0 65%;
}

.ll-login-left--40 {
    flex: 0 0 40%;
}

.ll-login-right--60 {
    flex: 0 0 60%;
}

/* ============================
   Landing Page Styles
   ============================ */

/* Landing Header */
.ll-landing-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ll-landing-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    color: var(--ll-primary);
}

.ll-landing-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.ll-landing-logo-text {
    font-size: 1.25rem;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.ll-landing-auth .btn {
    min-height: 38px;
    padding: 0.45rem 1rem;
}

.ll-landing-auth .btn-outline-primary {
    background: #fff;
    border-color: var(--ll-primary);
    color: var(--ll-primary);
}

.ll-landing-auth .btn-outline-primary:hover,
.ll-landing-auth .btn-outline-primary:focus,
.ll-landing-auth .btn-outline-primary:active {
    background: #eff6ff;
    border-color: var(--ll-primary);
    color: var(--ll-primary);
}

.ll-landing-nav-link {
    color: var(--ll-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.ll-landing-nav-link:hover {
    color: var(--ll-primary);
}

/* Hero Section */
.ll-hero-section {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    padding: 6rem 0 5rem;
}

.ll-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.ll-hero-highlight {
    color: #fbbf24;
}

.ll-hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.ll-hero-search {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    max-width: 600px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ll-hero-search i {
    color: var(--ll-secondary);
    margin-right: 0.75rem;
}

.ll-hero-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
}

.ll-hero-search button {
    border-radius: 50px;
    padding: 0.75rem 2rem;
}

.ll-hero-icon {
    font-size: 20rem;
    opacity: 0.15;
}

/* How It Works Section */
.ll-how-section {
    background: #f8fafc;
    padding: 5rem 0;
}

.ll-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ll-dark);
    margin-bottom: 1rem;
}

.ll-section-subtitle {
    font-size: 1.125rem;
    color: var(--ll-secondary);
}

.ll-how-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.ll-how-number {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.ll-how-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--ll-dark);
}

.ll-how-description {
    color: var(--ll-secondary);
    line-height: 1.6;
}

/* System Modules Section */
.ll-modules-section {
    padding: 5rem 0;
    background: #fff;
}

.ll-module-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
}

.ll-module-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: var(--ll-primary);
}

.ll-module-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.ll-module-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--ll-dark);
}

.ll-module-description {
    color: var(--ll-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.ll-module-card-cta {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px dashed var(--ll-primary);
}

.ll-module-card-cta:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

/* CTA Section */
.ll-cta-section {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: #fff;
    padding: 5rem 0;
}

.ll-cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.ll-cta-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Footer */
.ll-landing-footer {
    background: #1e293b;
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem 0;
    font-size: 0.9rem;
}

/* Responsive Landing Page */
@media (max-width: 991.98px) {
    .ll-hero-title {
        font-size: 2.5rem;
    }

    .ll-hero-section {
        padding: 4rem 0 3rem;
    }

    .ll-landing-links {
        display: none !important;
    }

    .ll-landing-nav {
        gap: 0.75rem !important;
        flex-wrap: nowrap;
    }

    .ll-landing-auth .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .ll-section-title {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .ll-hero-title {
        font-size: 2rem;
    }

    .ll-hero-subtitle {
        font-size: 1rem;
    }

    .ll-cta-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 575.98px) {
    .ll-hero-title {
        font-size: 1.75rem;
    }

    .ll-hero-subtitle {
        font-size: 0.95rem;
    }

    .ll-hero-section {
        padding: 3rem 0 2.5rem;
    }

    .ll-hero-search {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .ll-hero-search i {
        margin: 0;
        align-self: flex-start;
    }

    .ll-hero-search button {
        width: 100%;
        padding: 0.75rem;
    }
}

.ll-login-right--70 {
    flex: 0 0 70%;
}

.ll-login-left--35 {
    flex: 0 0 35%;
}

.ll-login-right--65 {
    flex: 0 0 65%;
}

.ll-login-left--40 {
    flex: 0 0 40%;
}

.ll-login-right--60 {
    flex: 0 0 60%;
}

@media (max-width: 991.98px) {
    .ll-login-wrapper {
        flex-direction: column;
    }

    .ll-login-left,
    .ll-login-right {
        flex: 0 0 auto !important;
        width: 100% !important;
    }

    .ll-login-left {
        padding: 40px;
        text-align: center;
    }

    .ll-login-form {
        padding: 24px;
    }
}

.ll-file-upload:hover {
    border-color: var(--ll-primary);
    background: var(--ll-primary-light);
}

.ll-file-upload-icon {
    font-size: 2.5rem;
    color: var(--ll-secondary);
    margin-bottom: 1rem;
}

.ll-file-upload-text {
    font-size: 0.875rem;
    color: var(--ll-secondary);
}

.ll-file-upload-text strong {
    color: var(--ll-primary);
}

/* Rating Stars */
.ll-rating {
    display: flex;
    gap: 0.25rem;
}

.ll-rating i {
    color: #fbbf24;
    font-size: 1rem;
}

.ll-rating i.empty {
    color: #e2e8f0;
}

/* Recommendations */
.ll-recommendation-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--ll-primary-light) 0%, #fff 100%);
    border-radius: var(--ll-border-radius);
    margin-bottom: 0.75rem;
}

.ll-recommendation-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ll-recommendation-content h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.ll-recommendation-content p {
    font-size: 0.8125rem;
    color: var(--ll-secondary);
    margin: 0;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ll-animate-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Login Page Styles */
.ll-login-wrapper {
    min-height: 100vh;
    display: flex;
}

.ll-login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--ll-primary) 0%, var(--ll-primary-dark) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    color: #fff;
}

.ll-login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #fff;
}

.ll-login-form {
    width: 100%;
    max-width: 400px;
}

.ll-login-header {
    margin-bottom: 2rem;
}

.ll-login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ll-login-header p {
    color: var(--ll-secondary);
}

@media (max-width: 991.98px) {
    .ll-login-left {
        display: none;
    }
}

/* Responsive Core Layout */
@media (max-width: 991.98px) {
    .ll-header {
        height: auto;
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .ll-header-left {
        flex: 1 1 100%;
        min-width: 0;
    }

    .ll-header-right {
        flex: 1 1 auto;
        justify-content: flex-end;
    }

    .ll-search-box {
        max-width: 100%;
        flex: 1;
    }

    .ll-page-header .d-flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .ll-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .ll-card-header .ll-btn,
    .ll-card-header .btn,
    .ll-card-header a.ll-btn {
        width: 100%;
        justify-content: center;
    }

    .ll-hero-search {
        max-width: 100%;
    }

    .ll-cta-section .d-flex {
        flex-direction: column;
    }
}

@media (max-width: 767.98px) {
    .ll-hero-search {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 0.75rem 1rem;
        border-radius: 16px;
    }

    .ll-hero-search i {
        margin-right: 0.5rem;
    }

    .ll-hero-search input {
        flex: 1;
        min-width: 0;
        font-size: 0.875rem;
    }

    .ll-hero-search button {
        width: 100%;
        margin-top: 0.5rem;
        border-radius: 10px;
    }
}

/* ============================
   Mobile-Specific Refinements
   ============================ */

@media (max-width: 767.98px) {

    /* Header: compact Quick Actions + hide text labels */
    .ll-header {
        padding: 0.375rem 0.5rem;
    }

    .ll-header-right .dropdown>.btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }

    .ll-header-right .dropdown>.btn .me-1 {
        margin-right: 0.25rem !important;
    }

    .ll-header-btn {
        width: 32px;
        height: 32px;
    }

    .ll-header-btn .notification-badge {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
        top: 2px;
        right: 2px;
    }

    .ll-user-dropdown .avatar {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .ll-user-dropdown {
        padding: 0.125rem 0.375rem 0.125rem 0.125rem;
    }

    /* Notification & message dropdown menus: fit mobile screen */
    .ll-header-right .dropdown-menu {
        width: calc(100vw - 1.5rem) !important;
        max-width: 340px;
    }

    .ll-page-header .d-flex {
        flex-direction: row;
        align-items: center;
    }

    .ll-page-header .d-flex.gap-2 {
        width: auto;
        flex-wrap: nowrap;
        margin-left: auto;
    }

    .ll-page-header .d-flex.gap-2 .ll-btn,
    .ll-page-header .d-flex.gap-2>a {
        flex: 0 0 auto;
        justify-content: center;
        text-align: center;
    }

    /* Stat cards: compact 2-col grid */
    .ll-stat-card {
        padding: 0.75rem;
        gap: 0.625rem;
    }

    .ll-stat-value {
        font-size: 1.25rem;
    }

    .ll-stat-label {
        font-size: 0.75rem;
    }

    .ll-stat-icon {
        width: 38px;
        height: 38px;
        border-radius: 8px;
        font-size: 1rem;
    }

    /* Filter / search cards: full-width stacking (repository only) */
    #repoFilters .row.g-3.align-items-center>[class*="col-lg"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Landing page header logo */
    .ll-landing-logo img {
        height: 40px !important;
    }

    .ll-landing-logo-text {
        font-size: 1.25rem;
    }

    .ll-landing-auth .btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }

    /* Landing hero section */
    .ll-hero-section {
        padding: 3rem 0 2.5rem;
    }

    .ll-hero-title {
        font-size: 1.75rem;
        line-height: 1.25;
    }

    .ll-hero-title br {
        display: none;
    }

    .ll-hero-subtitle {
        font-size: 0.9375rem;
    }

    .ll-hero-subtitle br {
        display: none;
    }

    /* Hero CTA buttons stack */
    .ll-hero-section .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.75rem !important;
    }

    .ll-hero-section .d-flex.gap-3 .btn {
        width: 100%;
    }

    /* Landing footer */
    .ll-landing-footer .row {
        text-align: center;
    }

    /* Auth page logos */
    .ll-auth-logo img {
        height: 40px !important;
    }

    .ll-auth-brand-logo img {
        height: 56px !important;
    }

    .ll-auth-logo-text {
        font-size: 1.25rem;
    }

    .ll-auth-brand-logo {
        font-size: 1.5rem;
    }

    /* Upload filter buttons wrapping */
    .d-flex.flex-wrap.gap-2 .ll-btn,
    .d-flex.flex-wrap.gap-2 .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }

    /* Repository category filters: tighter spacing and wrap */
    #categoryFilters {
        gap: 0.5rem !important;
    }

    #categoryFilters .ll-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
        white-space: nowrap;
    }

    /* Repository results row: stack sort + view buttons */
    #resultsInfo {
        margin-bottom: 0.5rem;
    }

    #resultsInfo~.d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem !important;
        width: 100%;
    }

    #resultsInfo~.d-flex .ll-form-select {
        width: 100% !important;
    }

    #resultsInfo~.d-flex .btn-group {
        width: 100%;
    }

    #resultsInfo~.d-flex .btn-group .ll-btn {
        flex: 1;
        justify-content: center;
    }

    /* Settings sidebar: collapse to horizontal on mobile */
    .col-lg-3 .ll-card .nav.flex-column {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .col-lg-3 .ll-card .nav.flex-column .nav-link {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem !important;
        white-space: nowrap;
    }
}

/* Small phones (< 400px) */
@media (max-width: 399.98px) {
    .ll-content {
        padding: 0.5rem;
    }

    .ll-page-title {
        font-size: 1.125rem;
    }

    .ll-header-right .dropdown>.btn>span,
    .ll-header-right .dropdown>.btn-text {
        display: none;
    }

    .ll-hero-title {
        font-size: 1.5rem;
    }

    .ll-stat-value {
        font-size: 1.125rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================
   Resource Detail Page (Scribd-style)
   ========================================== */

/* Meta bar */
.ll-detail-meta-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--ll-secondary);
    margin-bottom: 0.75rem;
}

.ll-detail-meta-bar i {
    margin-right: 0.15rem;
}

.ll-detail-meta-dot {
    color: #cbd5e1;
}

/* Title */
.ll-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ll-dark);
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* Uploader */
.ll-detail-uploader {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ll-detail-uploader-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.ll-detail-uploader-name {
    font-size: 0.875rem;
    color: var(--ll-dark);
}

.ll-detail-uploader-name strong {
    color: var(--ll-primary);
}

.ll-detail-uploader-date {
    font-size: 0.75rem;
    color: var(--ll-secondary);
}

/* Tags */
.ll-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.ll-detail-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--ll-secondary);
    background: #fff;
    transition: var(--ll-transition);
}

.ll-detail-tag:hover {
    border-color: var(--ll-primary);
    color: var(--ll-primary);
}

/* Description */
.ll-detail-description {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--ll-border-radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #475569;
}

.ll-detail-description p:last-child {
    margin-bottom: 0;
}

/* Action Bar */
.ll-detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--ll-border-radius);
    margin-bottom: 1.25rem;
}

.ll-detail-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--ll-border-radius);
    background: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ll-secondary);
    cursor: pointer;
    transition: var(--ll-transition);
}

.ll-detail-action-btn:hover {
    border-color: var(--ll-primary);
    color: var(--ll-primary);
    background: var(--ll-primary-light);
}

.ll-detail-action-like.liked {
    border-color: #ec4899;
    color: #ec4899;
    background: #fce7f3;
}

.ll-detail-action-download.downloaded {
    border-color: var(--ll-success);
    color: var(--ll-success);
    background: #d1fae5;
}

.ll-detail-action-save.saved {
    border-color: var(--ll-primary);
    color: var(--ll-primary);
    background: var(--ll-primary-light);
}

/* Rating widget */
.ll-detail-action-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--ll-border-radius);
    background: #fff;
    font-size: 0.8rem;
}

.ll-detail-rating-label {
    color: var(--ll-secondary);
    font-weight: 500;
    margin-right: 0.25rem;
}

.ll-detail-star {
    cursor: pointer;
    color: #cbd5e1;
    font-size: 1rem;
    transition: color 0.15s ease;
}

.ll-detail-star:hover,
.ll-detail-star.active {
    color: #f59e0b;
}

.ll-detail-rating-value {
    font-weight: 600;
    color: #f59e0b;
    margin-left: 0.35rem;
    font-size: 0.8rem;
}

/* Document Preview */
.ll-detail-preview {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--ll-border-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.ll-detail-preview-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.ll-detail-preview-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ll-detail-preview-filename {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ll-dark);
}

.ll-detail-preview-filesize {
    font-size: 0.75rem;
    color: var(--ll-secondary);
}

.ll-detail-preview-body {
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #fff;
}

.ll-detail-preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ll-detail-preview-body:hover .ll-detail-preview-overlay {
    opacity: 1;
}

/* Sidebar Cards */
.ll-detail-sidebar-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--ll-border-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.ll-detail-sidebar-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    color: var(--ll-dark);
}

/* Stat Grid */
.ll-detail-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.ll-detail-stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ll-detail-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.ll-detail-stat-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ll-dark);
    line-height: 1.2;
}

.ll-detail-stat-label {
    font-size: 0.7rem;
    color: var(--ll-secondary);
}

/* Info List */
.ll-detail-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.ll-detail-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.ll-detail-info-row:last-child {
    border-bottom: none;
}

.ll-detail-info-label {
    font-size: 0.8rem;
    color: var(--ll-secondary);
}

.ll-detail-info-value {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ll-dark);
}

/* Sidebar Tags */
.ll-detail-sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ll-detail-sidebar-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    background: var(--ll-light);
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--ll-secondary);
    transition: var(--ll-transition);
    cursor: pointer;
}

.ll-detail-sidebar-tag:hover {
    border-color: var(--ll-primary);
    color: var(--ll-primary);
    background: var(--ll-primary-light);
}

/* ═══════════ READER-CENTRIC LAYOUT ═══════════ */

/* Hero Title Bar */
.ll-reader-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--ll-border-radius);
    margin-bottom: 1rem;
}

.ll-reader-hero-left {
    flex-shrink: 0;
}

.ll-reader-hero-center {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.ll-reader-hero-right {
    flex-shrink: 0;
}

.ll-reader-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ll-dark);
    line-height: 1.3;
    margin-bottom: 0.35rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 3-Column Grid */
.ll-reader-layout {
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.ll-reader-left,
.ll-reader-right {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.ll-reader-left::-webkit-scrollbar,
.ll-reader-right::-webkit-scrollbar {
    width: 4px;
}

.ll-reader-left::-webkit-scrollbar-thumb,
.ll-reader-right::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.ll-reader-center {
    min-width: 0;
}

/* Panels */
.ll-reader-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--ll-border-radius);
    padding: 1rem 1.125rem;
    margin-bottom: 0.75rem;
}

.ll-reader-panel-title {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ll-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.ll-reader-panel-title i {
    font-size: 0.9rem;
    color: var(--ll-primary);
}

/* Description */
.ll-reader-description {
    font-size: 0.85rem;
    line-height: 1.7;
    color: #475569;
    word-break: break-word;
}

.ll-reader-description p:last-child {
    margin-bottom: 0;
}

/* Vertical Action Buttons */
.ll-reader-actions-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ll-reader-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ll-secondary);
    cursor: pointer;
    transition: var(--ll-transition);
    width: 100%;
    text-align: left;
}

.ll-reader-action-btn:hover {
    border-color: var(--ll-primary);
    color: var(--ll-primary);
    background: var(--ll-primary-light);
}

.ll-reader-action-btn.active {
    border-color: var(--ll-primary);
    color: var(--ll-primary);
    background: var(--ll-primary-light);
}

.ll-reader-action-btn i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.ll-reader-action-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 400;
}

/* Rating Widget */
.ll-reader-rating-widget {
    text-align: center;
}

.ll-reader-stars {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.ll-reader-star {
    cursor: pointer;
    color: #cbd5e1;
    font-size: 1.35rem;
    transition: color 0.15s ease, transform 0.15s ease;
}

.ll-reader-star:hover {
    color: #f59e0b;
    transform: scale(1.15);
}

.ll-reader-star.active {
    color: #f59e0b;
}

.ll-reader-rating-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.ll-reader-rating-score {
    font-weight: 700;
    font-size: 1.1rem;
    color: #f59e0b;
}

.ll-reader-rating-count {
    font-size: 0.75rem;
    color: var(--ll-secondary);
}

/* Stats (Right Panel) */
.ll-reader-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.ll-reader-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
    padding: 0.5rem 0.25rem;
    border-radius: 10px;
    background: #f8fafc;
}

.ll-reader-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-bottom: 0.15rem;
}

.ll-reader-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ll-dark);
    line-height: 1.2;
}

.ll-reader-stat-label {
    font-size: 0.65rem;
    color: var(--ll-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Version History */
.ll-reader-versions {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ll-reader-version {
    padding: 0.5rem 0;
}

.ll-reader-version-bordered {
    border-bottom: 1px solid #f1f5f9;
}

/* Document Viewer (Center) */
.ll-reader-viewer {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--ll-border-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.ll-reader-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fafbfc;
}

.ll-reader-viewer-dl {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ll-secondary);
    transition: var(--ll-transition);
    flex-shrink: 0;
}

.ll-reader-viewer-dl:hover {
    border-color: var(--ll-primary);
    color: var(--ll-primary);
    background: var(--ll-primary-light);
}

.ll-reader-viewer-body {
    width: 100%;
}

.ll-reader-viewer-doc {
    height: 80vh;
    min-height: 600px;
    max-height: 900px;
}

.ll-reader-viewer-video {
    height: 500px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ll-reader-viewer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 350px;
    background: #f8f9fa;
    color: #adb5bd;
}

.ll-reader-viewer-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.ll-reader-viewer-empty p {
    color: var(--ll-secondary);
    margin: 0;
}

.ll-reader-viewer-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #f8f9fa;
}

/* Bottom Section (Comments & Related) */
.ll-reader-bottom {
    max-width: 900px;
    margin: 0 auto 1rem auto;
}

/* ═══════════ READER RESPONSIVE ═══════════ */

@media (max-width: 1200px) {
    .ll-reader-layout {
        grid-template-columns: 240px 1fr 240px;
    }
}

@media (max-width: 991px) {
    .ll-reader-layout {
        grid-template-columns: 1fr;
    }

    .ll-reader-left,
    .ll-reader-right {
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .ll-reader-center {
        order: -1;
    }

    .ll-reader-hero {
        flex-direction: column;
        text-align: center;
    }

    .ll-reader-hero-right {
        width: 100%;
    }

    .ll-reader-hero-right .ll-detail-tags {
        justify-content: center !important;
    }

    .ll-reader-title {
        white-space: normal;
    }

    .ll-reader-viewer-doc {
        height: 60vh;
        min-height: 400px;
    }
}

@media (max-width: 575px) {
    .ll-reader-hero {
        padding: 0.75rem 1rem;
    }

    .ll-reader-title {
        font-size: 1.1rem;
    }

    .ll-reader-stats {
        grid-template-columns: 1fr 1fr;
    }

    .ll-reader-viewer-doc {
        height: 50vh;
        min-height: 350px;
    }
}

/* Related Resources */
.ll-detail-related {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.ll-detail-related-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--ll-dark);
}

/* Resource card link wrapper */
a.ll-resource-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.ll-resource-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Resource Table (List View) */
.ll-table-format-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.ll-table-title-link {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--ll-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ll-table-title-link:hover {
    color: var(--ll-primary);
}

.ll-table-uploader {
    font-size: 0.7rem;
    color: var(--ll-secondary);
    margin-top: 0.15rem;
}

.ll-table-format-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Password Toggle */
.ll-auth-password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    z-index: 10;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

.ll-auth-password-toggle:hover {
    color: var(--ll-primary);
}

/* ============================
   Phase 3 - UI Polish & Enhancements
   ============================ */

/* Smoother card transitions */
.ll-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
}
.ll-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
}
.ll-card-header {
    background: #fafbfc;
}

/* Stat card polish */
.ll-stat-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border-color: #f1f5f9;
}
.ll-stat-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border-color: #e2e8f0;
}

/* Button polish */
.ll-btn {
    letter-spacing: 0.01em;
    font-weight: 500;
}
.ll-btn-primary {
    box-shadow: 0 1px 3px rgba(59,125,216,0.2);
}
.ll-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(59,125,216,0.25);
    transform: translateY(-1px);
}
.ll-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(59,125,216,0.2);
}
.ll-btn-outline {
    background: #fff;
}
.ll-btn-outline:hover {
    background: rgba(59,125,216,0.04);
    border-color: var(--ll-primary);
    color: var(--ll-primary);
}
.ll-btn-danger {
    background: #ef4444;
    color: #fff;
    border: none;
}
.ll-btn-danger:hover {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 4px 12px rgba(239,68,68,0.25);
    transform: translateY(-1px);
}

/* Badge polish */
.ll-badge {
    letter-spacing: 0.02em;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.6875rem;
}
.ll-badge-success { background: rgba(5,150,105,0.08); }
.ll-badge-warning { background: rgba(217,119,6,0.08); }
.ll-badge-danger { background: rgba(220,38,38,0.08); }
.ll-badge-info { background: rgba(37,99,235,0.08); }

/* Table polish */
.ll-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--ll-secondary);
    white-space: nowrap;
}
.ll-table td {
    vertical-align: middle;
}
.ll-table tr:hover td {
    background: rgba(59,125,216,0.02);
}
.ll-table tr {
    transition: background 0.15s ease;
}

/* Form polish */
.ll-form-control {
    background: #fff;
}
.ll-form-control::placeholder {
    color: #94a3b8;
}
.ll-form-control:focus {
    border-color: var(--ll-primary);
    box-shadow: 0 0 0 3px rgba(59,125,216,0.1);
}
.ll-form-label {
    color: #374151;
    letter-spacing: 0.01em;
}
.ll-form-select:focus {
    border-color: var(--ll-primary);
    box-shadow: 0 0 0 3px rgba(59,125,216,0.1);
}

/* Resource card polish */
.ll-resource-card {
    overflow: hidden;
    position: relative;
    border-radius: var(--ll-border-radius);
    border: 1px solid #e2e8f0;
    transition: transform .25s, box-shadow .25s;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.ll-resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}
.ll-resource-card .ll-resource-thumbnail {
    position: relative;
    height: 145px;
    background: linear-gradient(135deg, var(--ll-primary) 0%, var(--ll-primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 3rem;
    overflow: hidden;
}
.ll-resource-card .ll-resource-thumbnail::after {
    content: 'Preview';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity .2s ease;
    z-index: 5;
}
.ll-resource-card:hover .ll-resource-thumbnail::after {
    opacity: 1;
}
.ll-resource-card .ll-resource-thumbnail > i {
    transition: transform .2s ease;
}
.ll-resource-card:hover .ll-resource-thumbnail > i {
    transform: scale(1.1);
}
.ll-resource-card .ll-resource-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.ll-resource-card .ll-resource-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Page header polish */
.ll-page-header {
    position: relative;
}
.ll-page-title {
    font-weight: 700;
    letter-spacing: -0.02em;
}
.ll-breadcrumb {
    font-size: 0.8125rem;
    color: var(--ll-secondary);
}
.ll-breadcrumb a {
    color: var(--ll-primary);
    text-decoration: none;
    transition: color 0.15s;
}
.ll-breadcrumb a:hover {
    color: var(--ll-primary-dark);
}

/* Pagination polish */
.ll-pagination .page-link {
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
    color: var(--ll-dark);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    margin: 0 0.125rem;
    transition: all 0.15s;
}
.ll-pagination .page-link:hover {
    background: var(--ll-primary-light);
    border-color: var(--ll-primary);
    color: var(--ll-primary);
}
.ll-pagination .page-item.active .page-link {
    background: var(--ll-primary);
    border-color: var(--ll-primary);
    color: #fff;
    box-shadow: 0 2px 4px rgba(59,125,216,0.2);
}
.ll-pagination .page-item.disabled .page-link {
    background: #f8fafc;
    color: #cbd5e1;
}

/* Quill Editor styling to match design system */
.ql-toolbar.ql-snow {
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--ll-border-radius) var(--ll-border-radius) 0 0;
    background: #fafbfc;
    padding: 6px 8px !important;
    font-family: 'Inter', sans-serif;
}
.ql-container.ql-snow {
    border: 1px solid #e2e8f0 !important;
    border-top: none !important;
    border-radius: 0 0 var(--ll-border-radius) var(--ll-border-radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
}
.ql-editor {
    min-height: 100px;
    padding: 0.875rem;
    color: var(--ll-dark);
}
.ql-editor.ql-blank::before {
    color: #94a3b8;
    font-style: normal;
    font-size: 0.875rem;
}
.ql-snow .ql-stroke {
    stroke: var(--ll-secondary) !important;
}
.ql-snow .ql-fill, .ql-snow .ql-stroke.ql-fill {
    fill: var(--ll-secondary) !important;
}
.ql-snow .ql-picker {
    color: var(--ll-secondary);
    font-weight: 500;
}
.ql-toolbar.ql-snow button:hover,
.ql-toolbar.ql-snow .ql-picker-label:hover {
    color: var(--ll-primary) !important;
}
.ql-toolbar.ql-snow button:hover .ql-stroke {
    stroke: var(--ll-primary) !important;
}
.ql-toolbar.ql-snow button.ql-active,
.ql-toolbar.ql-snow .ql-picker-label.ql-active {
    color: var(--ll-primary) !important;
}
.ql-toolbar.ql-snow button.ql-active .ql-stroke {
    stroke: var(--ll-primary) !important;
}

/* Modal polish */
.modal-content {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-header {
    border-bottom-color: #f1f5f9;
    padding: 1.25rem 1.5rem;
}
.modal-footer {
    border-top-color: #f1f5f9;
    padding: 1rem 1.5rem;
}
.modal-body {
    padding: 1.25rem 1.5rem;
}
.modal-title {
    font-weight: 600;
    font-size: 1.125rem;
}

/* Dropdown polish */
.dropdown-menu {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    padding: 0.375rem;
    font-size: 0.875rem;
}
.dropdown-item {
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    transition: background 0.1s;
}
.dropdown-item:hover, .dropdown-item:focus {
    background: rgba(59,125,216,0.06);
}

/* Toast polish */
.toast {
    border-radius: 0.75rem;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    border: none;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection color */
::selection {
    background: rgba(59,125,216,0.2);
    color: var(--ll-dark);
}

/* Focus visible outlines for accessibility */
:focus-visible {
    outline: 2px solid var(--ll-primary);
    outline-offset: 2px;
}

/* Tag styles for repository */
.ll-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    background: #f1f5f9;
    color: var(--ll-secondary);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Skeleton loading placeholder */
.ll-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--ll-border-radius);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Subtle animation for page content */
.ll-content {
    animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Empty state polish */
.ll-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--ll-secondary);
}
.ll-empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

/* Alert refinements */
.alert {
    border-radius: var(--ll-border-radius);
    border: none;
    font-size: 0.875rem;
}
.alert-danger {
    background: rgba(239,68,68,0.08);
    color: #dc2626;
}
.alert-success {
    background: rgba(16,185,129,0.08);
    color: #059669;
}
.alert-warning {
    background: rgba(245,158,11,0.08);
    color: #d97706;
}
.alert-info {
    background: rgba(59,130,246,0.08);
    color: #2563eb;
}

/* ═══════════════════════════════════════════════════
   Repository – Scribd-style Carousel Layout
   ═══════════════════════════════════════════════════ */

/* ── Search Bar ── */
.ll-repo-search-bar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 6px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.ll-repo-search-bar .d-flex {
    flex-wrap: nowrap !important;
}
.ll-repo-search-input {
    position: relative;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0 12px 0 16px;
    min-width: 0;
    transition: none;
}
.ll-repo-search-input:focus-within > i {
    color: var(--ll-primary);
}
.ll-repo-search-input > i {
    color: #94a3b8;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: color 0.2s;
}
.ll-repo-search-input > input {
    border: none;
    background: transparent;
    padding: 9px 10px;
    font-size: .95rem;
    width: 100%;
    outline: none;
    color: #1e293b;
}
.ll-repo-search-input > input::placeholder {
    color: #94a3b8;
}
.ll-repo-filter-select {
    border: none;
    border-left: 1px solid #e2e8f0;
    border-radius: 0;
    padding: 9px 32px 9px 16px;
    font-size: .875rem;
    font-weight: 500;
    color: #475569;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 12px;
    appearance: none;
    cursor: pointer;
    min-width: 140px;
    transition: background-color .2s;
}
.ll-repo-filter-select:hover {
    background-color: rgba(0,0,0,0.02);
}
.ll-repo-filter-select:focus {
    outline: none;
    background-color: #f8fafc;
}
.ll-repo-search-bar .ll-btn {
    border-radius: 30px;
    padding: 8px 24px;
    white-space: nowrap;
    margin-left: 4px;
}
.ll-repo-search-bar .ll-btn-outline {
    padding: 8px 12px;
}

/* Base custom select hide styles for mobile responsiveness */
@media (max-width: 991.98px) {
    .ll-repo-search-bar {
        border-radius: 12px;
        padding: 12px;
    }
    .ll-repo-search-bar .d-flex {
        flex-wrap: wrap !important;
        gap: 12px !important;
    }
    .ll-repo-search-input {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        width: 100%;
        padding: 4px 12px;
    }
    .ll-repo-filter-select {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        flex: 1;
        min-width: 0;
        background-color: #f8fafc;
    }
    .ll-repo-search-bar .ll-btn {
        flex: 1;
        border-radius: 8px;
    }
}

/* ── Subject Pills ── */
.ll-repo-pills {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px; /* Room for touch scrolling */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    margin-left: -5px; /* offset side paddings */
    padding-left: 5px;
    margin-right: -5px;
    padding-right: 5px;
}
.ll-repo-pills::-webkit-scrollbar {
    display: none;
}
.ll-repo-pill {
    flex-shrink: 0;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.ll-repo-pill:hover {
    color: var(--ll-primary);
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
}
.ll-repo-pill:active {
    transform: translateY(0);
}
.ll-repo-pill.active {
    color: #fff;
    background: var(--ll-primary);
    border-color: var(--ll-primary);
    box-shadow: 0 4px 10px rgba(59,125,216,0.3);
}

/* ── Section Header ── */
.ll-repo-section {
    margin-bottom: 2rem;
}
.ll-repo-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid #f1f5f9;
}
.ll-repo-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ll-repo-section-title i {
    font-size: 1.25rem;
    color: var(--ll-primary);
}
.ll-repo-section-title h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.ll-repo-knn-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    border-radius: 10px;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.ll-repo-view-more {
    font-size: .825rem;
    font-weight: 600;
    color: var(--ll-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap .2s;
}
.ll-repo-view-more:hover {
    gap: 8px;
    color: var(--ll-primary-dark);
}

/* ── Carousel Wrapper ── */
.ll-repo-carousel-wrap {
    position: relative;
}
.ll-repo-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 12px;
    scrollbar-width: none;
}
.ll-repo-carousel::-webkit-scrollbar {
    display: none;
}

/* ── Carousel Arrows ── */
.ll-repo-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    z-index: 5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: opacity .3s, background .2s, color .2s;
}
.ll-repo-carousel-arrow:hover {
    background: var(--ll-primary);
    color: #fff;
    border-color: var(--ll-primary);
}
.ll-repo-arrow-left {
    left: -16px;
}
.ll-repo-arrow-right {
    right: -16px;
}

/* ── Resource Card (Scribd-style) ── */
.ll-repo-card {
    flex: 0 0 180px;
    width: 180px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8ecf1;
    transition: transform .25s, box-shadow .25s;
    cursor: pointer;
    position: relative;
}
.ll-repo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: #d0d7e0;
    color: inherit;
    text-decoration: none;
}

/* ── Card Thumbnail ── */
.ll-repo-card-thumb {
    position: relative;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.9);
    overflow: hidden;
}
.ll-repo-card-thumb::after {
    content: 'Preview';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity .2s ease;
    z-index: 5;
}
.ll-repo-card:hover .ll-repo-card-thumb::after {
    opacity: 1;
}
.ll-repo-card-thumb > i {
    font-size: 2.8rem;
    opacity: 0.85;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    transition: transform .2s ease;
}
.ll-repo-card:hover .ll-repo-card-thumb > i {
    transform: scale(1.1);
}
.ll-repo-card-format {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.35);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.ll-repo-card-page-fold {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 28px 28px 0;
    border-color: transparent #fff transparent transparent;
    opacity: 0.6;
}

/* ── Card Body ── */
.ll-repo-card-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.ll-repo-card-title {
    font-size: .825rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ll-repo-card-author {
    font-size: .72rem;
    color: #94a3b8;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Rating Bar ── */
.ll-repo-card-rating {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ll-repo-rating-bar {
    flex: 1;
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}
.ll-repo-rating-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    border-radius: 3px;
    transition: width .4s ease;
}
.ll-repo-rating-text {
    font-size: .7rem;
    color: #64748b;
    white-space: nowrap;
    font-weight: 500;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .ll-repo-card {
        flex: 0 0 170px;
        width: 170px;
    }
    .ll-repo-card-thumb {
        height: 130px;
    }
    .ll-repo-carousel-arrow {
        width: 32px;
        height: 32px;
        font-size: .9rem;
    }
    .ll-repo-arrow-left { left: -8px; }
    .ll-repo-arrow-right { right: -8px; }
    .ll-repo-section-title h2 {
        font-size: 1rem;
    }
    .ll-repo-filter-select {
        min-width: 110px;
        font-size: .8rem;
    }
}
@media (max-width: 480px) {
    .ll-repo-card {
        flex: 0 0 150px;
        width: 150px;
    }
    .ll-repo-card-thumb {
        height: 110px;
    }
    .ll-repo-card-thumb > i {
        font-size: 2rem;
    }
    .ll-repo-carousel-arrow {
        display: none;
    }
    .ll-repo-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .ll-repo-pills::-webkit-scrollbar { display: none; }
}

/* ═══════════════════════════════════════════════════
   ResourceDetail – Scribd-style Detail Layout
   ═══════════════════════════════════════════════════ */

/* ── Page Preview Strip ── */
.ll-scribd-preview-strip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 0;
    overflow: hidden;
}
.ll-scribd-strip-inner {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}
.ll-scribd-strip-inner::-webkit-scrollbar { display: none; }

.ll-scribd-page-thumb {
    flex: 0 0 110px;
    width: 110px;
    height: 140px;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    scroll-snap-align: start;
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease;
    cursor: pointer;
}
.ll-scribd-page-thumb:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 6px 20px rgba(0,0,0,0.16);
}

/* Document-style white page */
.ll-scribd-page-doc {
    background: #fff;
    border: 1px solid #e2e8f0;
}

/* Colored accent bar at top of page */
.ll-scribd-page-accent {
    height: 5px;
    width: 100%;
    border-radius: 4px 4px 0 0;
}

/* Title preview on first page */
.ll-scribd-page-title-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100% - 5px);
    padding: 10px 8px 6px;
    text-align: center;
    gap: 6px;
}
.ll-scribd-page-badge {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.ll-scribd-page-title-text {
    font-size: .52rem;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #334155;
}

/* Page number badge */
.ll-scribd-page-num {
    position: absolute;
    bottom: 4px;
    right: 6px;
    font-size: .5rem;
    color: #94a3b8;
    font-weight: 600;
}

/* Simulated text lines on other pages */
.ll-scribd-page-lines {
    padding: 12px 10px 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ll-scribd-line {
    height: 3px;
    background: #e2e8f0;
    border-radius: 2px;
}

/* Page fold corner */
.ll-scribd-page-fold {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 16px 16px 0;
    border-color: transparent #f1f5f9 transparent transparent;
}

/* ── Detail Content (centered) ── */
.ll-scribd-detail {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 24px 24px;
    animation: scribdFadeUp .4s ease-out;
}
@keyframes scribdFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Close button */
.ll-scribd-close {
    position: absolute;
    top: 24px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.1rem;
    text-decoration: none;
    transition: background .2s, color .2s;
    z-index: 2;
}
.ll-scribd-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Three-dot menu */
.ll-scribd-menu-wrap {
    position: absolute;
    top: 68px;
    right: 16px;
    z-index: 2;
}
.ll-scribd-menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
}
.ll-scribd-menu-btn:hover {
    background: #f1f5f9;
}
.ll-scribd-dropdown {
    position: absolute;
    top: 40px;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 180px;
    padding: 6px 0;
    display: none;
    z-index: 10;
}
.ll-scribd-dropdown.show { display: block; }
.ll-scribd-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: .85rem;
    color: #475569;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}
.ll-scribd-dropdown-item:hover {
    background: #f8fafc;
    color: var(--ll-primary);
}

/* Stats bar */
.ll-scribd-stats-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: #64748b;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.ll-scribd-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.ll-scribd-stat i {
    color: #94a3b8;
}
.ll-scribd-dot {
    color: #cbd5e1;
    font-weight: 700;
}

/* Title */
.ll-scribd-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.3;
    margin: 0 0 8px;
    padding-right: 50px;
}

/* Uploader */
.ll-scribd-uploader {
    font-size: .9rem;
    color: #64748b;
    margin-bottom: 16px;
}
.ll-scribd-uploader strong {
    color: #1e293b;
    text-decoration: underline;
    text-decoration-color: #cbd5e1;
    text-underline-offset: 3px;
}

/* Tags */
.ll-scribd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}
.ll-scribd-tag {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: .75rem;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
}
.ll-scribd-tag-link,
.ll-tag-link {
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.ll-scribd-tag-link:hover,
.ll-tag-link:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    border-color: #93c5fd;
}
.ll-scribd-tag-cat {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}
.ll-scribd-tag-hash {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #a5b4fc;
}

/* Description */
.ll-scribd-description {
    font-size: .925rem;
    color: #334155;
    line-height: 1.7;
    margin-bottom: 8px;
    max-height: 160px;
    overflow: hidden;
    position: relative;
    transition: max-height .35s ease;
}
.ll-scribd-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
    transition: opacity .25s;
}
.ll-scribd-desc-full {
    max-height: 2000px;
}
.ll-scribd-desc-full::after {
    opacity: 0;
}

/* Show more / less button */
.ll-scribd-show-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--ll-primary);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 20px;
    transition: color .2s;
}
.ll-scribd-show-more:hover {
    color: var(--ll-primary-dark);
}
.ll-scribd-show-more i {
    font-size: .7rem;
    transition: transform .25s;
}

/* Rating Widget Inline */
.ll-scribd-rating-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: #fefce8;
    border: 1px solid #fef08a;
    border-radius: 10px;
    flex-wrap: wrap;
}
.ll-scribd-rating-label {
    font-size: .82rem;
    font-weight: 600;
    color: #854d0e;
    white-space: nowrap;
}
.ll-scribd-rating-info {
    font-size: .82rem;
    font-weight: 600;
    color: #854d0e;
}

/* Action Buttons */
.ll-scribd-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    padding-top: 4px;
}
.ll-scribd-read-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 36px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: .925rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 2px 8px rgba(22,163,74,0.3);
    position: relative;
    overflow: hidden;
}
.ll-scribd-read-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .5s;
}
.ll-scribd-read-btn:hover {
    background: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22,163,74,0.35);
}
.ll-scribd-read-btn:hover::after {
    transform: translateX(100%);
}
.ll-scribd-save-btn,
.ll-scribd-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: .875rem;
    color: #475569;
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
}
.ll-scribd-save-btn:hover,
.ll-scribd-like-btn:hover {
    color: var(--ll-primary);
    border-color: var(--ll-primary);
    background: rgba(59,125,216,0.04);
}
.ll-scribd-save-btn.active {
    color: var(--ll-primary);
    border-color: var(--ll-primary);
    background: rgba(59,125,216,0.06);
}
.ll-scribd-like-btn.active {
    color: #ef4444;
    border-color: #fca5a5;
    background: rgba(239,68,68,0.04);
}
.ll-scribd-like-count {
    font-size: .75rem;
    color: #94a3b8;
    margin-left: 2px;
}

/* File Info */
.ll-scribd-file-info {
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    margin-bottom: 20px;
}
.ll-scribd-file-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: .825rem;
    border-bottom: 1px solid #f8fafc;
    transition: background .15s;
}
.ll-scribd-file-row:hover {
    background: #fafbfc;
}
.ll-scribd-file-row > span:first-child {
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .4px;
}
.ll-scribd-file-row > span:last-child {
    color: #334155;
    font-weight: 600;
}

/* Version History */
.ll-scribd-versions {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}
.ll-scribd-versions > summary {
    padding: 10px 16px;
    font-size: .85rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    list-style: none;
    display: flex;
    align-items: center;
}
.ll-scribd-versions > summary::-webkit-details-marker { display: none; }
.ll-scribd-versions > summary::after {
    content: '\25B6';
    margin-left: auto;
    font-size: .65rem;
    color: #94a3b8;
    transition: transform .2s;
}
.ll-scribd-versions[open] > summary::after {
    transform: rotate(90deg);
}
.ll-scribd-versions-list {
    padding: 8px 16px;
}
.ll-scribd-version-item {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}
.ll-scribd-version-item:last-child { border-bottom: none; }

/* ── Document Viewer Section ── */
.ll-scribd-viewer-section {
    max-width: 960px;
    margin: 0 auto 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.ll-scribd-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #fafbfc;
}
.ll-scribd-viewer-body {
    height: 75vh;
    min-height: 500px;
    background: #f8fafc;
}
.ll-scribd-viewer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    height: 75vh;
}
.ll-scribd-viewer-empty > i {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* ── Comments / Related section ── */
.ll-scribd-section {
    max-width: 860px;
    margin: 0 auto 2rem;
}
.ll-scribd-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.ll-scribd-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .ll-scribd-detail {
        padding: 20px 16px 16px;
    }
    .ll-scribd-title {
        font-size: 1.35rem;
        padding-right: 40px;
    }
    .ll-scribd-preview-strip {
        padding: 12px 14px;
        border-radius: 8px;
    }
    .ll-scribd-page-thumb {
        flex: 0 0 85px;
        width: 85px;
        height: 110px;
    }
    .ll-scribd-page-badge {
        width: 22px;
        height: 22px;
        font-size: .7rem;
    }
    .ll-scribd-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .ll-scribd-read-btn {
        justify-content: center;
    }
    .ll-scribd-save-btn,
    .ll-scribd-like-btn {
        justify-content: center;
    }
    .ll-scribd-viewer-body {
        height: 55vh;
        min-height: 350px;
    }
    .ll-scribd-close {
        position: fixed;
        top: auto;
        right: 16px;
        bottom: 80px;
        background: #fff;
        border: 1px solid #e2e8f0;
        box-shadow: 0 2px 12px rgba(0,0,0,0.12);
        z-index: 10;
    }
    .ll-scribd-menu-wrap {
        position: fixed;
        top: auto;
        right: 16px;
        bottom: 32px;
        z-index: 10;
    }
    .ll-scribd-menu-btn {
        background: #fff;
        border: 1px solid #e2e8f0;
        box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    }
    .ll-scribd-panel {
        padding: 16px;
    }
    .ll-scribd-stats-bar {
        font-size: .78rem;
    }
    .ll-scribd-description {
        max-height: 120px;
    }
}
@media (max-width: 480px) {
    .ll-scribd-page-thumb {
        flex: 0 0 70px;
        width: 70px;
        height: 90px;
    }
    .ll-scribd-page-accent {
        height: 3px;
    }
    .ll-scribd-title {
        font-size: 1.15rem;
    }
    .ll-scribd-read-btn {
        padding: 10px 24px;
        font-size: .85rem;
    }
}

/* ═══════════════════════════════════════════════════════
   RESOURCE PREVIEW MODAL (Scribd-style overlay)
   ═══════════════════════════════════════════════════════ */
.ll-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    animation: ll-preview-fadein .2s ease;
}
@keyframes ll-preview-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}
.ll-preview-modal {
    position: relative;
    background: #f8f9fc;
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateY(30px);
    opacity: 0;
    transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
}
.ll-preview-modal.ll-preview-visible {
    transform: translateY(0);
    opacity: 1;
}
.ll-review-window {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 600;
}
.ll-review-window.previewed {
    background: #ecfdf5;
    color: #047857;
}
.ll-review-window.urgent {
    background: #fff7ed;
    color: #c2410c;
}
.ll-admin-preview-frame {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: 0;
    background: #fff;
}
.ll-admin-preview-image {
    width: 100%;
    height: 100%;
    min-height: 500px;
    object-fit: contain;
    display: block;
    background: #fff;
}
.ll-preview-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 10;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #64748b;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ll-preview-close:hover {
    background: #f1f5f9;
    color: #1e293b;
    transform: scale(1.1);
}
.ll-preview-strip {
    background: #f1f4f9;
    padding: 0;
    display: flex;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    justify-content: center;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 18px 18px 0 0;
}
.ll-preview-strip::-webkit-scrollbar { display: none; }
.ll-preview-content {
    background: #f8f9fc;
    padding: 28px 40px 36px;
    max-width: 800px;
    margin: 0 auto;
}

/* ── Responsive modal ── */
@media (min-width: 769px) {
    .ll-preview-overlay {
        align-items: center;
        padding: 24px;
    }
    .ll-preview-modal {
        max-width: 780px;
        max-height: 90vh;
        border-radius: 18px;
    }
    .ll-preview-strip {
        border-radius: 18px 18px 0 0;
    }
}
@media (max-width: 768px) {
    .ll-preview-content {
        padding: 20px 16px 28px;
    }
    .ll-preview-strip {
        padding: 14px 12px;
        gap: 10px;
    }
}

/* ═══════════════════════════════════════════════════════
   RESOURCE DETAIL — Scribd Full-Reader Layout
   ═══════════════════════════════════════════════════════ */
.ll-reader-layout {
    display: grid;
    grid-template-columns: 340px 1fr 280px;
    gap: 0;
    min-height: calc(100vh - 70px);
    margin: -1.5rem;
    background: #f1f3f8;
}
.ll-reader-sidebar-left {
    background: #fff;
    border-right: 1px solid #e8ecf1;
    padding: 28px 24px;
    overflow-y: auto;
    max-height: calc(100vh - 70px);
    position: sticky;
    top: 70px;
}
.ll-reader-main {
    background: #e8ecf1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 80vh;
}
.ll-reader-toolbar {
    background: #1e293b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    gap: 12px;
    flex-shrink: 0;
}
.ll-reader-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ll-reader-toolbar-left .ll-reader-toolbar-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
}
.ll-reader-toolbar-title {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}
.ll-reader-toolbar-sub {
    font-size: 0.72rem;
    color: #94a3b8;
}
.ll-reader-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ll-reader-toolbar-actions button,
.ll-reader-toolbar-actions a {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: #e2e8f0;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all .2s;
    text-decoration: none;
}
.ll-reader-toolbar-actions button:hover,
.ll-reader-toolbar-actions a:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}
.ll-reader-viewer-frame {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    min-height: 85vh;
}
.ll-reader-viewer-frame iframe,
.ll-reader-viewer-frame video {
    width: 100%;
    height: 100%;
    min-height: 80vh;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}
.ll-reader-sidebar-right {
    background: #fff;
    border-left: 1px solid #e8ecf1;
    padding: 24px 18px;
    overflow-y: auto;
    max-height: calc(100vh - 70px);
    position: sticky;
    top: 70px;
}
.ll-reader-sidebar-right h6 {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}
.ll-reader-related-card {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
    border-radius: 6px;
}
.ll-reader-related-card:hover {
    background: #f8fafc;
}
.ll-reader-related-thumb {
    width: 60px;
    height: 78px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
    position: relative;
}
.ll-reader-related-thumb .ll-repo-card-format {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 0.55rem;
    background: rgba(0,0,0,0.3);
    color: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 700;
}
.ll-reader-related-info {
    flex: 1;
    min-width: 0;
}
.ll-reader-related-info h6 {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 2px;
    text-transform: none;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ll-reader-related-info .ll-reader-related-meta {
    font-size: 0.7rem;
    color: #94a3b8;
}
.ll-reader-related-info .ll-reader-related-rating {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 2px;
}

/* Left sidebar inside reader */
.ll-reader-meta-stats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 12px;
}
.ll-reader-meta-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.3;
    margin-bottom: 6px;
}
.ll-reader-meta-desc {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 14px;
    max-height: 140px;
    overflow: hidden;
    position: relative;
}
.ll-reader-meta-desc.ll-reader-desc-expanded {
    max-height: none;
}
.ll-reader-desc-toggle {
    background: none;
    border: none;
    color: var(--ll-primary);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
    margin-bottom: 12px;
    text-decoration: underline;
}
.ll-reader-meta-uploader {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 14px;
}
.ll-reader-meta-uploader strong {
    color: #1e293b;
}
.ll-reader-meta-source-link {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 14px;
    font-size: 0.82rem;
    color: #64748b;
}
.ll-reader-meta-source-link a {
    color: var(--ll-primary);
    font-weight: 600;
    text-decoration: none;
    word-break: break-word;
}
.ll-reader-meta-source-link a:hover {
    text-decoration: underline;
}
.ll-reader-meta-divider {
    border: none;
    border-top: 1px solid #e8ecf1;
    margin: 14px 0;
}
.ll-reader-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}
.ll-reader-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border: 1px solid #e8ecf1;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}
.ll-reader-action-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}
.ll-reader-action-btn i {
    font-size: 1.15rem;
}
.ll-reader-action-btn.active {
    color: var(--ll-primary);
    border-color: var(--ll-primary);
    background: rgba(22, 163, 74, 0.04);
}

.ll-reader-no-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    text-align: center;
    padding: 40px;
}
.ll-reader-no-preview i {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

/* Below-viewer sections in reader mode */
.ll-reader-below {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

/* ── Reader Responsive ── */
@media (max-width: 1100px) {
    .ll-reader-layout {
        grid-template-columns: 1fr;
    }
    .ll-reader-sidebar-left,
    .ll-reader-sidebar-right {
        position: static;
        max-height: none;
        border: none;
    }
    .ll-reader-sidebar-left {
        border-bottom: 1px solid #e8ecf1;
    }
    .ll-reader-sidebar-right {
        border-top: 1px solid #e8ecf1;
    }
    .ll-reader-main {
        min-height: 70vh;
    }
    .ll-reader-viewer-frame {
        min-height: 75vh;
    }
    .ll-reader-layout {
        margin: 0;
    }
}
@media (max-width: 768px) {
    .ll-reader-sidebar-left {
        padding: 20px 16px;
    }
    .ll-reader-sidebar-right {
        padding: 20px 16px;
    }
    .ll-reader-meta-title {
        font-size: 1.1rem;
    }
    .ll-reader-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .ll-reader-toolbar-title {
        max-width: 180px;
    }
    .ll-reader-action-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Comment Section Enhancements */
.comment-item {
    transition: background-color 0.2s ease;
}

.comment-item:hover {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    margin: -12px;
}

.edit-box textarea {
    border: 2px solid var(--ll-primary);
    border-radius: 8px;
}

.btn-group-sm .btn {
    font-size: 0.85rem;
}

.btn-group-sm .btn.active {
    background-color: var(--ll-primary);
    color: white;
    border-color: var(--ll-primary);
}

.like-count {
    display: inline-block;
    min-width: 20px;
}

.comment-display p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===================== DARK MODE ===================== */
[data-theme="dark"] {
    --ll-dark: #e2e8f0;
    --ll-light: #1e293b;
    --ll-primary-light: #1e3a5f;
}

[data-theme="dark"] body {
    background-color: #0f172a;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-sidebar {
    background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
    border-right: 1px solid #1e293b;
}

[data-theme="dark"] .ll-header {
    background: #1e293b;
    border-bottom-color: #334155;
}

[data-theme="dark"] .ll-search-box input {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-search-box input:focus {
    background: #1e293b;
    border-color: var(--ll-primary);
    box-shadow: 0 0 0 3px rgba(59, 125, 216, 0.2);
}

[data-theme="dark"] .ll-search-box i {
    color: #94a3b8;
}

[data-theme="dark"] .ll-content {
    background-color: #0f172a;
}

[data-theme="dark"] .ll-card,
[data-theme="dark"] .fb-card {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-card-header {
    background: #1e293b;
    border-bottom-color: #334155;
}

[data-theme="dark"] .ll-card > .ll-card-header,
[data-theme="dark"] .ll-card > .ll-card-body,
[data-theme="dark"] .ll-card > .ll-card-body > .table-responsive,
[data-theme="dark"] .ll-card > .ll-card-body > .table-responsive-sm,
[data-theme="dark"] .ll-card > .ll-card-body > .table-responsive-md,
[data-theme="dark"] .ll-card > .ll-card-body > .table-responsive-lg,
[data-theme="dark"] .ll-card > .ll-card-body > .table-responsive-xl,
[data-theme="dark"] .ll-card > .ll-card-body > .table-responsive-xxl,
[data-theme="dark"] .ll-card > .ll-card-body > .ll-table-responsive {
    background-color: #1e293b !important;
}

[data-theme="dark"] .ll-card-title,
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: #f1f5f9;
}

[data-theme="dark"] .text-dark {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end {
    border-color: #334155 !important;
}

[data-theme="dark"] .bg-light {
    background-color: #334155 !important;
}

[data-theme="dark"] .bg-white {
    background-color: #1e293b !important;
}

[data-theme="dark"] a:not(.btn):not(.nav-link):not(.ll-btn):not(.dropdown-item) {
    color: var(--ll-info);
}

[data-theme="dark"] .dropdown-menu {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .dropdown-item {
    color: #e2e8f0;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background: #334155;
    color: #f1f5f9;
}

[data-theme="dark"] .dropdown-divider {
    border-color: #334155;
}

[data-theme="dark"] .modal-content {
    background: #1e293b;
    color: #e2e8f0;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: #1e293b;
    border-color: var(--ll-primary);
    color: #e2e8f0;
    box-shadow: 0 0 0 3px rgba(59, 125, 216, 0.2);
}

[data-theme="dark"] .form-control:disabled {
    background-color: #1e293b;
    color: #64748b;
}

[data-theme="dark"] .form-text {
    color: #64748b;
}

[data-theme="dark"] .btn-light {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .btn-light:hover {
    background: #475569;
    color: #f1f5f9;
}

[data-theme="dark"] .btn-outline-secondary {
    border-color: #475569;
    color: #94a3b8;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background: #334155;
    border-color: #64748b;
    color: #e2e8f0;
}

[data-theme="dark"] .table,
[data-theme="dark"] .ll-table {
    color: #e2e8f0;
}

[data-theme="dark"] .ll-table thead th {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .ll-table tbody td {
    border-color: #334155;
}

[data-theme="dark"] .ll-table tbody tr:hover {
    background: #334155;
}

[data-theme="dark"] .nav-tabs {
    border-bottom-color: #334155 !important;
}

[data-theme="dark"] .nav-tabs .nav-link {
    color: #94a3b8;
}

[data-theme="dark"] .nav-tabs .nav-link.active {
    color: var(--ll-primary) !important;
    background: transparent;
}

[data-theme="dark"] .alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

[data-theme="dark"] .alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

[data-theme="dark"] .ll-progress {
    background: #334155;
}

[data-theme="dark"] .fb-post-card:hover {
    background: #334155;
}

[data-theme="dark"] .fb-comment-bubble {
    background: #334155;
}

[data-theme="dark"] .fb-action-btn:hover {
    background: #334155;
}

[data-theme="dark"] .fb-tag {
    background: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .ll-tag {
    background: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .badge.bg-secondary.bg-opacity-10 {
    background: #334155 !important;
}

[data-theme="dark"] .ll-page-header {
    background: transparent;
}

[data-theme="dark"] .ll-page-title {
    color: #f1f5f9;
}

[data-theme="dark"] .ll-breadcrumb a {
    color: var(--ll-info);
}

[data-theme="dark"] .toast {
    background: #1e293b;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-resource-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .ll-resource-content {
    color: #e2e8f0;
}

[data-theme="dark"] .ll-resource-title {
    color: #f1f5f9;
}

[data-theme="dark"] .ll-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .ll-user-dropdown .avatar {
    border-color: #475569;
}

[data-theme="dark"] .fb-avatar,
[data-theme="dark"] .fb-avatar-sm,
[data-theme="dark"] .fb-avatar-lg {
    border: 1px solid #334155;
}

[data-theme="dark"] .ll-custom-select .ll-cs-trigger {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-custom-select .ll-cs-dropdown {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .ll-cs-option:hover {
    background: #334155;
}

[data-theme="dark"] .fb-reply-editor,
[data-theme="dark"] .ql-toolbar.ql-snow,
[data-theme="dark"] .ql-container.ql-snow {
    border-color: #334155;
    background: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .ql-editor {
    color: #e2e8f0;
}

[data-theme="dark"] .ql-editor.ql-blank::before {
    color: #64748b;
}

[data-theme="dark"] .ql-snow .ql-stroke {
    stroke: #94a3b8;
}

[data-theme="dark"] .ql-snow .ql-fill {
    fill: #94a3b8;
}

[data-theme="dark"] .ql-snow .ql-picker-label {
    color: #94a3b8;
}

[data-theme="dark"] .ql-snow .ql-picker-options {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ── Repo Cards Dark Mode ── */
[data-theme="dark"] .ll-repo-card {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-repo-card:hover {
    border-color: #475569;
}

[data-theme="dark"] .ll-repo-card-title {
    color: #f1f5f9;
}

[data-theme="dark"] .ll-repo-card-author {
    color: #94a3b8;
}

[data-theme="dark"] .ll-repo-card-page-fold {
    border-color: transparent #1e293b transparent transparent;
}

[data-theme="dark"] .ll-repo-carousel-arrow {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-repo-carousel-arrow:hover {
    background: var(--ll-primary);
    border-color: var(--ll-primary);
    color: #fff;
}

[data-theme="dark"] .ll-repo-rating-bar {
    background: #334155;
}

[data-theme="dark"] .ll-repo-rating-text {
    color: #94a3b8;
}

/* ── Assorted Cards & UI Elements ── */
[data-theme="dark"] .ll-stat-card,
[data-theme="dark"] .ll-discussion-card,
[data-theme="dark"] .ll-quick-action {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-stat-card:hover,
[data-theme="dark"] .ll-discussion-card:hover,
[data-theme="dark"] .ll-quick-action:hover {
    border-color: #475569;
}

[data-theme="dark"] .ll-stat-value,
[data-theme="dark"] .ll-quick-action-label,
[data-theme="dark"] .ll-discussion-title {
    color: #f1f5f9;
}

[data-theme="dark"] .fb-quick-comment {
    background: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .fb-quick-comment:focus {
    background: #1e293b;
}

[data-theme="dark"] .fb-comments-preview {
    background: #0f172a;
}

[data-theme="dark"] .fb-trending-tag,
[data-theme="dark"] .fb-type-pill,
[data-theme="dark"] .fb-load-more-btn {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .fb-trending-tag:hover,
[data-theme="dark"] .fb-type-pill:hover,
[data-theme="dark"] .fb-load-more-btn:hover,
[data-theme="dark"] .fb-type-pill.active {
    background: #475569;
    color: #f1f5f9;
}

/* ── Repository Search Bar & Pills ── */
[data-theme="dark"] .ll-repo-search-bar {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .ll-repo-search-input > input {
    color: #e2e8f0;
}

[data-theme="dark"] .ll-repo-filter-select {
    color: #e2e8f0;
    border-left-color: #334155;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
}

[data-theme="dark"] .ll-repo-filter-select:focus {
    background-color: #334155;
}

[data-theme="dark"] .ll-repo-pill {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .ll-repo-pill:hover {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-repo-pill.active {
    background: var(--ll-primary);
    border-color: var(--ll-primary);
    color: #fff;
}

[data-theme="dark"] .ll-repo-section-header {
    border-bottom-color: #334155;
}

[data-theme="dark"] .ll-repo-section-title h2 {
    color: #f1f5f9;
}

/* ── Scribd Preview Modal ── */
[data-theme="dark"] .ll-scribd-detail {
    color: #e2e8f0;
}

[data-theme="dark"] .ll-scribd-title {
    color: #f1f5f9;
}

[data-theme="dark"] .ll-scribd-uploader {
    color: #94a3b8;
}

[data-theme="dark"] .ll-scribd-uploader strong {
    color: #e2e8f0;
    text-decoration-color: #475569;
}

[data-theme="dark"] .ll-scribd-stats-bar {
    color: #94a3b8;
}

[data-theme="dark"] .ll-scribd-tag {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}

[data-theme="dark"] .ll-scribd-tag-cat {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
}

[data-theme="dark"] .ll-scribd-tag-hash {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .ll-scribd-description {
    color: #cbd5e1;
}

[data-theme="dark"] .ll-scribd-description::after {
    background: linear-gradient(transparent, #1e293b);
}

[data-theme="dark"] .ll-scribd-save-btn,
[data-theme="dark"] .ll-scribd-like-btn {
    border-color: #475569;
    color: #94a3b8;
}

[data-theme="dark"] .ll-scribd-save-btn:hover,
[data-theme="dark"] .ll-scribd-like-btn:hover {
    border-color: var(--ll-primary);
    color: var(--ll-primary);
    background: rgba(59, 125, 216, 0.1);
}

[data-theme="dark"] .ll-scribd-file-info {
    border-top-color: #334155;
}

[data-theme="dark"] .ll-scribd-file-row {
    border-bottom-color: #1e293b;
}

[data-theme="dark"] .ll-scribd-file-row:hover {
    background: #334155;
}

[data-theme="dark"] .ll-scribd-file-row > span:first-child {
    color: #64748b;
}

[data-theme="dark"] .ll-scribd-file-row > span:last-child {
    color: #e2e8f0;
}

[data-theme="dark"] .ll-scribd-rating-widget {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.25);
}

[data-theme="dark"] .ll-scribd-rating-label,
[data-theme="dark"] .ll-scribd-rating-info {
    color: #fbbf24;
}

[data-theme="dark"] .ll-scribd-close {
    color: #94a3b8;
}

[data-theme="dark"] .ll-scribd-close:hover {
    background: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-scribd-dropdown {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .ll-scribd-dropdown-item {
    color: #e2e8f0;
}

[data-theme="dark"] .ll-scribd-dropdown-item:hover {
    background: #334155;
    color: var(--ll-primary);
}

[data-theme="dark"] .ll-scribd-menu-btn:hover {
    background: #334155;
}

[data-theme="dark"] .ll-scribd-versions {
    border-color: #334155;
}

[data-theme="dark"] .ll-scribd-versions > summary {
    background: #0f172a;
    border-bottom-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-scribd-version-item {
    border-bottom-color: #334155;
}

[data-theme="dark"] .ll-scribd-panel {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .ll-scribd-panel-title {
    color: #f1f5f9;
}

[data-theme="dark"] .ll-scribd-viewer-section {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .ll-scribd-viewer-header {
    background: #0f172a;
    border-bottom-color: #334155;
}

[data-theme="dark"] .ll-scribd-viewer-body {
    background: #0f172a;
}

[data-theme="dark"] .ll-scribd-page-fold {
    border-color: transparent #1e293b transparent transparent;
}

/* ── Resource Detail / Reader Layout ── */
[data-theme="dark"] .ll-reader-panel {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .ll-reader-meta-title {
    color: #f1f5f9;
}

[data-theme="dark"] .ll-reader-meta-desc {
    color: #cbd5e1;
}

[data-theme="dark"] .ll-reader-meta-uploader {
    color: #94a3b8;
}

[data-theme="dark"] .ll-reader-meta-uploader strong {
    color: #e2e8f0;
}

[data-theme="dark"] .ll-reader-meta-source-link {
    color: #94a3b8;
}

[data-theme="dark"] .ll-reader-meta-source-link a {
    color: #60a5fa;
}

[data-theme="dark"] .ll-reader-meta-divider {
    border-top-color: #334155;
}

[data-theme="dark"] .ll-reader-action-btn {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .ll-reader-action-btn:hover {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-reader-related-card {
    border-bottom-color: #334155;
}

[data-theme="dark"] .ll-reader-related-card:hover {
    background: #334155;
}

[data-theme="dark"] .ll-reader-related-info h6 {
    color: #f1f5f9;
}

[data-theme="dark"] .ll-reader-viewer-header {
    background: #0f172a;
    border-bottom-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-reader-description {
    color: #cbd5e1;
}

[data-theme="dark"] .comment-item:hover {
    background-color: #334155;
}

/* ── Dashboard: Inline-style Overrides ── */
[data-theme="dark"] [style*="background: #f8fafc"],
[data-theme="dark"] [style*="background:#f8fafc"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background:#ffffff"] {
    background: #1e293b !important;
    border-color: #334155 !important;
}

[data-theme="dark"] [style*="color: #1e293b"],
[data-theme="dark"] [style*="color:#1e293b"] {
    color: #f1f5f9 !important;
}

[data-theme="dark"] [style*="color: #64748b"],
[data-theme="dark"] [style*="color:#64748b"] {
    color: #94a3b8 !important;
}

[data-theme="dark"] [style*="color: #475569"],
[data-theme="dark"] [style*="color:#475569"] {
    color: #94a3b8 !important;
}

[data-theme="dark"] [style*="color: #334155"],
[data-theme="dark"] [style*="color:#334155"] {
    color: #cbd5e1 !important;
}

/* Learning Streak & Yellow/Cream Gradient Banners */
[data-theme="dark"] [style*="linear-gradient(135deg, #fffbeb"],
[data-theme="dark"] [style*="linear-gradient(135deg, #fef3c7 0%, #fcd34d"],
[data-theme="dark"] [style*="linear-gradient(135deg, #fef3c7, #fbbf24"] {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.08) 100%) !important;
    color: #fbbf24 !important;
}

/* Green gradient banners (Contributor dashboard) */
[data-theme="dark"] [style*="linear-gradient(135deg, #dcfce7"],
[data-theme="dark"] [style*="linear-gradient(135deg, #d1fae5"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%) !important;
}

/* Blue gradient banners */
[data-theme="dark"] [style*="linear-gradient(135deg, #dbeafe"],
[data-theme="dark"] [style*="linear-gradient(135deg, #e0e7ff 0%, #c7d2fe"] {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.08) 100%) !important;
}

/* Pink gradient lessons */
[data-theme="dark"] [style*="linear-gradient(135deg, #fce7f3"] {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(236, 72, 153, 0.08) 100%) !important;
}

/* Indigo gradient lessons */
[data-theme="dark"] [style*="linear-gradient(135deg, #e0e7ff, #6366f1"] {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.08) 100%) !important;
}

/* Icon backgrounds in stat-icon circles */
[data-theme="dark"] [style*="background: #dbeafe"] {
    background: rgba(37, 99, 235, 0.2) !important;
}

[data-theme="dark"] [style*="background: #d1fae5"] {
    background: rgba(5, 150, 105, 0.2) !important;
}

[data-theme="dark"] [style*="background: #fef3c7"] {
    background: rgba(245, 158, 11, 0.2) !important;
}

[data-theme="dark"] [style*="background: #cffafe"] {
    background: rgba(6, 182, 212, 0.2) !important;
}

[data-theme="dark"] [style*="background: #fce7f3"] {
    background: rgba(236, 72, 153, 0.2) !important;
}

[data-theme="dark"] [style*="background: #e0e7ff"] {
    background: rgba(99, 102, 241, 0.2) !important;
}

/* Progress bar backgrounds (e2e8f0 light gray) */
[data-theme="dark"] [style*="background: #e2e8f0"],
[data-theme="dark"] [style*="background:#e2e8f0"] {
    background: #334155 !important;
}

/* Border overrides for inline-styled borders */
[data-theme="dark"] [style*="border: 1px solid #e2e8f0"],
[data-theme="dark"] [style*="border:1px solid #e2e8f0"],
[data-theme="dark"] [style*="border: 1px solid #e8ecf1"] {
    border-color: #334155 !important;
}

/* ── Lesson Sort Buttons & Filter Buttons ── */
[data-theme="dark"] .lesson-sort-btn,
[data-theme="dark"] .btn-white {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .lesson-sort-btn:hover,
[data-theme="dark"] .btn-white:hover {
    background: #475569;
    color: #f1f5f9;
}

[data-theme="dark"] .lesson-sort-btn.active {
    background: var(--ll-primary);
    border-color: var(--ll-primary);
    color: #fff;
}

/* Lesson items */
[data-theme="dark"] .lesson-item {
    border-color: #334155;
}

/* ── Pagination ── */
[data-theme="dark"] .ll-pagination .page-link {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .ll-pagination .page-link:hover {
    background: #334155;
    border-color: var(--ll-primary);
    color: var(--ll-primary);
}

[data-theme="dark"] .ll-pagination .page-item.disabled .page-link {
    background: #0f172a;
    color: #475569;
    border-color: #1e293b;
}

[data-theme="dark"] .page-link {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .page-link:hover {
    background: #334155;
    color: #e2e8f0;
}

/* ── Stat icon backgrounds for dark mode ── */
[data-theme="dark"] .ll-stat-icon.success {
    background: rgba(5, 150, 105, 0.2);
}

[data-theme="dark"] .ll-stat-icon.warning {
    background: rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .ll-stat-icon.info {
    background: rgba(6, 182, 212, 0.2);
}

/* ── Card shadow overrides ── */
[data-theme="dark"] .shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* ── Badge overrides ── */
[data-theme="dark"] .badge {
    color: inherit;
}

/* ── List group ── */
[data-theme="dark"] .list-group-item,
[data-theme="dark"] .list-group-item-action {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .list-group-item-action:hover,
[data-theme="dark"] .list-group-item-action:focus {
    background: #334155;
    color: #f1f5f9;
}

/* ── Activity items ── */
[data-theme="dark"] .ll-activity-item {
    border-bottom-color: #334155;
}

[data-theme="dark"] .ll-table tr:hover td {
    background: #334155;
}

/* Mobile responsive search bar in dark mode */
@media (max-width: 991.98px) {
    [data-theme="dark"] .ll-repo-search-input {
        background: #334155;
        border-color: #475569;
    }
    [data-theme="dark"] .ll-repo-filter-select {
        border-color: #475569;
        background-color: #334155;
    }
}

/* ── Btn-outline in dark mode ── */
[data-theme="dark"] .ll-btn-outline {
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-btn-outline:hover {
    border-color: var(--ll-primary);
    color: var(--ll-primary);
}

/* ── FB create-post & filter pills ── */
[data-theme="dark"] .fb-create-post-input {
    background: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .fb-create-action {
    color: #94a3b8;
}

[data-theme="dark"] .fb-create-action:hover {
    background: #334155;
}

[data-theme="dark"] .fb-filter-pill {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .fb-filter-pill:hover {
    background: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .fb-filter-pill.active {
    background: var(--ll-primary);
    border-color: var(--ll-primary);
    color: #fff;
}

/* ── Scribd page thumbnail strips ── */
[data-theme="dark"] .ll-scribd-preview-strip {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .ll-scribd-page-thumb {
    border-color: #475569;
}

/* ══════════════════════════════════════════
   COMPREHENSIVE DARK MODE — ROUND 3
   Full system-wide inline style & class overrides
   ══════════════════════════════════════════ */

/* ── Inline text color overrides ── */
[data-theme="dark"] [style*="color: #0f172a"],
[data-theme="dark"] [style*="color:#0f172a"] {
    color: #f1f5f9 !important;
}

[data-theme="dark"] [style*="color: #92400e"],
[data-theme="dark"] [style*="color:#92400e"] {
    color: #fbbf24 !important;
}

[data-theme="dark"] [style*="color: #b45309"],
[data-theme="dark"] [style*="color:#b45309"] {
    color: #f59e0b !important;
}

[data-theme="dark"] [style*="color: #d97706"],
[data-theme="dark"] [style*="color:#d97706"] {
    color: #fbbf24 !important;
}

[data-theme="dark"] [style*="color: #f59e0b"],
[data-theme="dark"] [style*="color:#f59e0b"] {
    color: #fcd34d !important;
}

/* ── Additional background overrides ── */
[data-theme="dark"] [style*="background: #fafbfc"],
[data-theme="dark"] [style*="background:#fafbfc"] {
    background: #1e293b !important;
}

[data-theme="dark"] [style*="background-color: #f8fafc"],
[data-theme="dark"] [style*="background-color:#f8fafc"] {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

[data-theme="dark"] [style*="background-color: #f8f9fa"],
[data-theme="dark"] [style*="background-color:#f8f9fa"] {
    background-color: #1e293b !important;
}

[data-theme="dark"] [style*="background: #fee2e2"],
[data-theme="dark"] [style*="background:#fee2e2"] {
    background: rgba(239, 68, 68, 0.15) !important;
}

[data-theme="dark"] [style*="background: #fecaca"],
[data-theme="dark"] [style*="background:#fecaca"] {
    background: rgba(239, 68, 68, 0.2) !important;
}

/* ── Green gradient banners (contributor) ── */
[data-theme="dark"] [style*="linear-gradient(135deg, #dcfce7 0%, #86efac"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%) !important;
}

/* ── Settings: Google Books import card ── */
[data-theme="dark"] [style*="linear-gradient(135deg, #f8f9fa, #ffffff)"] {
    background: linear-gradient(135deg, #1e293b, #0f172a) !important;
}

[data-theme="dark"] [style*="border-left: 4px solid #4285F4"] {
    border-left-color: #60a5fa !important;
}

[data-theme="dark"] [style*="color: #4285F4"],
[data-theme="dark"] [style*="color:#4285F4"] {
    color: #60a5fa !important;
}

/* ── SVG stroke overrides for learning progress circles ── */
[data-theme="dark"] svg path[stroke="#e2e8f0"] {
    stroke: #334155 !important;
}

/* ── border-color overrides ── */
[data-theme="dark"] [style*="border-color: #e2e8f0"],
[data-theme="dark"] [style*="border-color:#e2e8f0"] {
    border-color: #334155 !important;
}

/* ── Card headers with bg-white class ── */
[data-theme="dark"] .ll-card-header.bg-white {
    background-color: #1e293b !important;
}

/* ── bg-white progress bars ── */
[data-theme="dark"] .progress.bg-white {
    background-color: #334155 !important;
}

/* ── text-dark used in badges & inline ── */
[data-theme="dark"] .badge.text-dark {
    color: #e2e8f0 !important;
}

/* ── Card header hover ── */
[data-theme="dark"] .hover-shadow:hover,
[data-theme="dark"] .hover-scale:hover {
    border-color: #475569 !important;
}

/* ── Upload page: dropzone & file preview ── */
[data-theme="dark"] .ll-dropzone {
    background: #1e293b;
    border-color: #475569;
}

[data-theme="dark"] .ll-dropzone:hover,
[data-theme="dark"] .ll-dropzone.dragover {
    border-color: var(--ll-primary);
    background: rgba(59, 125, 216, 0.08);
}

[data-theme="dark"] .ll-dropzone.has-file {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

[data-theme="dark"] .ll-file-preview {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .ll-tag-picker {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-tag-picker:focus-within {
    border-color: var(--ll-primary);
}

[data-theme="dark"] .ll-tag-token {
    background: rgba(59, 125, 216, 0.2);
    color: #93c5fd;
}

[data-theme="dark"] .ll-tag-input {
    color: #e2e8f0;
}

[data-theme="dark"] .ll-progress-bar {
    background: #334155;
}

/* ── Reports: chart legend dots (these are fine — saturated colors on dark bg) ── */

/* ── ReadingHistory: streak section ── */
[data-theme="dark"] .progress.bg-light {
    background-color: #334155 !important;
}

/* ── Tag page: avatar with white text on dynamic bg ── */
[data-theme="dark"] [style*="color: #fff; font-weight: 600; font-size: .85rem"] {
    color: #fff !important;
}

/* ── Users page: soft red status backgrounds ── */
[data-theme="dark"] [style*="background: #fee2e2; color: #ef4444"],
[data-theme="dark"] [style*="background:#fee2e2;color:#ef4444"] {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

/* ── card body used in toast notifications ── */
[data-theme="dark"] .ll-card-body[style*="background: #fff"] {
    background: #1e293b !important;
}

/* ── Category autocomplete suggestions ── */
[data-theme="dark"] .ll-cat-suggestions {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .ll-cat-suggestion-item:hover {
    background: #334155;
}

/* ── Content gaps / hot topics cards in BestPractices ── */
[data-theme="dark"] .p-3.border.rounded.text-center.bg-light {
    background-color: #334155 !important;
    border-color: #475569 !important;
}

[data-theme="dark"] .p-3.border.rounded.text-center.bg-light h6.text-dark {
    color: #e2e8f0 !important;
}

/* ── Continue reading progress track in BestPractices ── */
[data-theme="dark"] [style*="height: 6px; background: #e2e8f0"] {
    background: #334155 !important;
}

/* ── Recommended & Bookmark list items ── */
[data-theme="dark"] .list-group-item.hover-scale[style*="background: #fff"],
[data-theme="dark"] a.list-group-item[style*="background: #fff"] {
    background: #1e293b !important;
    border-color: #334155 !important;
}

/* ── General border-dashed empty states ── */
[data-theme="dark"] .border-dashed {
    border-color: #475569 !important;
}

/* ── alert-warning dark mode ── */
[data-theme="dark"] .alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

/* ── Rejection modal: header & icon backgrounds ── */
[data-theme="dark"] .modal-header[style*="background: #fee2e2"] {
    background: rgba(239, 68, 68, 0.15) !important;
}

[data-theme="dark"] [style*="background: #fecaca; border-radius: 50%"] {
    background: rgba(239, 68, 68, 0.25) !important;
}

/* ── Modal footer border ── */
[data-theme="dark"] .modal-footer {
    border-top-color: #334155;
}

/* ── form-label in dark mode ── */
[data-theme="dark"] .form-label,
[data-theme="dark"] .ll-form-label {
    color: #e2e8f0;
}

/* ── input-group ── */
[data-theme="dark"] .input-group-text {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}

/* ── card with text-decoration-none text-dark wrapper ── */
[data-theme="dark"] a.text-dark {
    color: #e2e8f0 !important;
}

/* ── border-bottom on items ── */
[data-theme="dark"] .p-3.border-bottom {
    border-bottom-color: #334155 !important;
}

/* ── Breadcrumb text ── */
[data-theme="dark"] .breadcrumb-item,
[data-theme="dark"] .breadcrumb-item.active {
    color: #94a3b8;
}

/* ── hover-shadow boxes in BestPractices ── */
[data-theme="dark"] .d-flex.gap-3.p-3.border.rounded.hover-shadow,
[data-theme="dark"] .d-flex.gap-3.p-3.border.rounded {
    border-color: #334155 !important;
    background: #0f172a;
}

[data-theme="dark"] .d-flex.gap-3.p-3.border.rounded.hover-shadow:hover,
[data-theme="dark"] .d-flex.gap-3.p-3.border.rounded:hover {
    background: #1e293b;
    border-color: #475569 !important;
}

/* ── Users page: profile card linear gradient avatar ── */
[data-theme="dark"] [style*="background: linear-gradient(135deg, #0d6efd, #0a58ca)"] {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
}

/* ── History filter buttons ── */
[data-theme="dark"] .history-filter-btn {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .history-filter-btn:hover {
    background: #475569;
    color: #f1f5f9;
}

[data-theme="dark"] .history-filter-btn.active {
    background: var(--ll-primary);
    border-color: var(--ll-primary);
    color: #fff;
}

/* ── Card with border-left accent ── */
[data-theme="dark"] .ll-card[style*="border-left: 4px solid"] {
    background: #1e293b;
    border-color: #334155;
}

/* ── border on p-3, bg-light rounded stats ── */
[data-theme="dark"] .p-3.bg-light.rounded {
    background-color: #0f172a !important;
    border-color: #334155;
}

/* ── Disabled form controls in Upload ── */
[data-theme="dark"] #accessDurationDate:disabled {
    background-color: #1e293b !important;
}

/* ── card-body py-3 text-center in BestPractices (quick stats) ── */
[data-theme="dark"] .ll-card-body.py-3.text-center .fs-3.fw-bold {
    color: inherit;
}

/* ── accordion within settings ── */
[data-theme="dark"] .accordion-item {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .accordion-button {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
    background: #0f172a;
    color: #f1f5f9;
}

[data-theme="dark"] .accordion-body {
    background: #1e293b;
}

/* ── card-text & misc ── */
[data-theme="dark"] .card-text,
[data-theme="dark"] .card-body,
[data-theme="dark"] .card {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

/* ── ResourceDetail: external link box ── */
[data-theme="dark"] [style*="background:linear-gradient(135deg,#3b82f6,#2563eb)"] {
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.15) !important;
}

/* ── Version notes bg-light ── */
[data-theme="dark"] .small.bg-light.p-2.rounded {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .small.bg-light.p-2.rounded.mt-1 {
    background-color: #0f172a !important;
}

/* ── Contributor stat accent cards ── */
.ll-stat-accent-card {
    background-color: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="dark"] .ll-stat-accent-card {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .ll-tip-icon[style*="background: #dbeafe"] {
    background: rgba(37, 99, 235, 0.2) !important;
}

[data-theme="dark"] .ll-tip-icon[style*="background: #d1fae5"] {
    background: rgba(5, 150, 105, 0.2) !important;
}

[data-theme="dark"] .ll-tip-icon[style*="background: #fef3c7"] {
    background: rgba(245, 158, 11, 0.2) !important;
}

/* ── Bootstrap .progress track ── */
[data-theme="dark"] .progress {
    background-color: #334155;
}

/* ── border-light in dark mode ── */
[data-theme="dark"] .border-light {
    border-color: #334155 !important;
}

/* ── Selection/highlight colors ── */
[data-theme="dark"] ::selection {
    background: rgba(59, 125, 216, 0.3);
    color: #f1f5f9;
}

/* ── table-bordered ── */
[data-theme="dark"] .table-bordered {
    border-color: #334155;
}

[data-theme="dark"] .table-bordered > :not(caption) > * > * {
    border-color: #334155;
}

/* ── popover ── */
[data-theme="dark"] .popover {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .popover-body {
    color: #e2e8f0;
}

/* ── tooltip ── */
[data-theme="dark"] .tooltip-inner {
    background: #0f172a;
}

/* ══════════════════════════════════════════
   COMPREHENSIVE DARK MODE — ROUND 4
   Tables, reader layout, auth pages, final gaps
   ══════════════════════════════════════════ */

/* ── Generic Bootstrap table headers (not just .ll-table) ── */
[data-theme="dark"] .table thead th,
[data-theme="dark"] .table > thead {
    background-color: #0f172a;
    color: #94a3b8;
    border-color: #334155;
}

[data-theme="dark"] .table tbody td {
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .table > :not(caption) > * > * {
    border-bottom-color: #334155;
}

/* ── Reader hero section (white bg → dark) ── */
[data-theme="dark"] .ll-reader-hero {
    background: #1e293b;
    border-color: #334155;
}

/* ── Reader panel title color ── */
[data-theme="dark"] .ll-reader-panel-title {
    color: #94a3b8;
}

/* ── Reader sidebar scrollbar ── */
[data-theme="dark"] .ll-reader-left,
[data-theme="dark"] .ll-reader-right {
    scrollbar-color: #475569 transparent;
}

[data-theme="dark"] .ll-reader-left::-webkit-scrollbar-thumb,
[data-theme="dark"] .ll-reader-right::-webkit-scrollbar-thumb {
    background: #475569;
}

/* ── Auth pages ── */
[data-theme="dark"] .ll-auth-header {
    background: #0f172a;
    border-bottom-color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .ll-auth-body,
[data-theme="dark"] .ll-auth-wrapper {
    background: #0f172a;
}

[data-theme="dark"] .ll-auth-right {
    background: #0f172a;
}

[data-theme="dark"] .ll-auth-form-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .ll-auth-form-title {
    color: #f1f5f9;
}

[data-theme="dark"] .ll-auth-form-subtitle {
    color: #94a3b8;
}

[data-theme="dark"] .ll-auth-nav-link {
    color: #94a3b8;
}

[data-theme="dark"] .ll-auth-nav-link:hover {
    color: var(--ll-primary);
}

[data-theme="dark"] .ll-auth-input-group .form-control,
[data-theme="dark"] .ll-auth-input-group .form-select {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .ll-auth-input-icon {
    color: #64748b;
}

/* ── Modal header & title ── */
[data-theme="dark"] .modal-header {
    border-bottom-color: #334155;
    background: #1e293b;
    color: #f1f5f9;
}

[data-theme="dark"] .modal-title {
    color: #f1f5f9;
}

/* ── Form check / radio / switch ── */
[data-theme="dark"] .form-check-label {
    color: #e2e8f0;
}

[data-theme="dark"] .form-check-input {
    background-color: #334155;
    border-color: #475569;
}

[data-theme="dark"] .form-check-input:checked {
    background-color: var(--ll-primary);
    border-color: var(--ll-primary);
}

/* ── Inline "background: white" (word, not hex) ── */
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background:white"] {
    background: #1e293b !important;
}

/* ── btn-warning with text-dark: preserve dark text on yellow bg ── */
[data-theme="dark"] .btn-warning.text-dark {
    color: #1e293b !important;
}

/* ── Badge + bg-light combinations ── */
[data-theme="dark"] .badge.bg-light {
    background-color: #334155 !important;
}

[data-theme="dark"] .badge.bg-light.text-dark {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
}

/* ── Index.cshtml: public page section text on bg-white override ── */
[data-theme="dark"] section.bg-white {
    background-color: #0f172a !important;
}

[data-theme="dark"] section.bg-white .display-6,
[data-theme="dark"] section.bg-white h2,
[data-theme="dark"] section.bg-white h5 {
    color: #f1f5f9;
}

/* ── Index.cshtml: #f8fafc section background ── */
[data-theme="dark"] section[style*="background: #f8fafc"] {
    background: #0f172a !important;
}

/* ── Reader description color ── */
[data-theme="dark"] .ll-reader-description {
    color: #94a3b8;
}

/* ── Inline background #fffbeb (light yellow) ── */
[data-theme="dark"] [style*="background: #fffbeb"],
[data-theme="dark"] [style*="background:#fffbeb"],
[data-theme="dark"] [style*="linear-gradient(135deg, #fffbeb"] {
    background: rgba(245, 158, 11, 0.1) !important;
}

/* ── btn-outline-primary on auth pages ── */
[data-theme="dark"] .btn-outline-primary {
    border-color: var(--ll-primary);
    color: var(--ll-primary);
}

[data-theme="dark"] .btn-outline-primary:hover {
    background: var(--ll-primary);
    border-color: var(--ll-primary);
    color: #fff;
}

/* ── Lesson content text ── */
[data-theme="dark"] .text-dark.mb-0.fs-6 {
    color: #e2e8f0 !important;
}

/* ── Comment section borders ── */
[data-theme="dark"] .comment-item {
    border-color: #334155;
}

/* ── Version history section ── */
[data-theme="dark"] .version-item {
    border-color: #334155;
}

/* ── Register inline bg #fef3c7 circle ── */
[data-theme="dark"] [style*="background: #fef3c7"],
[data-theme="dark"] [style*="background:#fef3c7"] {
    background: rgba(245, 158, 11, 0.2) !important;
}

/* ═══════════════════════════════════════════════════════
   ADDITIONAL DARK MODE FIXES (100% COVERAGE)
   ═══════════════════════════════════════════════════════ */

/* Modals */
[data-theme="dark"] .modal-content {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: #334155 !important;
    background: #1e293b !important;
}

/* Hard-coded background overrides for modals and their elements */
[data-theme="dark"] [style*="background: #fee2e2"],
[data-theme="dark"] [style*="background:#fee2e2"] {
    background: rgba(239, 68, 68, 0.15) !important;
}
[data-theme="dark"] [style*="background: #fecaca"],
[data-theme="dark"] [style*="background:#fecaca"] {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: transparent !important;
}

/* Resource Preview Modal (Scribd-style) from Pasted Image 6 */
[data-theme="dark"] .ll-preview-modal {
    background: #0f172a !important;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5) !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .ll-review-window {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}
[data-theme="dark"] .ll-review-window.previewed {
    background: rgba(16, 185, 129, 0.16);
    color: #86efac;
}
[data-theme="dark"] .ll-review-window.urgent {
    background: rgba(249, 115, 22, 0.18);
    color: #fdba74;
}
[data-theme="dark"] .ll-preview-content {
    background: #0f172a !important;
}
[data-theme="dark"] .ll-preview-close {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .ll-preview-close:hover {
    background: #334155 !important;
    color: #f1f5f9 !important;
}
[data-theme="dark"] .ll-scribd-title,
[data-theme="dark"] .ll-scribd-uploader,
[data-theme="dark"] .ll-scribd-desc-full,
[data-theme="dark"] #previewTitle,
[data-theme="dark"] #previewUploader strong,
[data-theme="dark"] #previewDesc {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .ll-scribd-stat {
    color: #94a3b8 !important;
}
[data-theme="dark"] .ll-scribd-file-row {
    color: #94a3b8 !important;
    border-bottom-color: #334155 !important;
}
[data-theme="dark"] .ll-scribd-read-btn {
    background: var(--ll-primary) !important;
    color: #fff !important;
}
[data-theme="dark"] .ll-scribd-save-btn {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .ll-scribd-save-btn:hover {
    background: #334155 !important;
}
[data-theme="dark"] .ll-repo-card, 
[data-theme="dark"] .ll-resource-card {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .ll-repo-card-title,
[data-theme="dark"] .ll-resource-title {
    color: #f8fafc !important;
}
[data-theme="dark"] .ll-repo-card-body,
[data-theme="dark"] .ll-resource-content {
    background: none !important;
}
[data-theme="dark"] .ll-repo-carousel-arrow {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}

/* Headers and Navigation consistency */
[data-theme="dark"] .ll-header {
    background: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
}
[data-theme="dark"] .ll-sidebar-brand {
    border-bottom-color: #334155 !important;
}
[data-theme="dark"] .ll-page-title {
    color: #f8fafc !important;
}

/* Background fix for hard-coded whites missing overrides */
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background:#ffffff"] {
    background-color: #1e293b !important;
}
[data-theme="dark"] [style*="background: #f8f9fc"],
[data-theme="dark"] [style*="background:#f8f9fc"] {
    background-color: #0f172a !important;
}

/* Table overrides and borders ensuring contrast (Pasted Image 7) */
[data-theme="dark"] th,
[data-theme="dark"] .table th,
[data-theme="dark"] .ll-table th,
[data-theme="dark"] .ll-table thead th {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
    border-bottom-color: #475569 !important;
}
[data-theme="dark"] td,
[data-theme="dark"] .table td,
[data-theme="dark"] .ll-table td {
    background-color: transparent !important;
    border-color: #334155 !important;
    border-bottom-color: #334155 !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .ll-table tr {
    border-color: #334155 !important;
}
[data-theme="dark"] .table-light {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
}

/* Fix table inline border #e2e8f0 */
[data-theme="dark"] [style*="border: 1px solid #e2e8f0"],
[data-theme="dark"] [style*="border:1px solid #e2e8f0"] {
    border-color: #334155 !important;
}

/* Base outline buttons staying white (Action / Clear Buttons UI) */
[data-theme="dark"] .ll-btn-outline {
    background-color: transparent !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .ll-btn-outline:hover {
    background-color: #334155 !important;
    border-color: #64748b !important;
    color: #fff !important;
}

/* Forms & Text inputs */
[data-theme="dark"] .ll-form-control,
[data-theme="dark"] .ll-search-box input {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .ll-search-box input:focus {
    background-color: #1e293b !important;
}
[data-theme="dark"] .form-control {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}
[data-theme="dark"] .form-select {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}
[data-theme="dark"] option,
[data-theme="dark"] select option,
[data-theme="dark"] .form-select option,
[data-theme="dark"] .ll-form-select option {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] option:checked,
[data-theme="dark"] select option:checked,
[data-theme="dark"] .form-select option:checked,
[data-theme="dark"] .ll-form-select option:checked {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}
[data-theme="dark"] option:hover,
[data-theme="dark"] select option:hover,
[data-theme="dark"] .form-select option:hover,
[data-theme="dark"] .ll-form-select option:hover {
    background-color: #475569 !important;
    color: #f1f5f9 !important;
}
[data-theme="dark"] .form-select option:disabled {
    color: #64748b !important;
}
[data-theme="dark"] .input-group .btn-outline-secondary {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}
[data-theme="dark"] .input-group .btn-outline-secondary:hover {
    background: #475569;
    color: #e2e8f0;
}

/* Placeholder Contrast Fix */
[data-theme="dark"] .ll-search-box input::placeholder,
[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] .ll-form-control::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

/* Resource Detail page (Scribd-style reader) */
[data-theme="dark"] .ll-reader-layout,
[data-theme="dark"] .ll-reader-main {
    background: #0f172a !important;
}
[data-theme="dark"] .ll-reader-sidebar-left,
[data-theme="dark"] .ll-reader-sidebar-right {
    background: #1e293b !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .ll-reader-meta-title {
    color: #f8fafc !important;
}
[data-theme="dark"] .ll-reader-action-btn {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .ll-reader-action-btn:hover {
    background: #475569 !important;
    color: #f1f5f9 !important;
}
[data-theme="dark"] .ll-reader-related-card:hover {
    background: #334155 !important;
}
[data-theme="dark"] .ll-reader-related-info h6 {
    color: #e2e8f0 !important;
}
[data-theme="dark"] .ll-reader-meta-desc {
    color: #cbd5e1 !important;
}

/* Text visibility tweaks */
[data-theme="dark"] p.text-muted,
[data-theme="dark"] div.text-muted,
[data-theme="dark"] span.text-muted,
[data-theme="dark"] a.text-muted,
[data-theme="dark"] .text-secondary {
    color: #94a3b8 !important;
}
[data-theme="dark"] small,
[data-theme="dark"] .small {
    color: #94a3b8 !important;
}
[data-theme="dark"] .fw-medium,
[data-theme="dark"] .fw-normal,
[data-theme="dark"] .fw-light,
[data-theme="dark"] .fw-bold,
[data-theme="dark"] i.bi {
    color: inherit;
}
[data-theme="dark"] .text-dark {
    color: #f8fafc !important;
}

/* Knowledge Sharing Portal: Inline / Black text stripping */
[data-theme="dark"] .fb-post-content,
[data-theme="dark"] .fb-post-content * {
    color: #e2e8f0;
}
[data-theme="dark"] [style*="color: #000"],
[data-theme="dark"] [style*="color: black"],
[data-theme="dark"] [style*="color:#000"],
[data-theme="dark"] [style*="color: rgb(0, 0, 0)"],
[data-theme="dark"] [style*="color: #343a40"],
[data-theme="dark"] [style*="color:#343a40"],
[data-theme="dark"] [style*="color: rgb(33, 37, 41)"] {
    color: #e2e8f0 !important;
}

/* Notification list */
[data-theme="dark"] .notif-item {
    border-color: #334155 !important;
    background: #1e293b !important;
}
[data-theme="dark"] .notif-item:hover {
    background: #334155 !important;
}
[data-theme="dark"] [style*="background: #f8fafc"],
[data-theme="dark"] [style*="background:#f8fafc"] {
    background-color: #334155 !important;
}

