/**
 * Website Build Project Manager
 * Improved Main CSS file style.css
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Import theme variables */
@import 'theme.css';

/* CSS Variables */
:root {
    --header-height: 5rem;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --content-padding: 1.5rem;
    --border-radius: 0.5rem;
    --transition-speed: 0.3s;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --bg-body: #f9fafb;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-hover: #f3f4f6;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --primary-gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    --success-gradient: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    --warning-gradient: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    --danger-gradient: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    --info-gradient: linear-gradient(135deg, var(--info) 0%, #2563eb 100%);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --bg-body: #000000;
    --bg-card: rgba(0, 0, 0, 0.8);
    --bg-sidebar: rgba(0, 0, 0, 0.8);
    --bg-hover: rgba(31, 41, 55, 0.5);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Code snippets */
pre, code {
    font-family: 'Fira Code', 'Consolas', 'Monaco', 'Andale Mono', 'Ubuntu Mono', monospace;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
}

/* Form elements */
.form-control, .form-select, .form-check-label, .form-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-primary);
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .table {
    background-color: rgba(0, 0, 0, 0.8);
}

.table th {
    background-color: var(--bg-hover);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
    text-align: center;
    vertical-align: middle;
}

[data-theme="dark"] .table th {
    background-color: rgba(31, 41, 55, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
    background-color: transparent !important;
    vertical-align: middle;
}

[data-theme="dark"] .table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: transparent !important;
}

/* Table Rows */
.table tbody tr {
    transition: all var(--transition-speed) ease;
    text-align: center;
}

.table tbody tr:hover {
    background-color: var(--bg-hover);
}

[data-theme="dark"] .table tbody tr:hover {
    background-color: rgba(31, 41, 55, 0.5);
}

/* Remove all individual cell hover effects */
.table td:hover,
.table td:focus,
.table td:active,
[data-theme="dark"] .table td:hover,
[data-theme="dark"] .table td:focus,
[data-theme="dark"] .table td:active {
    background-color: transparent !important;
}

/* Cards */
.card-title, .card-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Pagination */
.page-link {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Navigation */
.nav-item {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Badges */
.badge {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Alerts */
.alert {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Tooltips */
.tooltip {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Dropdowns */
.dropdown-menu {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 0.5rem;
    min-width: 12rem;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .dropdown-menu {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

.dropdown-menu-end {
    right: 0;
    left: auto;
}

.dropdown-item {
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: rgba(31, 41, 55, 0.5);
    color: var(--text-primary);
}

.dropdown-item:active {
    background-color: var(--primary);
    color: white;
}

[data-theme="dark"] .dropdown-item:active {
    background-color: #818cf8;
    color: white;
}

.dropdown-divider {
    border-top: 1px solid var(--border-color);
    margin: 0.5rem 0;
}

[data-theme="dark"] .dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal */
.modal-title, .modal-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Toast */
.toast {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* List groups */
.list-group-item {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Breadcrumb */
.breadcrumb {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Progress bars */
.progress {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Spinners */
.spinner-border, .spinner-grow {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Popovers */
.popover {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Carousel */
.carousel-caption {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Accordion */
.accordion-button, .accordion-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Offcanvas */
.offcanvas-title, .offcanvas-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Placeholders */
.placeholder {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Figures */
.figure-caption {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Blockquotes */
.blockquote {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Small text */
small, .small {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Lead text */
.lead {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Display classes */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Layout */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    min-width: 0;
    position: relative;
    min-height: 100vh;
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed-width);
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    padding: var(--content-padding);
    position: relative;
    overflow-y: auto;
}

/* File Details Specific Styles */
.file-details-page .content-wrapper {
    overflow-y: auto;
    max-height: none;
    min-height: auto;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary);
    filter: brightness(110%);
}

/* Dashboard Styles */
.dashboard-content {
    padding: var(--content-padding);
    max-width: 1600px;
    margin: 0 auto;
}

/* Stats Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stats-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stats-card-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Kanban Board */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.kanban-column {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.kanban-column-title {
    font-weight: 600;
    color: var(--heading-color);
    font-size: 1.1rem;
}

.kanban-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    cursor: move;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.kanban-card .priority {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.kanban-card .priority.high { background-color: var(--danger); }
.kanban-card .priority.medium { background-color: var(--warning); }
.kanban-card .priority.low { background-color: var(--success); }
.kanban-card .priority.none { background-color: var(--text-muted); }

/* Timeline */
.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline-item {
    position: relative;
    padding: 0 0 1.5rem 1.5rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-card);
}

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-block;
    margin-right: 0.5rem;
}

/* Project List */
.project-list {
    display: grid;
    gap: 1rem;
}

.project-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.project-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.project-info {
    flex: 1;
}

.project-title {
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 0.25rem;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Dashboard Responsive */
@media (max-width: 991.98px) {
    .dashboard-content {
        padding: 1rem;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .stats-card-value {
        font-size: 2rem;
    }

    .kanban-column {
        padding: 1rem;
    }

    .project-item {
        padding: 0.75rem;
    }
}

/* Cards and Sections */
.card {
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
    animation: fadeIn 0.3s ease-out;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,.125);
    padding: 0.75rem 1.25rem;
    animation: slideIn 0.3s ease-out;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--heading-color);
    margin: 0;
}

.card-body {
    padding: 1rem;
    animation: scaleIn 0.3s ease-out;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    box-shadow: var(--shadow-sm);
}

.status-badge-success {
    background-image: var(--success-gradient);
}

.status-badge-warning {
    background-image: var(--warning-gradient);
}

.status-badge-secondary {
    background-color: var(--secondary);
}

/* List Groups */
.list-group {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.list-group-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 1rem;
    transition: all var(--transition-speed) ease;
}

.list-group-item:first-child {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.list-group-item:last-child {
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.list-group-item + .list-group-item {
    border-top: 0;
}

.list-group-item:hover {
    background-color: var(--bg-hover);
}

.list-group-item.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    z-index: 2;
}

.list-group-item.disabled {
    background-color: var(--bg-card);
    color: var(--text-secondary);
    pointer-events: none;
}

[data-theme="dark"] .list-group-item {
    background-color: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .list-group-item:hover {
    background-color: rgba(31, 41, 55, 0.5);
}

[data-theme="dark"] .list-group-item.active {
    background-color: #818cf8;
    border-color: #818cf8;
}

[data-theme="dark"] .list-group-item.disabled {
    background-color: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.4);
}

/* OLED optimizations */
@media (prefers-color-scheme: dark) {
    [data-theme="dark"] {
        .list-group-item {
            background-color: transparent;
        }

        .list-group-item:hover {
            background-color: rgba(31, 41, 55, 0.5);
        }

        .list-group-item.disabled {
            background-color: transparent;
        }
    }
}

/* Forms */
.form-control {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 0.5rem;
    padding: 0.65rem 1rem;
}

.form-control:focus {
    background-color: var(--card-bg);
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.btn-primary {
    background-image: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    filter: brightness(110%);
    transform: translateY(-1px);
}

.btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .btn-icon {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-icon:hover {
    background-color: var(--bg-hover);
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-icon:hover {
    background-color: rgba(31, 41, 55, 0.5);
}

/* View All buttons */
.btn-view-all {
    background-image: var(--primary-gradient);
    color: white;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
    text-decoration: none;
    font-size: 0.875rem;
    display: inline-block;
}

.btn-view-all:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(105%);
    color: white;
}

/* Recent activity styles */
.activity-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-image: var(--primary-gradient);
    display: inline-block;
    margin-right: 0.5rem;
    position: relative;
    top: -1px;
    box-shadow: var(--shadow-sm);
}

/* Avatar group */
.avatar-group {
    display: flex;
    align-items: center;
}

.avatar-group .btn-icon {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.875rem;
    background-color: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Footer */
.footer {
    padding: 1rem 1.5rem;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
    position: relative;
    z-index: 10;
    width: 100%;
}

/* Scroll to top button */
#scroll-top {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-image: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    opacity: 0.9;
    transition: all 0.3s ease;
}

#scroll-top:hover {
    transform: translateY(-3px);
    opacity: 1;
}

/* Toast container */
.toast-container {
    z-index: 1050;
}

/* Responsive Adjustments */
@media (max-width: 1199.98px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991.98px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: var(--sidebar-width);
        background-color: var(--bg-card);
        border-right: 1px solid var(--border-color);
        padding: 1rem;
        overflow-y: auto;
        z-index: 1000;
        transition: transform 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    #mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 0.5rem;
        padding: 0.5rem;
        cursor: pointer;
    }
}

@media (max-width: 767.98px) {
    .kanban-board {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card-header, .card-body {
        padding: 1rem;
    }

    .content-header {
        height: auto;
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .content-header h1 {
        font-size: 1.25rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stats-card {
        padding: 1rem;
    }

    .stats-card-value {
        font-size: 2rem;
    }

    .stats-card-label {
        font-size: 0.875rem;
    }

    .kanban-column {
        min-height: auto;
    }

    .kanban-card {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .btn-icon {
        width: 32px;
        height: 32px;
    }

    .btn-icon i {
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .card-header, .card-body {
        padding: 0.75rem;
    }

    .kanban-column {
        padding: 0.75rem;
    }

    .kanban-card {
        padding: 0.75rem;
    }

    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .col, .col-sm, .col-md, .col-lg, .col-xl, [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .stats-card-value {
        font-size: 1.75rem;
    }

    .stats-card-label {
        font-size: 0.75rem;
    }

    .btn {
        padding: 0.4rem 0.65rem;
        font-size: 0.8125rem;
    }

    .btn-icon {
        width: 28px;
        height: 28px;
    }

    .btn-icon i {
        font-size: 0.875rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .nav-item:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .stats-card:hover {
        transform: none;
    }

    .kanban-card:hover {
        transform: none;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .nav-item i {
        font-size: 1.1rem;
    }

    .btn i {
        font-size: 1.1rem;
    }
}

/* Print Styles */
@media print {
    .sidebar, .no-print {
        display: none;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0;
    }

    .card {
        break-inside: avoid;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Apply animations */
.card {
    animation: fadeIn 0.3s ease-out;
}

.card-header {
    animation: slideIn 0.3s ease-out;
}

.card-body {
    animation: scaleIn 0.3s ease-out;
}

/* Hover effects */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* File Manager Specific Styles */
.file-manager-page .sidebar {
    display: none;
}

.file-manager-page .main-content {
    margin-left: 0;
    width: 100%;
}

.file-manager-page .content-wrapper {
    padding: 0;
}

/* Content Header */
.content-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--content-padding);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Mobile Menu Toggle */
#mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1050;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    color: var(--text-primary);
    transition: all var(--transition-speed) ease;
    box-shadow: var(--shadow);
}

#mobile-menu-toggle:hover {
    background: var(--bg-hover);
    transform: translateY(-1px);
}

@media (max-width: 991.98px) {
    #mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        bottom: 0;
        width: 250px;
        z-index: 1040;
        transition: left 0.3s ease-in-out;
        background: var(--bg-sidebar);
        box-shadow: var(--shadow-lg);
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        margin-left: 0 !important;
        transition: margin-left 0.3s ease-in-out;
    }

    .main-content.sidebar-shown {
        margin-left: 250px !important;
    }

    .content-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .nav-item {
    padding: 0.75rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.sidebar.collapsed .nav-item i {
    margin: 0;
    font-size: 1.25rem;
}

.sidebar.collapsed .sidebar-logo {
    padding: 1rem 0;
    justify-content: center;
}

.sidebar.collapsed .sidebar-logo span,
.sidebar.collapsed .nav-item span {
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
    position: absolute;
}

/* Sidebar Toggle Button */
#sidebar-toggle {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
}

#sidebar-toggle:hover {
    background: var(--bg-hover);
    transform: translate(50%, -50%) scale(1.1);
}

.sidebar.collapsed #sidebar-toggle {
    right: 0;
}

/* Navigation Items */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
}

.nav-item i {
    font-size: 1.25rem;
    min-width: 24px;
    text-align: center;
    margin-right: 0.5rem;
}

.nav-item span {
    white-space: nowrap;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-item:hover {
    background-color: var(--bg-hover);
    color: var(--primary);
}

.nav-item.active {
    background-color: var(--bg-hover);
    color: var(--primary);
    font-weight: 500;
}

/* Sidebar Logo */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.sidebar-logo i {
    font-size: 1.5rem;
    color: var(--primary);
    min-width: 24px;
    text-align: center;
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0 1rem;
    align-items: center;
    justify-content: space-between;
}

.mobile-header .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--heading-color);
}

.mobile-header .logo i {
    color: var(--primary);
}

.mobile-header .menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.mobile-header .menu-toggle:hover {
    background: var(--bg-hover);
}

@media (max-width: 991.98px) {
    .mobile-header {
        display: flex;
    }

    #sidebar-toggle {
        display: none;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding-top: var(--header-height);
    }
}

/* Mobile Navigation */
@media (max-width: 991.98px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: -70px;
        top: 0;
        height: 100vh;
        width: 70px;
        background-color: var(--bg-card);
        transition: left 0.3s ease;
        z-index: 1001;
        padding: 1rem 0;
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar .nav-item {
        padding: 0.75rem 0;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .sidebar .nav-item i {
        margin: 0;
        font-size: 1.25rem;
    }

    .sidebar .nav-item span,
    .sidebar .sidebar-logo span {
        display: none;
    }

    .sidebar .sidebar-logo {
        padding: 1rem 0;
        justify-content: center;
    }

    .main-content {
        margin-left: 0;
    }

    #sidebar-toggle {
        display: none;
    }
}

/* File Management Styles */
.file-manager {
    padding: 1.5rem;
}

.file-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.file-manager-actions {
    display: flex;
    gap: 1rem;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.file-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    overflow: hidden;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.file-card .card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
}

.file-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    color: var(--text-primary);
}

.file-card .file-preview {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    padding: 1rem;
}

.file-card .file-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.file-card .file-preview i {
    font-size: 3rem;
    color: var(--text-muted);
}

.file-card .card-body {
    padding: 1rem;
}

.file-card .file-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.file-card .file-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.file-card .file-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* File Manager Responsive */
@media (max-width: 767.98px) {
    .file-manager {
        padding: 1rem;
    }

    .file-manager-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .file-card .file-preview {
        height: 150px;
    }
}

@media (max-width: 991.98px) {
    .mobile-header {
        display: flex;
    }

    .content-header {
        margin-top: var(--header-height);
    }

    .main-content {
        margin-left: 0;
        min-height: calc(100vh - var(--header-height));
    }
}

@media (max-width: 767.98px) {
    .content-header {
        height: auto;
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
}

/* File Manager Styles */
.file-manager {
    background-color: var(--bg-body);
    transition: background-color var(--transition-speed) ease;
}

.file-manager-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .file-manager-header {
    background-color: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.file-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .file-card {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .file-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.file-card .card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .file-card .card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.file-card .card-title {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
    transition: color var(--transition-speed) ease;
}

.file-card .file-preview {
    height: 200px;
    background-color: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .file-card .file-preview {
    background-color: rgba(0, 0, 0, 0.5);
}

.file-card .file-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform var(--transition-speed) ease;
}

.file-card:hover .file-preview img {
    transform: scale(1.05);
}

.file-card .file-preview i {
    font-size: 3rem;
    color: var(--text-muted);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .file-card .file-preview i {
    color: rgba(255, 255, 255, 0.5);
}

.file-card .card-body {
    padding: 1rem;
    background-color: transparent;
    transition: background-color var(--transition-speed) ease;
}

.file-card .file-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    transition: color var(--transition-speed) ease;
}

.file-card .file-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.file-card .file-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    transition: all var(--transition-speed) ease;
}

/* File Details Page */
.file-details-page .content-wrapper {
    background-color: var(--bg-body);
    transition: background-color var(--transition-speed) ease;
}

.file-details-page .card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .file-details-page .card {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-details-page .list-group-item {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .file-details-page .list-group-item {
    border-color: rgba(255, 255, 255, 0.1);
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    background-color: var(--bg-hover);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .file-upload-area {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.5);
}

.file-upload-area:hover {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
}

[data-theme="dark"] .file-upload-area:hover {
    border-color: #818cf8;
    background-color: rgba(129, 140, 248, 0.1);
}

/* File Type Icons */
.file-icon {
    color: var(--text-muted);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .file-icon {
    color: rgba(255, 255, 255, 0.5);
}

.file-icon.image { color: var(--success); }
.file-icon.document { color: var(--info); }
.file-icon.text { color: var(--text-muted); }
.file-icon.archive { color: var(--warning); }
.file-icon.code { color: var(--primary); }

[data-theme="dark"] .file-icon.image { color: #4ade80; }
[data-theme="dark"] .file-icon.document { color: #60a5fa; }
[data-theme="dark"] .file-icon.text { color: #94a3b8; }
[data-theme="dark"] .file-icon.archive { color: #fbbf24; }
[data-theme="dark"] .file-icon.code { color: #818cf8; }

/* OLED-specific optimizations */
@media (prefers-color-scheme: dark) {
    [data-theme="dark"] {
        .file-card {
            background-color: rgba(0, 0, 0, 0.8);
        }
        
        .file-preview {
            background-color: rgba(0, 0, 0, 0.5);
        }
        
        .file-upload-area {
            background-color: rgba(0, 0, 0, 0.5);
        }
        
        .file-details-page .card {
            background-color: rgba(0, 0, 0, 0.8);
        }
    }
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .card {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
    transition: color var(--transition-speed) ease;
}

.card-body {
    padding: 1rem;
    background-color: transparent;
    transition: background-color var(--transition-speed) ease;
}

/* Kanban Board */
.kanban-board {
    background-color: var(--bg-body);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed) ease;
}

.kanban-column {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .kanban-column {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.kanban-column-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    transition: border-color var(--transition-speed) ease;
}

[data-theme="dark"] .kanban-column-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kanban-column-title {
    color: var(--text-primary);
    font-weight: 600;
    transition: color var(--transition-speed) ease;
}

.kanban-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .kanban-card {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .kanban-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

.kanban-card .priority {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-primary);
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .table {
    background-color: rgba(0, 0, 0, 0.8);
}

.table th {
    background-color: var(--bg-hover);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
    text-align: center;
    vertical-align: middle;
}

[data-theme="dark"] .table th {
    background-color: rgba(31, 41, 55, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
    background-color: transparent !important;
    vertical-align: middle;
}

[data-theme="dark"] .table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: transparent !important;
}

/* Table Rows */
.table tbody tr {
    transition: all var(--transition-speed) ease;
    text-align: center;
}

.table tbody tr:hover {
    background-color: var(--bg-hover);
}

[data-theme="dark"] .table tbody tr:hover {
    background-color: rgba(31, 41, 55, 0.5);
}

/* Form Controls */
.form-control {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .form-control {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    outline: none;
}

[data-theme="dark"] .form-control:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 0.2rem rgba(129, 140, 248, 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
    transition: color var(--transition-speed) ease;
}

/* Select Dropdowns */
select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

[data-theme="dark"] select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f3f4f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* Checkboxes and Radio Buttons */
.form-check-input {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .form-check-input {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

[data-theme="dark"] .form-check-input:checked {
    background-color: #818cf8;
    border-color: #818cf8;
}

/* Labels */
.form-label {
    color: var(--text-primary);
    transition: color var(--transition-speed) ease;
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

/* Form Text */
.form-text {
    color: var(--text-muted);
    transition: color var(--transition-speed) ease;
}

/* Invalid Form Controls */
.form-control.is-invalid {
    border-color: var(--danger);
}

[data-theme="dark"] .form-control.is-invalid {
    border-color: #f87171;
}

.invalid-feedback {
    color: var(--danger);
}

[data-theme="dark"] .invalid-feedback {
    color: #f87171;
}

/* Valid Form Controls */
.form-control.is-valid {
    border-color: var(--success);
}

[data-theme="dark"] .form-control.is-valid {
    border-color: #4ade80;
}

.valid-feedback {
    color: var(--success);
}

[data-theme="dark"] .valid-feedback {
    color: #4ade80;
}

/* OLED-specific optimizations */
@media (prefers-color-scheme: dark) {
    [data-theme="dark"] {
        .card {
            background-color: rgba(0, 0, 0, 0.8);
        }
        
        .kanban-column {
            background-color: rgba(0, 0, 0, 0.8);
        }
        
        .kanban-card {
            background-color: rgba(0, 0, 0, 0.8);
        }
        
        .table {
            background-color: rgba(0, 0, 0, 0.8);
        }
        
        .form-control {
            background-color: rgba(0, 0, 0, 0.8);
        }
    }
}

/* Form Switches */
.form-switch .form-check-input {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba(0, 0, 0, 0.25)'/%3e%3c/svg%3e");
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .form-switch .form-check-input {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba(255, 255, 255, 0.25)'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

[data-theme="dark"] .form-switch .form-check-input:checked {
    background-color: #818cf8;
    border-color: #818cf8;
}

/* Form Select */
.form-select {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .form-select {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f3f4f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

[data-theme="dark"] .form-select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 0.2rem rgba(129, 140, 248, 0.25);
}

/* Form Check Label */
.form-check-label {
    color: var(--text-primary);
    transition: color var(--transition-speed) ease;
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

/* Input Group Text */
.input-group-text {
    background-color: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .input-group-text {
    background-color: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Input Group Addon */
.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > .form-control:not(:last-child),
.input-group > .form-select:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Input Group Focus States */
.input-group:focus-within .input-group-text {
    border-color: var(--primary);
}

[data-theme="dark"] .input-group:focus-within .input-group-text {
    border-color: #818cf8;
}

/* OLED-specific optimizations */
@media (prefers-color-scheme: dark) {
    [data-theme="dark"] {
        .form-switch .form-check-input {
            background-color: rgba(0, 0, 0, 0.8);
        }
        
        .form-select {
            background-color: rgba(0, 0, 0, 0.8);
        }
        
        .input-group-text {
            background-color: rgba(0, 0, 0, 0.8);
        }
    }
}

/* Card Text */
.card-text {
    color: var(--text-primary);
    transition: color var(--transition-speed) ease;
}

[data-theme="dark"] .card-text {
    color: var(--text-primary);
}

/* Pre-formatted Text */
pre {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    padding: 1rem;
    overflow-x: auto;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] pre {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Table Cells */
.table td {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .table td {
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table td:hover {
    background-color: var(--bg-hover);
}

[data-theme="dark"] .table td:hover {
    background-color: rgba(31, 41, 55, 0.5);
}

/* OLED-specific optimizations */
@media (prefers-color-scheme: dark) {
    [data-theme="dark"] {
        .btn-icon {
            background-color: rgba(0, 0, 0, 0.8);
        }
        
        pre {
            background-color: rgba(0, 0, 0, 0.8);
        }
        
        .table td {
            background-color: rgba(0, 0, 0, 0.8);
        }
    }
}

/* Table Rows */
.table tbody tr {
    transition: all var(--transition-speed) ease;
    text-align: center;
}

.table tbody tr:hover {
    background-color: var(--bg-hover);
}

[data-theme="dark"] .table tbody tr:hover {
    background-color: rgba(31, 41, 55, 0.5);
}

/* Pagination */
.page-link {
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .page-link {
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-link:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .page-link:hover {
    background-color: rgba(31, 41, 55, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

[data-theme="dark"] .page-item.active .page-link {
    background-color: #818cf8;
    border-color: #818cf8;
    color: white;
}

.page-item.disabled .page-link {
    color: var(--text-muted);
    background-color: var(--bg-card);
    border-color: var(--border-color);
    opacity: 0.5;
}

[data-theme="dark"] .page-item.disabled .page-link {
    color: rgba(255, 255, 255, 0.5);
    background-color: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

/* OLED-specific optimizations */
@media (prefers-color-scheme: dark) {
    [data-theme="dark"] {
        .table tbody tr {
            background-color: rgba(0, 0, 0, 0.8);
        }
        
        .page-link {
            background-color: rgba(0, 0, 0, 0.8);
        }
        
        .page-item.disabled .page-link {
            background-color: rgba(0, 0, 0, 0.8);
        }
    }
}

.settings-section-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1rem;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    background-color: transparent;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .settings-section-title {
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section-title:hover {
    background-color: var(--bg-hover);
}

[data-theme="dark"] .settings-section-title:hover {
    background-color: rgba(31, 41, 55, 0.5);
}

/* OLED-specific optimizations */
@media (prefers-color-scheme: dark) {
    [data-theme="dark"] {
        .settings-section-title {
            background-color: transparent;
        }
        
        .settings-section-title:hover {
            background-color: rgba(31, 41, 55, 0.5);
        }
    }
}

.settings-content {
    padding: 1rem;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .settings-content {
    background-color: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-content:hover {
    background-color: var(--bg-hover);
}

[data-theme="dark"] .settings-content:hover {
    background-color: rgba(31, 41, 55, 0.5);
}

/* OLED-specific optimizations */
@media (prefers-color-scheme: dark) {
    [data-theme="dark"] {
        .settings-content {
            background-color: transparent;
        }
        
        .settings-content:hover {
            background-color: rgba(31, 41, 55, 0.5);
        }
    }
}

.tab-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: -1px;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .tab-content {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-pane {
    display: none;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.tab-pane.active {
    display: block;
    opacity: 1;
}

.tab-pane.fade {
    opacity: 0;
}

.tab-pane.fade.show {
    opacity: 1;
}

/* OLED-specific optimizations */
@media (prefers-color-scheme: dark) {
    [data-theme="dark"] {
        .tab-content {
            background-color: transparent;
        }
        
        .tab-content:hover {
            background-color: rgba(31, 41, 55, 0.5);
        }
    }
}

.timezone-clock-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .timezone-clock-container {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.time-display {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.5rem;
    font-family: 'Inter', monospace;
    transition: color var(--transition-speed) ease;
}

.date-display {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1rem;
    transition: color var(--transition-speed) ease;
}

.quick-select-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color var(--transition-speed) ease;
}

.quick-timezone {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin: 0.25rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .quick-timezone {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-timezone:hover {
    background-color: var(--bg-hover);
    transform: translateY(-1px);
}

[data-theme="dark"] .quick-timezone:hover {
    background-color: rgba(31, 41, 55, 0.5);
}

.quick-timezone.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

[data-theme="dark"] .quick-timezone.active {
    background-color: #818cf8;
    border-color: #818cf8;
}

.full-datetime-preview {
    font-family: 'Inter', monospace;
    font-size: 1rem;
    color: var(--text-primary);
    padding: 1rem;
    background-color: var(--bg-hover);
    border-radius: var(--border-radius);
    margin-top: 1rem;
    text-align: center;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .full-datetime-preview {
    background-color: rgba(31, 41, 55, 0.5);
}

/* OLED optimizations */
@media (prefers-color-scheme: dark) {
    [data-theme="dark"] {
        .timezone-clock-container {
            background-color: transparent;
        }
        
        .quick-timezone {
            background-color: transparent;
        }
        
        .full-datetime-preview {
            background-color: rgba(31, 41, 55, 0.5);
        }
    }
}

.timeFormatPreview,
.dateFormatPreview {
    font-family: 'Inter', monospace;
    font-size: 1rem;
    color: var(--text-primary);
    padding: 1rem;
    background-color: var(--bg-hover);
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
    text-align: center;
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .timeFormatPreview,
[data-theme="dark"] .dateFormatPreview {
    background-color: rgba(31, 41, 55, 0.5);
}

/* OLED optimizations */
@media (prefers-color-scheme: dark) {
    [data-theme="dark"] {
        .timeFormatPreview,
        .dateFormatPreview {
            background-color: rgba(31, 41, 55, 0.5);
        }
    }
}

.settings-content {
    padding: 1rem;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

[data-theme="dark"] .settings-content {
    background-color: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* OLED-specific optimizations */
@media (prefers-color-scheme: dark) {
    [data-theme="dark"] {
        .settings-content {
            background-color: transparent;
        }
    }
}

/* Modal Styles */
.modal-content {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed) ease,
                border-color var(--transition-speed) ease;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    transition: border-color var(--transition-speed) ease;
}

.modal-title {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
    transition: color var(--transition-speed) ease;
}

.modal-body {
    padding: 1rem;
    color: var(--text-primary);
    transition: color var(--transition-speed) ease;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    transition: border-color var(--transition-speed) ease;
}

/* Dark Mode Modal Styles */
[data-theme="dark"] .modal-content {
    background-color: rgba(17, 24, 39, 0.95);
    border-color: rgba(75, 85, 99, 0.3);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: rgba(75, 85, 99, 0.3);
}

[data-theme="dark"] .modal-title {
    color: var(--text-primary);
}

[data-theme="dark"] .modal-body {
    color: var(--text-primary);
}

[data-theme="dark"] .modal-footer {
    border-top-color: rgba(75, 85, 99, 0.3);
}

/* OLED Optimizations for Modals */
@media (prefers-color-scheme: dark) and (prefers-contrast: more) {
    [data-theme="dark"] .modal-content {
        background-color: rgba(0, 0, 0, 0.95);
    }
    
    [data-theme="dark"] .modal-header,
    [data-theme="dark"] .modal-footer {
        border-color: rgba(31, 41, 55, 0.5);
    }
}