/* ============================================
   PREMIUM MATERIALS PAGE STYLES
   Dark Theme with Glassmorphism
   ============================================ */

/* CSS Variables - Match app theme colors */
:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #141829;
    --bg-card: rgba(20, 24, 41, 0.6);
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-primary: #2196f3;
    --accent-secondary: #0d47a1;
    --accent-hover: #42a5f5;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Premium Theme Base */
.premium-theme {
    background: linear-gradient(135deg, #0a0e27 0%, #141829 50%, #1a1f3a 100%);
    min-height: 100vh;
    color: var(--text-primary);
}

/* Container */
.premium-theme .container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Page Header */
.premium-theme h1 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Material Cards - Glassmorphism */
.premium-theme .material-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.premium-theme .material-card::before {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-theme .material-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(33, 150, 243, 0.3);
}

.premium-theme .material-card:hover::before {
    opacity: 1;
}

/* Card Header */
.premium-theme .material-card .card-header {
    background: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 1rem;
}

.premium-theme .material-card .card-header h5 {
    color: var(--text-primary) !important;
    font-weight: 600;
}

.premium-theme .material-card:hover .card-header h5 {
    color: var(--accent-primary) !important;
}

/* Card Body */
.premium-theme .material-card .card-body {
    background: transparent;
    color: var(--text-primary);
    padding: 1.25rem;
}

.premium-theme .material-card .card-text {
    color: var(--text-secondary) !important;
}

/* Material Badges */
.premium-theme .material-badge {
    background: rgba(33, 150, 243, 0.15) !important;
    color: var(--accent-primary) !important;
    border: 1px solid rgba(33, 150, 243, 0.3) !important;
    border-radius: 25px !important;
    padding: 0.4rem 0.75rem !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.premium-theme .material-card:hover .material-badge {
    background: rgba(33, 150, 243, 0.25) !important;
    border-color: rgba(33, 150, 243, 0.5) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.2);
}

/* File Icons */
.premium-theme .file-icon {
    color: var(--accent-primary);
    transition: all 0.3s ease;
}

.premium-theme .material-card:hover .file-icon {
    transform: scale(1.15) translateY(-3px);
    filter: drop-shadow(0 4px 8px rgba(33, 150, 243, 0.3));
}

.premium-theme .file-pdf { color: #f44336; }
.premium-theme .file-word { color: #2196f3; }
.premium-theme .file-excel { color: #4caf50; }
.premium-theme .file-powerpoint { color: #ff9800; }
.premium-theme .file-image { color: #9c27b0; }
.premium-theme .file-archive { color: #795548; }
.premium-theme .file-code { color: #607d8b; }

/* Material Meta */
.premium-theme .material-meta {
    border-top: 1px solid var(--border-color) !important;
    padding-top: 1rem;
    color: var(--text-secondary);
}

.premium-theme .material-meta i {
    color: var(--accent-primary);
}

/* Card Footer */
.premium-theme .material-card .card-footer {
    background: rgba(255, 255, 255, 0.05) !important;
    border-top: 1px solid var(--border-color) !important;
    border-radius: 0 0 20px 20px !important;
    padding: 1rem;
}

/* Buttons */
.premium-theme .btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 25px !important;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.premium-theme .btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.premium-theme .btn-outline-primary {
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
    background: transparent;
    border-radius: 25px !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.premium-theme .btn-outline-primary:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.premium-theme .btn-outline-secondary {
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    background: transparent;
    border-radius: 25px !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.premium-theme .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Search Box */
.premium-theme .search-box,
.premium-theme .form-control[type="search"],
.premium-theme input[type="search"],
.premium-theme input.form-control {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 25px !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 1.25rem !important;
    transition: all 0.3s ease !important;
}

.premium-theme .search-box:focus,
.premium-theme .form-control[type="search"]:focus,
.premium-theme input[type="search"]:focus,
.premium-theme input.form-control:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--accent-primary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25) !important;
    outline: none !important;
}

.premium-theme .search-box::placeholder {
    color: var(--text-muted) !important;
}

/* Search Button */
.premium-theme .rtl-search-form button[type="submit"] {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--accent-primary) !important;
    transition: all 0.3s ease;
}

.premium-theme .rtl-search-form button[type="submit"]:hover {
    background: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: white !important;
    transform: scale(1.05);
}

/* Dropdowns */
.premium-theme .dropdown-toggle {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 25px !important;
    transition: all 0.3s ease;
}

.premium-theme .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--accent-primary) !important;
    color: var(--accent-primary) !important;
}

.premium-theme .dropdown-menu {
    background: rgba(20, 24, 41, 0.95) !important;
    border: 1px solid var(--border-color) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    border-radius: 12px !important;
    padding: 0.5rem 0;
}

.premium-theme .dropdown-item {
    color: var(--text-primary) !important;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.premium-theme .dropdown-item:hover {
    background: rgba(33, 150, 243, 0.15) !important;
    color: var(--accent-primary) !important;
}

.premium-theme .dropdown-item.active {
    background: var(--accent-primary) !important;
    color: white !important;
}

/* Form Check Inputs in Dropdowns */
.premium-theme .dropdown-item .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
}

.premium-theme .dropdown-item .form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Form Check Inputs (Radio buttons, checkboxes) */
.premium-theme .form-check-input {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid var(--border-color) !important;
}

.premium-theme .form-check-input:checked {
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
}

.premium-theme .form-check-input:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

.premium-theme .form-check-label {
    color: var(--text-primary) !important;
}

/* Autocomplete Dropdown */
.premium-theme .autocomplete-dropdown {
    background: rgba(20, 24, 41, 0.95) !important;
    border: 1px solid var(--border-color) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    border-radius: 12px !important;
}

.premium-theme .autocomplete-item {
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.premium-theme .autocomplete-item:hover,
.premium-theme .autocomplete-item.active {
    background-color: rgba(33, 150, 243, 0.15) !important;
    color: var(--accent-primary) !important;
}

.premium-theme .autocomplete-item .course-code {
    color: var(--accent-primary) !important;
}

.premium-theme .autocomplete-empty {
    color: var(--text-muted) !important;
}

/* Page Size Selector */
.premium-theme .form-select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 25px !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem !important;
    min-height: auto !important;
    height: auto !important;
    text-align: center !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.premium-theme .form-select:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
    outline: none;
}

/* Windows dropdown fix for premium theme */
.premium-theme .form-select option {
    background-color: #1e1e2e !important;
    color: var(--text-primary) !important;
    padding: 0.5rem !important;
}

.premium-theme select.form-select option:hover,
.premium-theme select.form-select option:focus,
.premium-theme select.form-select option:checked {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

.premium-theme .form-label {
    color: var(--text-primary) !important;
    font-weight: 500;
}

/* Pagination */
.premium-theme .pagination {
    flex-direction: row;
}

.premium-theme .pagination .page-link {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.premium-theme .pagination .page-link:hover {
    background: rgba(33, 150, 243, 0.15) !important;
    border-color: var(--accent-primary) !important;
    color: var(--accent-primary) !important;
    transform: translateY(-2px);
}

.premium-theme .pagination .page-item.active .page-link {
    background: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.premium-theme .pagination .page-item.disabled .page-link {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
}

/* Materials listing — pill pagination (dark / glass, matches app theme) */
/* Do not set display:!important here — it would override Bootstrap d-none/d-md-flex and duplicate mobile + desktop UIs */
.premium-theme ul.pagination.materials-pagination-pill {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    padding: 0.4rem 1rem !important;
    margin: 0 !important;
    list-style: none;
    background: var(--bg-card) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 999px !important;
    box-shadow: var(--shadow-md) !important;
    border: 1px solid var(--border-color) !important;
}

@media (min-width: 768px) {
    .premium-theme ul.pagination.materials-pagination-pill {
        display: inline-flex;
    }
}

@media (max-width: 767.98px) {
    .premium-theme ul.pagination.materials-pagination-pill {
        display: none !important;
    }
}

.premium-theme ul.pagination.materials-pagination-pill .page-item {
    margin: 0 !important;
}

.premium-theme ul.pagination.materials-pagination-pill .page-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    height: 2.35rem;
    padding: 0 0.35rem !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    color: var(--text-primary) !important;
    border-radius: 999px !important;
    font-weight: 500;
    font-size: 0.9375rem;
    line-height: 1;
    box-shadow: none !important;
    transform: none !important;
}

.premium-theme ul.pagination.materials-pagination-pill .page-link:hover {
    background: rgba(33, 150, 243, 0.18) !important;
    color: var(--accent-hover) !important;
    border: none !important;
    transform: none !important;
}

.premium-theme ul.pagination.materials-pagination-pill .page-item.active .page-link {
    background: rgba(33, 150, 243, 0.28) !important;
    border: 1px solid rgba(33, 150, 243, 0.55) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 16px rgba(33, 150, 243, 0.25) !important;
    border-radius: 50% !important;
    min-width: 2.35rem;
    width: 2.35rem;
    padding: 0 !important;
}

.premium-theme ul.pagination.materials-pagination-pill .page-item.disabled .page-link {
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    opacity: 1 !important;
    cursor: default !important;
    transform: none !important;
}

.premium-theme ul.pagination.materials-pagination-pill .pagination-ellipsis .page-link {
    min-width: auto !important;
    width: auto !important;
    padding: 0 0.2rem !important;
    cursor: default !important;
    color: var(--text-secondary) !important;
}

.premium-theme .materials-pagination-pill-mobile {
    padding: 0.35rem 0.75rem !important;
    background: var(--bg-card) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 999px !important;
    box-shadow: var(--shadow-md) !important;
    border: 1px solid var(--border-color) !important;
}

.premium-theme .materials-pagination-pill-mobile .mobile-page-info {
    background: transparent !important;
    border: none !important;
    color: var(--text-primary) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0 0.35rem;
}

.premium-theme .materials-pagination-pill-mobile .mobile-pagination-btn {
    border-radius: 999px !important;
    border: 1px solid var(--border-color) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-primary) !important;
    min-width: 2.25rem;
}

.premium-theme .materials-pagination-pill-mobile .mobile-pagination-btn:hover:not(:disabled) {
    background: rgba(33, 150, 243, 0.2) !important;
    border-color: rgba(33, 150, 243, 0.45) !important;
    color: var(--accent-hover) !important;
    transform: none !important;
}

.premium-theme .materials-pagination-pill-mobile .mobile-pagination-btn:disabled {
    opacity: 0.45;
    border-color: var(--border-color) !important;
}

/* Mobile Pagination */
.premium-theme .mobile-pagination-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
}

.premium-theme .mobile-pagination-btn:hover:not(:disabled) {
    background: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: white !important;
    transform: scale(1.05);
}

.premium-theme .mobile-pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.premium-theme .mobile-page-info {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 20px !important;
}

/* Empty State */
.premium-theme .empty-state {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
}

.premium-theme .empty-state i {
    color: var(--text-muted) !important;
}

.premium-theme .empty-state h3 {
    color: var(--text-primary) !important;
}

.premium-theme .empty-state p {
    color: var(--text-secondary) !important;
}

/* Alerts */
.premium-theme .alert {
    background: rgba(33, 150, 243, 0.15) !important;
    border: 1px solid rgba(33, 150, 243, 0.3) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.premium-theme .alert-info {
    background: rgba(33, 150, 243, 0.15) !important;
    border-color: rgba(33, 150, 243, 0.3) !important;
}

.premium-theme .alert-success {
    background: rgba(76, 175, 80, 0.15) !important;
    border-color: rgba(76, 175, 80, 0.3) !important;
}

.premium-theme .alert-danger {
    background: rgba(244, 67, 54, 0.15) !important;
    border-color: rgba(244, 67, 54, 0.3) !important;
}

.premium-theme .alert-heading {
    color: var(--text-primary) !important;
}

.premium-theme .alert p {
    color: var(--text-secondary) !important;
}

/* Bookmark Button */
.premium-theme .bookmark-btn {
    color: var(--text-secondary) !important;
    transition: all 0.2s ease;
    position: relative;
}

.premium-theme .bookmark-btn:hover {
    color: var(--accent-primary) !important;
    transform: scale(1.1);
}

.premium-theme .bookmark-btn.bookmarked {
    color: var(--accent-primary) !important;
}

.premium-theme .bookmark-btn.bookmarked:hover {
    color: var(--accent-hover) !important;
    transform: scale(1.15);
}

/* Bookmark Animation - Pulse/Scale */
.premium-theme .bookmark-btn .bookmark-icon {
    transition: all 0.3s ease;
    display: inline-block;
}

/* Pulse animation when bookmarking */
.premium-theme .bookmark-btn.animate-bookmark .bookmark-icon {
    animation: bookmarkPulse 0.5s ease;
}

/* Pulse animation when unbookmarking */
.premium-theme .bookmark-btn.animate-unbookmark .bookmark-icon {
    animation: bookmarkPulseOut 0.4s ease;
}

@keyframes bookmarkPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.4);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bookmarkPulseOut {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.7);
    }
    100% {
        transform: scale(1);
    }
}

/* Add a subtle glow effect when bookmarked */
.premium-theme .bookmark-btn.bookmarked .bookmark-icon {
    filter: drop-shadow(0 0 4px rgba(33, 150, 243, 0.5));
}

.premium-theme .bookmark-btn.bookmarked.animate-bookmark .bookmark-icon {
    filter: drop-shadow(0 0 8px rgba(33, 150, 243, 0.8));
    animation: bookmarkPulse 0.5s ease, bookmarkGlow 0.5s ease;
}

@keyframes bookmarkGlow {
    0%, 100% {
        filter: drop-shadow(0 0 4px rgba(33, 150, 243, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(33, 150, 243, 1));
    }
}

/* Text Muted Override */
.premium-theme .text-muted {
    color: var(--text-muted) !important;
}

.premium-theme .text-uppercase.text-muted {
    color: var(--text-secondary) !important;
}

/* Download Count */
.premium-theme .download-count {
    color: var(--text-secondary) !important;
}

/* Modals - Will be styled by premium-home.css if included */
.premium-theme .modal-content {
    background: rgba(20, 24, 41, 0.95) !important;
    border: 1px solid var(--border-color) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    border-radius: 20px !important;
}

.premium-theme .modal-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.premium-theme .modal-header.bg-primary {
    background: transparent !important;
    background-color: transparent !important;
}

.premium-theme .modal-header.text-white {
    color: var(--text-primary) !important;
}

.premium-theme .modal-body {
    color: var(--text-primary) !important;
}

.premium-theme .modal-footer {
    border-top: 1px solid var(--border-color) !important;
}

.premium-theme .modal-title {
    color: var(--text-primary) !important;
}

.premium-theme .btn-close {
    filter: invert(1) !important;
    opacity: 0.7;
}

.premium-theme .btn-close:hover {
    opacity: 1;
}

/* Department Filter Buttons */
.premium-theme .btn-group.flex-wrap .btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
}

.premium-theme .btn-group.flex-wrap .btn:hover {
    background: rgba(33, 150, 243, 0.15) !important;
    border-color: var(--accent-primary) !important;
    color: var(--accent-primary) !important;
    transform: translateY(-2px);
}

.premium-theme .btn-group.flex-wrap .btn.active {
    background: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .premium-theme .container {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .premium-theme .material-card {
        margin-bottom: 1.5rem;
    }
}

/* Form Cards (Edit, Reupload pages) */
.premium-theme .card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
}

.premium-theme .card-header {
    background: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 20px 20px 0 0 !important;
}

.premium-theme .card-header.bg-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%) !important;
    border-bottom: none !important;
}

.premium-theme .card-body {
    background: transparent;
    color: var(--text-primary);
}

/* Form Controls */
.premium-theme .form-control,
.premium-theme .form-select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 25px !important;
    padding: 0.75rem 1rem !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.premium-theme .form-control:focus,
.premium-theme .form-select:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--accent-primary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
    outline: none;
}

/* Windows dropdown fix for premium theme - Form Controls section */
.premium-theme .form-select option {
    background-color: #1e1e2e !important;
    color: var(--text-primary) !important;
    padding: 0.5rem !important;
}

.premium-theme select.form-select option:hover,
.premium-theme select.form-select option:focus,
.premium-theme select.form-select option:checked {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

.premium-theme .form-control::placeholder {
    color: var(--text-muted) !important;
}

.premium-theme .form-label {
    color: var(--text-primary) !important;
    font-weight: 500;
}

.premium-theme .form-text {
    color: var(--text-secondary) !important;
}

/* Tables */
.premium-theme .table {
    color: var(--text-primary) !important;
}

.premium-theme .table th {
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.premium-theme .table td {
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

/* Buttons in Cards */
.premium-theme .btn-light {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
}

.premium-theme .btn-light:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: var(--accent-primary) !important;
    color: var(--accent-primary) !important;
}

.premium-theme .btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
}

.premium-theme .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: var(--accent-primary) !important;
    color: var(--accent-primary) !important;
}

/* Skeleton Loader - Premium Dark Theme */
.premium-theme .skeleton-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
}

.premium-theme .skeleton-card .card-header {
    background: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-radius: 20px 20px 0 0 !important;
}

.premium-theme .skeleton-card .card-body {
    background: transparent;
}

.premium-theme .skeleton-card .card-footer {
    background: rgba(255, 255, 255, 0.05) !important;
    border-top: 1px solid var(--border-color) !important;
    border-radius: 0 0 20px 20px !important;
}

.premium-theme .skeleton-loader {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.08) 25%, 
        rgba(255, 255, 255, 0.12) 50%, 
        rgba(255, 255, 255, 0.08) 75%) !important;
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 8px;
    height: 20px;
    margin-bottom: 10px;
}

.premium-theme .skeleton-loader.title {
    height: 32px;
    width: 70%;
    border-radius: 8px;
}

.premium-theme .skeleton-loader.text {
    height: 16px;
    border-radius: 6px;
}

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

/* File Upload Field - Premium Theme */
.premium-theme .file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 120px;
}

.premium-theme .file-upload-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.premium-theme .file-upload-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    border: 2px dashed var(--border-color) !important;
    border-radius: 12px !important;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-secondary) !important;
}

.premium-theme .file-upload-btn:hover {
    border-color: var(--accent-primary) !important;
    background: rgba(33, 150, 243, 0.1) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.premium-theme .file-upload-btn.drag-over {
    border-color: var(--accent-primary) !important;
    background: rgba(33, 150, 243, 0.15) !important;
    border-style: solid !important;
    transform: scale(1.02);
}

.premium-theme .file-upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--accent-primary) !important;
    transition: all 0.3s ease;
}

.premium-theme .file-upload-btn:hover .file-upload-icon {
    transform: translateY(-4px) scale(1.1);
    color: var(--accent-hover) !important;
}

.premium-theme .file-upload-btn p {
    color: var(--text-secondary) !important;
    font-size: 0.95rem;
    margin: 0;
}

.premium-theme .file-upload-btn:hover p {
    color: var(--text-primary) !important;
}

.premium-theme .file-upload-text {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted) !important;
}

.premium-theme .file-preview {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
}

.premium-theme .file-preview.active {
    display: block;
}

.premium-theme .file-preview i {
    color: var(--accent-primary) !important;
    font-size: 1.5rem;
}

.premium-theme .file-preview #modal-file-name,
.premium-theme .file-preview #file-name {
    color: var(--text-primary) !important;
    font-weight: 500;
}

.premium-theme .file-preview #modal-file-size,
.premium-theme .file-preview #file-size {
    color: var(--text-secondary) !important;
}

/* RTL Support */
[dir="rtl"] .premium-theme .material-card .card-header h5 {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .premium-theme .material-card .card-header .bookmark-btn {
    margin-left: 0;
    margin-right: 0.5rem;
}
