/* Global Theme System */

/* Light Theme (Default) */
:root,
[data-theme="light"] {
    --theme-bg: #F8F9FA;
    --theme-card-bg: #FFFFFF;
    --theme-border: #E8EAED;
    --theme-text-primary: #202124;
    --theme-text-secondary: #5F6368;
    --theme-text-tertiary: #80868B;
    --theme-primary: #1a73e8;
    --theme-primary-hover: #1557b0;
    --theme-shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
    --theme-hover-bg: #f8f9fa;
}

/* Dark Theme */
[data-theme="dark"],
.dark-mode {
    --theme-bg: #202124;
    --theme-card-bg: #303134;
    --theme-border: #5f6368;
    --theme-text-primary: #e8eaed;
    --theme-text-secondary: #bdc1c6;
    --theme-text-tertiary: #9aa0a6;
    --theme-primary: #8ab4f8;
    --theme-primary-hover: #aecbfa;
    --theme-shadow: 0 1px 2px 0 rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15);
    --theme-hover-bg: #3c4043;
}

/* Paper Theme */
[data-theme="paper"],
.paper-mode {
    --theme-bg: #F5F1E8;
    --theme-card-bg: #FEFCF7;
    --theme-border: #D4C5A9;
    --theme-text-primary: #5C4A37;
    --theme-text-secondary: #8B7355;
    --theme-text-tertiary: #A68B5B;
    --theme-primary: #8B6F47;
    --theme-primary-hover: #6B5637;
    --theme-shadow: 0 2px 4px rgba(92, 74, 55, 0.1), 0 1px 2px rgba(92, 74, 55, 0.08);
    --theme-hover-bg: #F0E8D8;
}

/* Apply theme variables globally */
body {
    background-color: var(--theme-bg);
    color: var(--theme-text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Paper theme specific background pattern */
[data-theme="paper"] body,
.paper-mode body {
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(92, 74, 55, 0.02) 2px,
            rgba(92, 74, 55, 0.02) 4px
        );
}

/* Update dashboard container */
.dashboard-container {
    background: var(--theme-bg);
    color: var(--theme-text-primary);
}

/* Update cards */
.stat-card,
.chart-card,
.filters-section,
.users-table-container,
.notifications-list,
.settings-form,
.notification-item-page,
.paper-card,
.subject-card {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
    box-shadow: var(--theme-shadow);
}

/* Update text colors */
h1, h2, h3, h4, h5, h6,
.user-name,
.notification-title-page,
.notification-title,
.stat-value,
.table-title {
    color: var(--theme-text-primary);
}

.user-email,
.notification-message-page,
.notification-desc,
.stat-label,
.date-text,
.form-text {
    color: var(--theme-text-secondary);
}

/* Update borders */
.top-nav,
.sidebar,
.users-table th,
.users-table td,
.notification-item-page,
.pagination-container {
    border-color: var(--theme-border);
}

/* Update hover states */
.users-table tbody tr:hover,
.notification-item-page:hover,
.theme-option:hover .theme-preview {
    background: var(--theme-hover-bg);
}

/* Update primary buttons and links */
.btn-primary,
.btn-filter,
.mark-all-read-btn,
.pagination-btn.active {
    background: var(--theme-primary);
    color: white;
}

.btn-primary:hover,
.btn-filter:hover,
.mark-all-read-btn:hover {
    background: var(--theme-primary-hover);
}

/* Update input fields */
.filter-input,
.filter-select,
.form-group input,
.form-group select {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.filter-input:focus,
.filter-select:focus,
.form-group input:focus,
.form-group select:focus {
    border-color: var(--theme-primary);
}

/* Update dropdowns */
.dropdown-menu {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    box-shadow: var(--theme-shadow);
}

.dropdown-item {
    color: var(--theme-text-primary);
}

.dropdown-item:hover {
    background: var(--theme-hover-bg);
}

/* Update top navigation */
.top-nav {
    background: var(--theme-card-bg);
    border-bottom-color: var(--theme-border);
    box-shadow: var(--theme-shadow);
}

/* Update sidebar */
.sidebar {
    background: var(--theme-card-bg);
    border-right-color: var(--theme-border);
}

.menu-item {
    color: var(--theme-text-primary);
}

.menu-item:hover,
.menu-item.active {
    background: var(--theme-hover-bg);
    color: var(--theme-primary);
}

/* Update breadcrumbs */
.breadcrumb-link,
.breadcrumb-text {
    color: var(--theme-text-secondary);
}

.breadcrumb-link:hover {
    color: var(--theme-primary);
}

/* Update search bars */
.top-nav-search input,
.search-filter-bar input {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

/* Update badges */
.status-badge.completed {
    background: rgba(52, 168, 83, 0.1);
    color: #34a853;
}

.status-badge.pending {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

/* Paper theme specific adjustments */
[data-theme="paper"] .stat-card,
[data-theme="paper"] .chart-card,
[data-theme="paper"] .settings-form,
.paper-mode .stat-card,
.paper-mode .chart-card,
.paper-mode .settings-form {
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-border);
    box-shadow: 
        0 2px 4px rgba(92, 74, 55, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

[data-theme="paper"] .notification-item-page.unread,
.paper-mode .notification-item-page.unread {
    background: #F0E8D8;
    border-left: 4px solid var(--theme-primary);
}

[data-theme="paper"] .notification-item-page.unread:hover,
.paper-mode .notification-item-page.unread:hover {
    background: #E8DDC8;
}

/* Dark theme specific adjustments */
[data-theme="dark"] .notification-item-page.unread,
.dark-mode .notification-item-page.unread {
    background: #3c4043;
    border-left: 4px solid var(--theme-primary);
}

[data-theme="dark"] .notification-item-page.unread:hover,
.dark-mode .notification-item-page.unread:hover {
    background: #424548;
}

/* Apply themes to all common elements */
a {
    color: var(--theme-primary);
}

a:hover {
    color: var(--theme-primary-hover);
}

/* Update buttons */
button,
.btn {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Update form elements globally */
input,
textarea,
select {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Update code blocks if any */
code,
pre {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}



/* Header theme support */
.header {
    background: var(--theme-card-bg);
    border-bottom-color: var(--theme-border);
}

/* Paper theme background pattern for body */
[data-theme="paper"] body,
.paper-mode body {
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(92, 74, 55, 0.02) 2px,
            rgba(92, 74, 55, 0.02) 4px
        );
}

/* ============================================
   MARKETPLACE COMPONENTS
   ============================================ */

/* Product Detail Page */
.product-main-section,
.product-details-section,
.related-products-section,
.product-info-main {
    color: var(--theme-text-primary);
}

.product-title,
.product-title-section,
.section-title {
    color: var(--theme-text-primary);
    border-color: var(--theme-border);
}

.product-category-badge {
    background: rgba(26, 115, 232, 0.1);
    color: var(--theme-primary);
}

[data-theme="dark"] .product-category-badge,
.dark-mode .product-category-badge {
    background: rgba(138, 180, 248, 0.2);
    color: var(--theme-primary);
}

[data-theme="paper"] .product-category-badge,
.paper-mode .product-category-badge {
    background: rgba(139, 111, 71, 0.15);
    color: var(--theme-primary);
}

.price-section,
.price-main,
.price-current,
.price-currency {
    border-color: var(--theme-border);
}

.price-current,
.price-currency {
    color: #ea4335;
}

[data-theme="dark"] .price-current,
[data-theme="dark"] .price-currency,
.dark-mode .price-current,
.dark-mode .price-currency {
    color: #f28b82;
}

[data-theme="paper"] .price-current,
[data-theme="paper"] .price-currency,
.paper-mode .price-current,
.paper-mode .price-currency {
    color: #c85a3a;
}

.main-image-container {
    background: var(--theme-bg);
    border-color: var(--theme-border);
}

.product-highlights {
    background: var(--theme-bg);
    border-color: var(--theme-border);
}

.highlights-title {
    color: var(--theme-text-primary);
}

.highlight-item {
    color: var(--theme-text-secondary);
}

.quantity-section,
.quantity-label,
.quantity-controls,
.quantity-input-wrapper {
    color: var(--theme-text-primary);
}

.quantity-btn {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.quantity-btn:hover {
    background: var(--theme-hover-bg);
    border-color: var(--theme-primary);
}

.quantity-input {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.quantity-input-wrapper {
    border-color: var(--theme-border);
}

.action-buttons-section {
    border-color: var(--theme-border);
}

.btn-primary-action,
.btn-secondary-action {
    background: var(--theme-primary);
    color: white;
    border-color: var(--theme-primary);
}

.btn-primary-action:hover,
.btn-secondary-action:hover {
    background: var(--theme-primary-hover);
    border-color: var(--theme-primary-hover);
}

.btn-secondary-action.green {
    background: #34a853;
    border-color: #34a853;
}

.btn-secondary-action.green:hover {
    background: #2d8f47;
    border-color: #2d8f47;
}

.btn-cart-icon {
    background: #34a853;
    color: white;
    border: none;
}

.btn-cart-icon:hover {
    background: #2d8f47;
}

.btn-cart-icon .cart-badge {
    border-color: var(--theme-card-bg);
}

.btn-primary-action:disabled {
    background: var(--theme-bg);
    color: var(--theme-text-tertiary);
    border-color: var(--theme-border);
    cursor: not-allowed;
}

.btn-secondary-action {
    background: var(--theme-card-bg);
    border-color: #34a853;
    color: #34a853;
}

.btn-secondary-action:hover {
    background: rgba(52, 168, 83, 0.1);
}

.contact-info-title {
    color: var(--theme-text-primary);
}

/* Product Details Tabs */
.details-tabs {
    border-color: var(--theme-border);
}

.details-tab {
    color: var(--theme-text-secondary);
}

.details-tab:hover {
    color: var(--theme-text-primary);
    background: var(--theme-hover-bg);
}

.details-tab.active {
    color: var(--theme-primary);
    border-bottom-color: var(--theme-primary);
}

.tab-content {
    color: var(--theme-text-primary);
}

.description-content {
    color: var(--theme-text-primary);
}

.specifications-table {
    border-color: var(--theme-border);
}

.spec-row {
    border-color: var(--theme-border);
}

.spec-label {
    background: var(--theme-bg);
    color: var(--theme-text-secondary);
}

.spec-value {
    color: var(--theme-text-primary);
}

/* Related Products */
.related-products-section {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    box-shadow: var(--theme-shadow);
}

.related-product-image {
    background: var(--theme-bg);
}

.related-product-name {
    color: var(--theme-text-primary);
}

.related-product-price {
    color: #ea4335;
}

[data-theme="dark"] .related-product-price,
.dark-mode .related-product-price {
    color: #f28b82;
}

[data-theme="paper"] .related-product-price,
.paper-mode .related-product-price {
    color: #c85a3a;
}

.contact-phone {
    color: var(--theme-primary);
}

.related-product-card {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.related-product-card:hover {
    border-color: var(--theme-primary);
    box-shadow: var(--theme-shadow);
}

.cart-header {
    background: var(--theme-bg);
    border-color: var(--theme-border);
}

.cart-header h2 {
    color: var(--theme-text-primary);
}

.cart-item {
    border-color: var(--theme-border);
    background: var(--theme-card-bg);
}

.cart-item:hover {
    background: var(--theme-hover-bg);
}

.cart-item-image {
    background: var(--theme-bg);
    border-color: var(--theme-border);
}

.cart-item-name,
.cart-item-name a {
    color: var(--theme-text-primary);
}

.cart-item-name a:hover {
    color: var(--theme-primary);
}

.cart-item-category {
    color: var(--theme-text-secondary);
}

.cart-item-price {
    color: #ea4335;
}

[data-theme="dark"] .cart-item-price,
.dark-mode .cart-item-price {
    color: #f28b82;
}

[data-theme="paper"] .cart-item-price,
.paper-mode .cart-item-price {
    color: #c85a3a;
}

.summary-row:last-of-type .summary-value {
    color: #ea4335;
}

[data-theme="dark"] .summary-row:last-of-type .summary-value,
.dark-mode .summary-row:last-of-type .summary-value {
    color: #f28b82;
}

[data-theme="paper"] .summary-row:last-of-type .summary-value,
.paper-mode .summary-row:last-of-type .summary-value {
    color: #c85a3a;
}

.cart-summary-title,
.summary-row-label,
.summary-row-value {
    color: var(--theme-text-primary);
    border-color: var(--theme-border);
}

.summary-row-label {
    color: var(--theme-text-secondary);
}

.summary-total-label,
.summary-total-value {
    color: var(--theme-text-primary);
    border-color: var(--theme-border);
}

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

.btn-checkout:hover {
    background: var(--theme-primary-hover);
}

.empty-cart {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    box-shadow: var(--theme-shadow);
    color: var(--theme-text-primary);
}

.empty-cart svg {
    color: var(--theme-text-tertiary);
}

.empty-cart h3 {
    color: var(--theme-text-primary);
}

.empty-cart p {
    color: var(--theme-text-secondary);
}

.btn-continue-shopping {
    background: var(--theme-primary);
    color: white;
}

.btn-continue-shopping:hover {
    background: var(--theme-primary-hover);
}



.order-items-title,
.order-item,
.item-name,
.item-price {
    color: var(--theme-text-primary);
    border-color: var(--theme-border);
}

.item-details {
    color: var(--theme-text-secondary);
}

.total-row,
.total-label,
.total-value {
    color: var(--theme-text-primary);
    border-color: var(--theme-border);
}

.total-label {
    color: var(--theme-text-secondary);
}

.btn-submit-order {
    background: var(--theme-primary);
    color: white;
}

.btn-submit-order:hover {
    background: var(--theme-primary-hover);
}

.order-header,
.order-info,
.order-number,
.order-date {
    color: var(--theme-text-primary);
    border-color: var(--theme-border);
}

.order-date {
    color: var(--theme-text-secondary);
}

.order-status.pending {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

[data-theme="dark"] .order-status.pending,
.dark-mode .order-status.pending {
    background: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
}

[data-theme="paper"] .order-status.pending,
.paper-mode .order-status.pending {
    background: rgba(255, 152, 0, 0.15);
    color: #e68900;
}

.order-status.confirmed {
    background: rgba(52, 168, 83, 0.1);
    color: #34a853;
}

[data-theme="dark"] .order-status.confirmed,
.dark-mode .order-status.confirmed {
    background: rgba(52, 168, 83, 0.2);
    color: #66bb6a;
}

[data-theme="paper"] .order-status.confirmed,
.paper-mode .order-status.confirmed {
    background: rgba(52, 168, 83, 0.15);
    color: #2e7d32;
}

.order-status.cancelled {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

[data-theme="dark"] .order-status.cancelled,
.dark-mode .order-status.cancelled {
    background: rgba(244, 67, 54, 0.2);
    color: #e57373;
}

[data-theme="paper"] .order-status.cancelled,
.paper-mode .order-status.cancelled {
    background: rgba(244, 67, 54, 0.15);
    color: #c62828;
}

.order-item-summary,
.order-item-name,
.order-item-price {
    color: var(--theme-text-primary);
}

.order-item-quantity {
    color: var(--theme-text-secondary);
}

.view-order-btn {
    background: var(--theme-primary);
    color: white;
}

.view-order-btn:hover {
    background: var(--theme-primary-hover);
}

/* ============================================
   PROFILE AND SETTINGS FORMS
   ============================================ */

.settings-section,
.settings-section h2,
.settings-section h3 {
    color: var(--theme-text-primary);
    border-color: var(--theme-border);
}

.settings-form,
#profileForm,
#preferencesForm {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    box-shadow: var(--theme-shadow);
    color: var(--theme-text-primary);
}

.form-group label {
    color: var(--theme-text-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .form-group select:focus,
.dark-mode .form-group input:focus,
.dark-mode .form-group textarea:focus,
.dark-mode .form-group select:focus {
    box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
}

[data-theme="paper"] .form-group input:focus,
[data-theme="paper"] .form-group textarea:focus,
[data-theme="paper"] .form-group select:focus,
.paper-mode .form-group input:focus,
.paper-mode .form-group textarea:focus,
.paper-mode .form-group select:focus {
    box-shadow: 0 0 0 2px rgba(139, 111, 71, 0.2);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: var(--theme-bg);
    color: var(--theme-text-tertiary);
    cursor: not-allowed;
}

/* ============================================
   ADDITIONAL COMPONENTS
   ============================================ */

/* Stock Status */
.stock-status.in-stock {
    background: rgba(52, 168, 83, 0.1);
    color: #34a853;
}

[data-theme="dark"] .stock-status.in-stock,
.dark-mode .stock-status.in-stock {
    background: rgba(52, 168, 83, 0.2);
    color: #66bb6a;
}

[data-theme="paper"] .stock-status.in-stock,
.paper-mode .stock-status.in-stock {
    background: rgba(52, 168, 83, 0.15);
    color: #2e7d32;
}

.stock-status.out-of-stock {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

[data-theme="dark"] .stock-status.out-of-stock,
.dark-mode .stock-status.out-of-stock {
    background: rgba(244, 67, 54, 0.2);
    color: #e57373;
}

[data-theme="paper"] .stock-status.out-of-stock,
.paper-mode .stock-status.out-of-stock {
    background: rgba(244, 67, 54, 0.15);
    color: #c62828;
}

/* Secondary Buttons */
.btn-secondary,
.btn-clear,
.btn-update,
.btn-remove {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.btn-secondary:hover,
.btn-clear:hover,
.btn-update:hover {
    background: var(--theme-hover-bg);
    border-color: var(--theme-primary);
}

.btn-remove:hover {
    background: rgba(244, 67, 54, 0.1);
    border-color: #f44336;
    color: #f44336;
}

[data-theme="dark"] .btn-remove:hover,
.dark-mode .btn-remove:hover {
    background: rgba(244, 67, 54, 0.2);
    color: #e57373;
}

[data-theme="paper"] .btn-remove:hover,
.paper-mode .btn-remove:hover {
    background: rgba(244, 67, 54, 0.15);
    color: #c62828;
}

/* Tables */
table,
.table,
.users-table,
.papers-table {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

table th,
.table th,
.users-table th,
.papers-table th {
    background: var(--theme-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

table td,
.table td,
.users-table td,
.papers-table td {
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

table tbody tr:hover,
.table tbody tr:hover,
.users-table tbody tr:hover,
.papers-table tbody tr:hover {
    background: var(--theme-hover-bg);
}

/* Pagination */
.pagination-container,
.pagination-btn {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.pagination-btn:hover {
    background: var(--theme-hover-bg);
}

.pagination-btn.active {
    background: var(--theme-primary);
    color: white;
    border-color: var(--theme-primary);
}

/* Marketplace Index */
.marketplace-container,
.product-card,
.category-card {
    color: var(--theme-text-primary);
}

.product-card:hover,
.category-card:hover {
    border-color: var(--theme-primary);
    box-shadow: var(--theme-shadow);
}

.product-card-title,
.product-card-price,
.category-card-title {
    color: var(--theme-text-primary);
}

.product-card-category {
    color: var(--theme-text-secondary);
}

/* Filters */
.filters-section,
.filter-group,
.filter-input,
.filter-select {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

/* Page Headers */
.page-header,
.page-title,
.page-subtitle {
    color: var(--theme-text-primary);
    border-color: var(--theme-border);
}

.page-subtitle {
    color: var(--theme-text-secondary);
}

/* Breadcrumbs - Additional styling */
.breadcrumb-link:hover {
    background: var(--theme-hover-bg);
}

/* Checkbox and Radio */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--theme-primary);
}

/* Select dropdowns */
select {
    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='%235f6368' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

[data-theme="dark"] select,
.dark-mode select {
    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='%23bdc1c6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

[data-theme="paper"] select,
.paper-mode select {
    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='%238b7355' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

/* ============================================
   UPLOAD SECTION COMPONENTS
   ============================================ */

.upload-section,
.upload-form,
.admin-upload {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.upload-section {
    background: var(--theme-bg);
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow);
}

.upload-section h3 {
    color: var(--theme-text-primary);
}

.search-input {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.search-input:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

[data-theme="dark"] .search-input:focus,
.dark-mode .search-input:focus {
    box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
}

[data-theme="paper"] .search-input:focus,
.paper-mode .search-input:focus {
    box-shadow: 0 0 0 2px rgba(139, 111, 71, 0.2);
}

.programs-checkbox-container {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
}

.program-checkbox-item {
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.program-checkbox-item label {
    color: var(--theme-text-primary);
}

.selected-programs-info {
    background: rgba(26, 115, 232, 0.1);
    border-color: rgba(26, 115, 232, 0.3);
    color: var(--theme-primary);
}

[data-theme="dark"] .selected-programs-info,
.dark-mode .selected-programs-info {
    background: rgba(138, 180, 248, 0.15);
    border-color: rgba(138, 180, 248, 0.3);
}

[data-theme="paper"] .selected-programs-info,
.paper-mode .selected-programs-info {
    background: rgba(139, 111, 71, 0.1);
    border-color: rgba(139, 111, 71, 0.3);
}

/* Drag and Drop Area */
.drag-drop-area {
    background: var(--theme-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.drag-drop-area:hover {
    border-color: var(--theme-primary);
    background: var(--theme-hover-bg);
}

.drag-drop-area.drag-over {
    border-color: var(--theme-primary);
    background: var(--theme-hover-bg);
}

.drag-drop-text {
    color: var(--theme-text-primary);
}

.drag-drop-subtext {
    color: var(--theme-text-secondary);
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

.btn-outline-primary:hover {
    background: var(--theme-primary);
    color: white;
}

/* Success Message */
.success-message {
    background: rgba(52, 168, 83, 0.1);
    border-color: rgba(52, 168, 83, 0.3);
    color: #34a853;
}

[data-theme="dark"] .success-message,
.dark-mode .success-message {
    background: rgba(52, 168, 83, 0.2);
    border-color: rgba(52, 168, 83, 0.4);
    color: #66bb6a;
}

[data-theme="paper"] .success-message,
.paper-mode .success-message {
    background: rgba(52, 168, 83, 0.15);
    border-color: rgba(52, 168, 83, 0.3);
    color: #2e7d32;
}

/* Papers Container */
.papers-container {
    background: transparent;
}

.paper-card {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    box-shadow: var(--theme-shadow);
    color: var(--theme-text-primary);
}

.paper-card:hover {
    box-shadow: var(--theme-shadow);
    border-color: var(--theme-primary);
}

.paper-card-header {
    border-color: var(--theme-border);
}

.paper-card-icon {
    color: #dc3545;
}

[data-theme="dark"] .paper-card-icon,
.dark-mode .paper-card-icon {
    color: #e57373;
}

[data-theme="paper"] .paper-card-icon,
.paper-mode .paper-card-icon {
    color: #c62828;
}

.paper-card-name {
    color: var(--theme-text-primary);
}

.paper-card-size {
    color: var(--theme-text-secondary);
}

.paper-card-remove {
    background: #dc3545;
    color: white;
}

.paper-card-remove:hover {
    background: #c82333;
}

[data-theme="dark"] .paper-card-remove,
.dark-mode .paper-card-remove {
    background: #e57373;
}

[data-theme="dark"] .paper-card-remove:hover,
.dark-mode .paper-card-remove:hover {
    background: #ef5350;
}

[data-theme="paper"] .paper-card-remove,
.paper-mode .paper-card-remove {
    background: #c62828;
}

[data-theme="paper"] .paper-card-remove:hover,
.paper-mode .paper-card-remove:hover {
    background: #b71c1c;
}

.paper-card-field label {
    color: var(--theme-text-primary);
}

.paper-card-field input,
.paper-card-field select,
.paper-card-field textarea {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.paper-card-field input:focus,
.paper-card-field select:focus,
.paper-card-field textarea:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

[data-theme="dark"] .paper-card-field input:focus,
[data-theme="dark"] .paper-card-field select:focus,
[data-theme="dark"] .paper-card-field textarea:focus,
.dark-mode .paper-card-field input:focus,
.dark-mode .paper-card-field select:focus,
.dark-mode .paper-card-field textarea:focus {
    box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
}

[data-theme="paper"] .paper-card-field input:focus,
[data-theme="paper"] .paper-card-field select:focus,
[data-theme="paper"] .paper-card-field textarea:focus,
.paper-mode .paper-card-field input:focus,
.paper-mode .paper-card-field select:focus,
.paper-mode .paper-card-field textarea:focus {
    box-shadow: 0 0 0 2px rgba(139, 111, 71, 0.2);
}

.text-muted {
    color: var(--theme-text-secondary);
}

.form-actions {
    border-color: var(--theme-border);
}

/* ============================================
   REPORTS & STATISTICS COMPONENTS
   ============================================ */

.users-container,
.stats-grid {
    background: transparent;
}

.stat-card {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    box-shadow: var(--theme-shadow);
    color: var(--theme-text-primary);
}

.stat-value {
    color: var(--theme-text-primary);
}

.stat-label {
    color: var(--theme-text-secondary);
}

.stat-icon {
    background: rgba(26, 115, 232, 0.1);
    color: var(--theme-primary);
}

[data-theme="dark"] .stat-icon,
.dark-mode .stat-icon {
    background: rgba(138, 180, 248, 0.2);
}

[data-theme="paper"] .stat-icon,
.paper-mode .stat-icon {
    background: rgba(139, 111, 71, 0.15);
}

.stat-icon.green {
    background: rgba(52, 168, 83, 0.1);
    color: #34a853;
}

[data-theme="dark"] .stat-icon.green,
.dark-mode .stat-icon.green {
    background: rgba(52, 168, 83, 0.2);
    color: #66bb6a;
}

[data-theme="paper"] .stat-icon.green,
.paper-mode .stat-icon.green {
    background: rgba(52, 168, 83, 0.15);
    color: #2e7d32;
}

.stat-icon.orange {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

[data-theme="dark"] .stat-icon.orange,
.dark-mode .stat-icon.orange {
    background: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
}

[data-theme="paper"] .stat-icon.orange,
.paper-mode .stat-icon.orange {
    background: rgba(255, 152, 0, 0.15);
    color: #e68900;
}

.stat-icon.purple {
    background: rgba(156, 39, 176, 0.1);
    color: #9c27b0;
}

[data-theme="dark"] .stat-icon.purple,
.dark-mode .stat-icon.purple {
    background: rgba(156, 39, 176, 0.2);
    color: #ba68c8;
}

[data-theme="paper"] .stat-icon.purple,
.paper-mode .stat-icon.purple {
    background: rgba(156, 39, 176, 0.15);
    color: #7b1fa2;
}

/* Charts Section */
.charts-section {
    background: transparent;
}

.chart-card {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    box-shadow: var(--theme-shadow);
    color: var(--theme-text-primary);
}

.chart-title {
    color: var(--theme-text-primary);
}

.chart-content,
.chart-wrapper {
    background: transparent;
}

/* Table Header */
.table-header {
    background: var(--theme-bg);
    border-color: var(--theme-border);
}

.table-title {
    color: var(--theme-text-primary);
}

.table-controls {
    background: transparent;
}

.sort-select {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.sort-select:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

[data-theme="dark"] .sort-select:focus,
.dark-mode .sort-select:focus {
    box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
}

[data-theme="paper"] .sort-select:focus,
.paper-mode .sort-select:focus {
    box-shadow: 0 0 0 2px rgba(139, 111, 71, 0.2);
}

/* User Avatar */
.user-avatar {
    background: var(--theme-primary);
    color: white;
}

.user-name {
    color: var(--theme-text-primary);
}

.user-email {
    color: var(--theme-text-secondary);
}

.user-program {
    color: var(--theme-text-primary);
}

.user-grade {
    background: rgba(26, 115, 232, 0.1);
    color: var(--theme-primary);
}

[data-theme="dark"] .user-grade,
.dark-mode .user-grade {
    background: rgba(138, 180, 248, 0.2);
}

[data-theme="paper"] .user-grade,
.paper-mode .user-grade {
    background: rgba(139, 111, 71, 0.15);
}

.user-stats {
    background: transparent;
}

.stat-badge {
    color: var(--theme-text-secondary);
}

.stat-badge svg {
    color: var(--theme-text-secondary);
}

.pagination-info {
    color: var(--theme-text-secondary);
}

.pagination-btn.disabled {
    opacity: 0.5;
    background: var(--theme-bg);
    color: var(--theme-text-tertiary);
    border-color: var(--theme-border);
}

/* Admin Upload Container */
.admin-upload h2 {
    color: var(--theme-text-primary);
}

/* Additional Form Elements in Upload */
.upload-form .form-group label {
    color: var(--theme-text-primary);
}

.upload-form .form-group select,
.upload-form .form-group input {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

.upload-form .form-group select:focus,
.upload-form .form-group input:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

[data-theme="dark"] .upload-form .form-group select:focus,
[data-theme="dark"] .upload-form .form-group input:focus,
.dark-mode .upload-form .form-group select:focus,
.dark-mode .upload-form .form-group input:focus {
    box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
}

[data-theme="paper"] .upload-form .form-group select:focus,
[data-theme="paper"] .upload-form .form-group input:focus,
.paper-mode .upload-form .form-group select:focus,
.paper-mode .upload-form .form-group input:focus {
    box-shadow: 0 0 0 2px rgba(139, 111, 71, 0.2);
}

.upload-form .form-group select:disabled {
    background: var(--theme-bg);
    color: var(--theme-text-tertiary);
    cursor: not-allowed;
}

