/*
    === RIDGECOMMAND SPECIFIC STYLES ===
    
    This file contains RidgeCommand-specific styling that extends the corporate design system.
    It implements the four-component layout system and real-time features described in the guide.
*/

/* === FOUR-COMPONENT LAYOUT SYSTEM === */

/* 1. Fixed Top Navigation Bar with Real-time Features */
.navbar-top {
    background: var(--gradient-primary);
    height: 40px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.navbar-top .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Real-time Stats Display */
.navbar-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    height: 100%;
}

.stat-item {
    display: flex;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.15rem 0.5rem;
    min-width: 32px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: 28px;
    flex-direction: row;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.3s ease;
    opacity: 0;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    margin: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.stat-item:hover .stat-icon {
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.stat-number {
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin: 0;
    transition: all 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.5px;
}

.stat-item:hover .stat-number {
    transform: scale(1.15);
    color: white;
}

/* Animation for stat updates */
@keyframes statPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes statGlow {
    0% { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(255, 255, 255, 0.3); }
    100% { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
}

.stat-number.updated {
    animation: statPulse 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item.updated {
    animation: statGlow 0.6s ease-in-out;
}

/* Smooth entrance animation */
@keyframes statEntrance {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.stat-item {
    animation: statEntrance 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }
.stat-item:nth-child(5) { animation-delay: 0.5s; }

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.stat-label {
    display: none;
}

/* Specific stat item styling */
.stat-inbox {
    border-color: rgba(255, 193, 7, 0.3);
    background: rgba(255, 193, 7, 0.08);
}

.stat-inbox::before {
    background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.6), transparent);
}

.stat-inbox:hover {
    border-color: rgba(255, 193, 7, 0.5);
    background: rgba(255, 193, 7, 0.15);
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.3);
}

.stat-open {
    border-color: rgba(13, 110, 253, 0.3);
    background: rgba(13, 110, 253, 0.08);
}

.stat-open::before {
    background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.6), transparent);
}

.stat-open:hover {
    border-color: rgba(13, 110, 253, 0.5);
    background: rgba(13, 110, 253, 0.15);
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.3);
}

.stat-progress {
    border-color: rgba(255, 152, 0, 0.3);
    background: rgba(255, 152, 0, 0.08);
}

.stat-progress::before {
    background: linear-gradient(90deg, transparent, rgba(255, 152, 0, 0.6), transparent);
}

.stat-progress:hover {
    border-color: rgba(255, 152, 0, 0.5);
    background: rgba(255, 152, 0, 0.15);
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.3);
}

.stat-completed {
    border-color: rgba(25, 135, 84, 0.3);
    background: rgba(25, 135, 84, 0.08);
}

.stat-completed::before {
    background: linear-gradient(90deg, transparent, rgba(25, 135, 84, 0.6), transparent);
}

.stat-completed:hover {
    border-color: rgba(25, 135, 84, 0.5);
    background: rgba(25, 135, 84, 0.15);
    box-shadow: 0 4px 16px rgba(25, 135, 84, 0.3);
}

.stat-total {
    border-color: rgba(108, 117, 125, 0.3);
    background: rgba(108, 117, 125, 0.08);
}

.stat-total::before {
    background: linear-gradient(90deg, transparent, rgba(108, 117, 125, 0.6), transparent);
}

.stat-total:hover {
    border-color: rgba(108, 117, 125, 0.5);
    background: rgba(108, 117, 125, 0.15);
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.3);
}


/* 2. Overlapping Logo System */
.logo-wrapper {
    position: fixed;
    top: 3px;
    left: 0;
    width: 200px;
    height: 80px;
    z-index: 1051;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none !important;
    border-bottom: 0px solid rgba(255, 255, 255, 0.1);
    box-shadow: none !important;
    outline: none !important;
}

.sidebar-logo-overlapping {
    max-height: 70px;
    width: auto;
    margin: 0;
    padding: 0;
    filter: none;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    padding: 4px;
}

.logo-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.logo-link:active {
    transform: scale(0.98);
}

/* 3. Left Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 40px;
    left: 0;
    width: 250px;
    height: calc(100vh - 40px);
    background: var(--gradient-primary);
    z-index: 1020;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 48px;
}

.sidebar-inner {
    padding-top: 4rem !important;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.sidebar-nav,
.sidebar-nav ul,
.sidebar-nav li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 0.75rem 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border-right: 3px solid white;
}

.sidebar-nav .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.sidebar-nav .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
}

.sidebar.collapsed .sidebar-nav .nav-link span,
.sidebar.collapsed .sidebar-section-title {
    display: none;
}

.sidebar.collapsed .sidebar-nav .nav-link {
    text-align: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .sidebar-nav .nav-link i {
    margin-right: 0;
    font-size: 1rem;
}

/* 4. Main Content Area */
.content-area {
    flex: 1;
    padding: 0.5rem;
    background: var(--light-bg);
    overflow-y: auto;
    transition: all 0.3s ease;
    margin-top: 40px;
    margin-left: 250px;
}

.content-area.expanded {
    margin-left: 48px;
}

/* === CORPORATE COMPONENTS === */

/* Cards with Equal Height Management */
.card {
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(90, 111, 156, 0.08);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(90, 111, 156, 0.12);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    border: none;
}

.card-body {
    padding: 1rem;
    background: white;
    color: var(--text-primary);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Corporate Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(90, 111, 156, 0.15);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

.btn-secondary {
    background: var(--gradient-secondary);
    border: none;
    color: white;
}

.btn-success {
    background: var(--gradient-success);
    border: none;
    color: white;
}

.btn-warning {
    background: var(--gradient-warning);
    border: none;
    color: white;
}

.btn-orange {
    background: var(--gradient-orange);
    border: none;
    color: white;
}

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

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

/* Status Badges */
.badge {
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0.2rem 0.5rem;
}

.badge-primary {
    background: var(--gradient-primary);
    color: white;
}

.badge-success {
    background: var(--gradient-success);
    color: white;
}

.badge-warning {
    background: var(--gradient-warning);
    color: white;
}

.badge-danger {
    background: var(--danger-color);
    color: white;
}

.badge-primary-muted {
    background: var(--gradient-secondary);
    color: white;
}

/* Form Elements */
.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(90, 111, 156, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Stats Cards */
.stats-overview {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    flex: 1;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(90, 111, 156, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(90, 111, 156, 0.12);
}

.stat-card.highlight-orange-muted {
    background: linear-gradient(135deg, rgba(237, 137, 54, 0.1), rgba(246, 173, 85, 0.1));
    border-color: var(--accent-orange-muted);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    display: block;
}

/* Task Entry Forms */
.task-entry-section {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(90, 111, 156, 0.08);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.quick-entry-form {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.comprehensive-entry-form {
    margin-top: 1rem;
}

/* === INBOX ENHANCED STYLES === */

/* Inbox Header */
.inbox-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(90, 111, 156, 0.15);
    margin-bottom: 2rem;
}

.inbox-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.inbox-header-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.inbox-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.inbox-header-icon i {
    font-size: 1.5rem;
    color: white;
}

.inbox-header-text {
    flex: 1;
}

.inbox-title {
    color: white;
    font-weight: 600;
    margin: 0;
    font-size: 1.5rem;
}

.inbox-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.inbox-header-stats {
    display: flex;
    align-items: center;
}

.inbox-stat-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
}

.inbox-stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    display: block;
}

.inbox-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
    display: block;
}

/* Inbox Content */
.inbox-content {
    margin-top: 1rem;
}

.inbox-items-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Inbox Item Cards */
.inbox-item-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(90, 111, 156, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inbox-item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-orange), var(--primary-color));
    border-radius: 0 2px 2px 0;
    transition: width 0.3s ease;
}

.inbox-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(90, 111, 156, 0.12);
    border-color: var(--primary-color);
}

.inbox-item-card:hover::before {
    width: 6px;
}

.inbox-item-card:nth-child(1) { animation-delay: 0.1s; }
.inbox-item-card:nth-child(2) { animation-delay: 0.2s; }
.inbox-item-card:nth-child(3) { animation-delay: 0.3s; }
.inbox-item-card:nth-child(4) { animation-delay: 0.4s; }
.inbox-item-card:nth-child(5) { animation-delay: 0.5s; }

.inbox-item-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.inbox-item-main {
    flex: 1;
}

.inbox-item-text {
    margin-bottom: 0.75rem;
}

.inbox-item-description {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.inbox-item-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.inbox-item-timestamp {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.inbox-item-timestamp i {
    font-size: 0.75rem;
}

.inbox-item-id {
    background: var(--light-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
}

.inbox-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Inbox Action Buttons */
.btn-process {
    background: var(--gradient-orange);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(237, 137, 54, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-process::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-process:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(237, 137, 54, 0.3);
    color: white;
}

.btn-process:hover::before {
    left: 100%;
}

.btn-process:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(237, 137, 54, 0.2);
}

.btn-copy {
    background: var(--light-bg);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.btn-copy:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.btn-copy:active {
    transform: scale(0.95);
}

.btn-delete {
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.btn-delete:hover {
    background: var(--danger-color);
    color: white;
    transform: scale(1.05);
}

.btn-delete:active {
    transform: scale(0.95);
}

/* Enhanced Modal Styles */
.task-processing-modal {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 32px rgba(90, 111, 156, 0.2);
}

/* Mobile Modal Responsiveness */
@media (max-width: 767px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
    
    .modal-dialog.modal-lg {
        max-width: calc(100vw - 1rem);
    }
    
    .task-processing-modal {
        border-radius: 8px;
        margin: 0;
    }
    
    .task-processing-modal .modal-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .modal-header-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .modal-header-icon {
        width: 36px;
        height: 36px;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-subtitle {
        font-size: 0.8rem;
    }
    
    .task-processing-modal .modal-body {
        padding: 1rem;
    }
    
    .task-processing-modal .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Form sections mobile */
    .form-section {
        margin-bottom: 1.5rem;
    }
    
    .form-section-title {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    /* Form rows mobile */
    .row {
        margin: 0;
    }
    
    .row > * {
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .row > *:last-child {
        margin-bottom: 0;
    }
    
    /* Form controls mobile */
    .form-control,
    .form-select {
        padding: 0.75rem;
        font-size: 0.9rem;
        min-height: 48px;
        border-radius: 8px;
    }
    
    .form-label {
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    /* Tag selection mobile */
    .tag-selection-container {
        padding: 1rem;
    }
    
    .tag-option {
        display: block;
        margin: 0.5rem 0;
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .tag-label {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .new-tag-section input {
        padding: 0.75rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    /* Original capture alert mobile */
    .original-capture-alert {
        padding: 0.75rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .alert-icon {
        font-size: 1.5rem;
    }
    
    .original-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* Tablet Modal Responsiveness */
@media (min-width: 768px) and (max-width: 1023px) {
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .modal-dialog.modal-lg {
        max-width: calc(100vw - 2rem);
    }
    
    .task-processing-modal .modal-header {
        padding: 1.25rem;
    }
    
    .task-processing-modal .modal-body {
        padding: 1.25rem;
    }
    
    .task-processing-modal .modal-footer {
        padding: 1.25rem;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
}

.task-processing-modal .modal-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 1.5rem;
    border: none;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.modal-header-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-header-icon i {
    font-size: 1.25rem;
    color: white;
}

.modal-header-text {
    flex: 1;
}

.modal-title {
    color: white;
    font-weight: 600;
    margin: 0;
    font-size: 1.25rem;
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.task-processing-modal .modal-body {
    padding: 1.5rem;
}

/* Original Capture Alert */
.original-capture-alert {
    background: linear-gradient(135deg, rgba(90, 111, 156, 0.05), rgba(90, 111, 156, 0.1));
    border: 1px solid rgba(90, 111, 156, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.original-text {
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
    line-height: 1.4;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.form-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

/* Empty State */
.empty-inbox-state {
    background: white;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(90, 111, 156, 0.08);
    border: 1px solid var(--border-color);
    margin: 2rem 0;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(90, 111, 156, 0.1), rgba(90, 111, 156, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border: 2px solid var(--border-color);
}

.empty-state-icon i {
    font-size: 2rem;
    color: var(--text-muted);
}

.empty-state-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-state-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.empty-state-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.empty-state-actions {
    margin-top: 1.5rem;
}

/* === UTILITIES === */

.text-orange {
    color: var(--accent-orange) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Focus states for accessibility */
:focus-visible {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

/* Touch and Interaction Improvements */
@media (max-width: 767px) {
    /* Touch targets - minimum 44x44px */
    .btn,
    .nav-link,
    .dropdown-toggle,
    .form-control,
    .form-select,
    .sidebar-toggle,
    .task-card-actions .btn,
    .inbox-item-actions .btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    /* Button improvements */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 8px;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Link improvements */
    a {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Form improvements */
    .form-control,
    .form-select {
        padding: 0.75rem;
        font-size: 0.9rem;
        border-radius: 8px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    .form-control:focus,
    .form-select:focus {
        box-shadow: 0 0 0 3px rgba(90, 111, 156, 0.1);
        border-color: var(--primary-color);
    }
    
    /* Navigation improvements */
    .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    .nav-link:active {
        background-color: rgba(255, 255, 255, 0.1);
        transform: scale(0.98);
    }
    
    /* Sidebar improvements */
    .sidebar-nav .nav-link {
        padding: 1rem 0.75rem;
        margin-bottom: 0.25rem;
        border-radius: 8px;
    }
    
    .sidebar-nav .nav-link:active {
        background-color: rgba(255, 255, 255, 0.15);
        transform: scale(0.98);
    }
    
    /* Card improvements */
    .task-card,
    .inbox-item-card,
    .mobile-task-card {
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .task-card:active,
    .inbox-item-card:active,
    .mobile-task-card:active {
        transform: scale(0.99);
        transition: transform 0.1s ease;
    }
    
    /* Modal improvements */
    .modal-dialog {
        touch-action: pan-y;
    }
    
    .modal-content {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Dropdown improvements */
    .dropdown-menu {
        -webkit-overflow-scrolling: touch;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .dropdown-item:active {
        background-color: var(--light-bg);
        transform: scale(0.98);
    }
    
    /* Tab improvements */
    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        min-height: 44px;
        border-radius: 8px 8px 0 0;
    }
    
    .nav-tabs .nav-link:active {
        background-color: rgba(90, 111, 156, 0.05);
        transform: scale(0.98);
    }
    
    /* Swipe-friendly areas */
    .swipe-area {
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent zoom on input focus */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    input[type="date"],
    input[type="time"],
    textarea,
    select {
        font-size: 16px;
    }
    
    /* Improved hover states for touch devices */
    @media (hover: none) and (pointer: coarse) {
        .btn:hover,
        .nav-link:hover,
        .task-card:hover,
        .inbox-item-card:hover {
            transform: none;
            box-shadow: none;
        }
        
        .btn:focus,
        .nav-link:focus,
        .task-card:focus,
        .inbox-item-card:focus {
            transform: scale(1.02);
            box-shadow: 0 2px 8px rgba(90, 111, 156, 0.15);
        }
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
} 

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-notification.toast-success {
    background: var(--gradient-success);
}

.toast-notification.toast-error {
    background: var(--danger-color);
}

.toast-notification.toast-info {
    background: var(--gradient-primary);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.toast-content i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Responsive Design for Inbox */
@media (max-width: 768px) {
    .inbox-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .inbox-header-main {
        flex-direction: column;
        text-align: center;
    }
    
    .inbox-item-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .inbox-item-actions {
        justify-content: flex-start;
        width: 100%;
    }
    
    .inbox-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .empty-inbox-state {
        padding: 2rem 1rem;
    }
} 

/* === DASHBOARD ENHANCED STYLES === */

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    padding: 2rem;
    color: white;
    box-shadow: 0 8px 24px rgba(90, 111, 156, 0.15);
    margin-bottom: 2rem;
}

.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.dashboard-header-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.dashboard-header-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dashboard-header-icon i {
    font-size: 1.75rem;
    color: white;
}

.dashboard-header-text {
    flex: 1;
}

.dashboard-title {
    color: white;
    font-weight: 700;
    margin: 0;
    font-size: 2rem;
    line-height: 1.2;
}

.dashboard-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
}

.dashboard-header-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-stat-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
    transition: all 0.3s ease;
}

.dashboard-stat-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.dashboard-stat-card.highlight-progress {
    background: linear-gradient(135deg, rgba(237, 137, 54, 0.2), rgba(246, 173, 85, 0.2));
    border-color: rgba(237, 137, 54, 0.3);
}

.dashboard-stat-card.highlight-completed {
    background: linear-gradient(135deg, rgba(56, 161, 105, 0.2), rgba(72, 187, 120, 0.2));
    border-color: rgba(56, 161, 105, 0.3);
}

.dashboard-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    display: block;
}

.dashboard-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    display: block;
}

/* Task Entry Container */
.task-entry-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Quick Entry Section */
.quick-entry-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(90, 111, 156, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.quick-entry-section:hover {
    box-shadow: 0 6px 20px rgba(90, 111, 156, 0.12);
    transform: translateY(-1px);
}

.quick-entry-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quick-entry-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-muted));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-entry-icon i {
    font-size: 1.25rem;
    color: white;
}

.quick-entry-text {
    flex: 1;
}

.quick-entry-title {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
}

.quick-entry-subtitle {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.quick-entry-form {
    margin: 0;
}

.quick-entry-input-group {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.quick-entry-input {
    flex: 1;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.quick-entry-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(90, 111, 156, 0.1);
}

.btn-quick-add {
    background: var(--gradient-orange);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(237, 137, 54, 0.2);
    min-width: 120px;
    justify-content: center;
}

.btn-quick-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
    color: white;
}

/* Structured Task Section */
.structured-task-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(90, 111, 156, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.structured-task-section:hover {
    box-shadow: 0 6px 20px rgba(90, 111, 156, 0.12);
    transform: translateY(-1px);
}

.structured-task-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.structured-task-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.structured-task-icon i {
    font-size: 1.25rem;
    color: white;
}

.structured-task-text {
    flex: 1;
}

.structured-task-title {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
}

.structured-task-subtitle {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.structured-task-form {
    margin: 0;
}

.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-create-task {
    background: var(--gradient-success);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(56, 161, 105, 0.2);
    width: 100%;
    justify-content: center;
}

.btn-create-task:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.3);
    color: white;
}

/* Enhanced Navigation Tabs */
.dashboard-tabs-container {
    margin-bottom: 2rem;
}

.dashboard-tabs {
    border: none;
    background: white;
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(90, 111, 156, 0.08);
    border: 1px solid var(--border-color);
    gap: 0.5rem;
}

.dashboard-tabs .nav-link {
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-tabs .nav-link:hover {
    color: var(--primary-color);
    background: rgba(90, 111, 156, 0.05);
    transform: translateY(-1px);
}

.dashboard-tabs .nav-link.active {
    color: white;
    background: var(--gradient-primary);
    box-shadow: 0 2px 8px rgba(90, 111, 156, 0.2);
}

.tab-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 12px;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.dashboard-tabs .nav-link:not(.active) .tab-badge {
    background: var(--light-bg);
    color: var(--text-muted);
}

/* Dashboard Tab Content */
.dashboard-tab-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(90, 111, 156, 0.08);
    border: 1px solid var(--border-color);
    min-height: 400px;
}

/* Responsive Design for Dashboard */
@media (max-width: 767px) {
    /* Dashboard header mobile */
    .dashboard-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .dashboard-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        width: 100%;
        overflow: hidden;
    }
    
    /* Ensure dashboard content doesn't overflow */
    .dashboard-content {
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Fix any right panels that might be cut off */
    .dashboard-right-panel,
    .dashboard-sidebar {
        width: 100%;
        margin-top: 1rem;
        position: static;
    }
    
    .dashboard-header-main {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .dashboard-header-icon {
        width: 48px;
        height: 48px;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .dashboard-subtitle {
        font-size: 0.9rem;
    }
    
    .dashboard-header-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .dashboard-stat-card {
        min-width: 80px;
        padding: 0.75rem 1rem;
    }
    
    .dashboard-stat-number {
        font-size: 1.5rem;
    }
    
    .dashboard-stat-label {
        font-size: 0.7rem;
    }
    
    /* Task entry container mobile */
    .task-entry-container {
        gap: 1rem;
    }
    
    .quick-entry-section {
        padding: 1rem;
    }
    
    .quick-entry-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .quick-entry-icon {
        width: 40px;
        height: 40px;
    }
    
    .quick-entry-title {
        font-size: 1.1rem;
    }
    
    .quick-entry-input-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .quick-entry-input {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    .btn-quick-add {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Structured task section mobile */
    .structured-task-section {
        padding: 1rem;
    }
    
    .structured-task-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .structured-task-icon {
        width: 40px;
        height: 40px;
    }
    
    .structured-task-title {
        font-size: 1.1rem;
    }
    
    /* Form sections mobile */
    .form-section {
        margin-bottom: 1.5rem;
    }
    
    .form-section-title {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    /* Dashboard tabs mobile */
    .dashboard-tabs-container {
        margin-bottom: 1rem;
    }
    
    .dashboard-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
        padding: 0.25rem;
    }
    
    .dashboard-tabs .nav-link {
        flex: 1;
        min-width: 100px;
        justify-content: center;
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .dashboard-tab-content {
        padding: 1rem;
    }
    
    /* Inbox responsive styles */
    .inbox-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .inbox-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .inbox-header-main {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .inbox-header-icon {
        width: 40px;
        height: 40px;
    }
    
    .inbox-title {
        font-size: 1.25rem;
    }
    
    .inbox-subtitle {
        font-size: 0.85rem;
    }
    
    .inbox-stat-card {
        min-width: 100px;
        padding: 0.75rem 1rem;
    }
    
    .inbox-stat-number {
        font-size: 1.5rem;
    }
    
    .inbox-stat-label {
        font-size: 0.7rem;
    }
    
    /* Inbox items mobile */
    .inbox-item-card {
        padding: 1rem;
    }
    
    .inbox-item-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .inbox-item-actions {
        justify-content: flex-start;
        width: 100%;
        gap: 0.5rem;
    }
    
    .inbox-item-actions .btn {
        flex: 1;
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
    }
    
    .inbox-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .empty-inbox-state {
        padding: 2rem 1rem;
    }
    
    .empty-state-icon {
        width: 60px;
        height: 60px;
    }
    
    .empty-state-title {
        font-size: 1.25rem;
    }
    
    .empty-state-description {
        font-size: 0.9rem;
    }
}

/* Tablet Dashboard */
@media (min-width: 768px) and (max-width: 1023px) {
    .dashboard-header {
        padding: 1.75rem;
    }
    
    .dashboard-header-content {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .dashboard-header-main {
        flex-direction: row;
        gap: 1rem;
    }
    
    .dashboard-header-stats {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .dashboard-stat-card {
        min-width: 120px;
    }
    
    .quick-entry-input-group {
        flex-direction: row;
    }
    
    .btn-quick-add {
        width: auto;
        min-width: 120px;
    }
    
    .dashboard-tabs .nav-link {
        flex: 1;
        min-width: 100px;
    }
    
    .inbox-header-content {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .inbox-header-main {
        flex-direction: row;
        gap: 1rem;
    }
    
    .inbox-item-content {
        flex-direction: row;
        gap: 1rem;
    }
    
    .inbox-item-actions {
        justify-content: flex-end;
        width: auto;
    }
}

@media (max-width: 1545px) {
    .navbar-stats {
        gap: 0.4rem;
    }
    
    .stat-item {
        min-width: 28px;
        padding: 0.1rem 0.4rem;
        height: 24px;
    }
    
    .stat-number {
        font-size: 0.65rem;
    }
    
    .stat-icon {
        font-size: 0.55rem;
    }
}

@media (max-width: 1200px) {
    .navbar-stats {
        gap: 0.3rem;
    }
    
    .stat-item {
        min-width: 26px;
        padding: 0.075rem 0.3rem;
        height: 22px;
    }
    
    .stat-icon {
        font-size: 0.5rem;
    }
    
    .stat-number {
        font-size: 0.6rem;
    }
}

/* Mobile Navigation Enhancements */
@media (max-width: 767px) {
    /* Navbar adjustments */
    .navbar-top {
        height: 50px;
        padding: 0.5rem 0.75rem;
        flex-wrap: nowrap;
        overflow: hidden;
    }
    
    .navbar-top .container-fluid {
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 0.5rem;
    }
    
    /* Hide navbar stats on mobile to prevent overflow */
    .navbar-stats {
        display: none !important;
    }
    
    /* Ensure navbar brand doesn't overflow */
    .navbar-brand {
        flex-shrink: 0;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Ensure navbar nav doesn't overflow */
    .navbar-nav {
        flex-shrink: 0;
        margin-left: auto;
        max-width: 50%;
    }
    
    /* Fix any buttons that might overflow */
    .navbar-nav .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 80px;
    }
    
    /* Ensure dropdown menus don't cause overflow */
    .navbar-nav .dropdown-menu {
        right: 0;
        left: auto;
        min-width: 200px;
        max-width: 90vw;
    }
    
    /* Sidebar toggle button */
    .sidebar-toggle {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        padding: 0.5rem;
        border-radius: 6px;
        transition: all 0.2s ease;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar-toggle:hover {
        background: rgba(255, 255, 255, 0.2);
        color: white;
    }
    
    .sidebar-toggle .navbar-toggler-icon {
        width: 20px;
        height: 20px;
    }
    
    /* User dropdown mobile adjustments */
    .navbar-nav .dropdown-toggle {
        padding: 0.5rem;
        min-width: 44px;
        min-height: 44px;
        font-size: 0.8rem;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .navbar-nav .avatar {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
    
    /* Hide user text on very small screens */
    .navbar-nav .dropdown-toggle .user-text {
        display: none;
    }
    
    /* Show only avatar and badge on mobile */
    .navbar-nav .dropdown-toggle .user-info {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
    
    .navbar-nav .dropdown-menu {
        right: 0;
        left: auto;
        min-width: 200px;
        margin-top: 0.5rem;
    }
    
    /* Logo adjustments */
    .logo-wrapper {
        display: none;
    }
    
    /* Sidebar mobile behavior */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1000;
        transition: transform 0.3s ease;
        position: fixed;
        top: 50px;
        left: 0;
        height: calc(100vh - 50px);
        overflow-y: auto;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    /* Sidebar overlay for mobile */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    .sidebar-inner {
        padding-top: 1rem;
    }
    
    .sidebar-nav .nav-link {
        padding: 1rem 0.75rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .sidebar-nav .nav-link i {
        width: 24px;
        margin-right: 1rem;
        font-size: 1.1rem;
    }
    
    /* Content area adjustments */
    .content-area {
        margin-left: 0;
        width: 100%;
        padding: 0.5rem;
        margin-top: 0;
        min-height: calc(100vh - 50px);
    }
}

/* Tablet Navigation */
@media (min-width: 768px) and (max-width: 1023px) {
    .navbar-top {
        height: 45px;
    }
    
    .sidebar-toggle {
        min-width: 40px;
        min-height: 40px;
    }
    
    .navbar-nav .dropdown-toggle {
        min-width: 40px;
        min-height: 40px;
    }
    
    .navbar-nav .avatar {
        width: 36px;
        height: 36px;
    }
    
    .logo-wrapper {
        display: none;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 250px;
        z-index: 1000;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .content-area {
        margin-left: 0;
        width: 100%;
        padding: 0.75rem;
    }
}

/* Desktop Navigation */
@media (min-width: 1024px) {
    .navbar-stats {
        display: flex !important;
    }
    
    .logo-wrapper {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(0);
        width: 250px;
    }
    
    .content-area {
        margin-left: 250px;
    }
}

/* Final Responsive Refinements */
@media (max-width: 767px) {
    /* Ensure no horizontal scrolling */
    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    /* Prevent any container from causing horizontal scroll */
    .container,
    .container-fluid,
    .row {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Fix any elements that might cause overflow */
    .card,
    .modal,
    .dropdown-menu {
        max-width: 100%;
        word-wrap: break-word;
    }
    
    /* Improve text selection */
    ::selection {
        background: var(--primary-color);
        color: white;
    }
    
    /* Better focus indicators */
    .btn:focus,
    .form-control:focus,
    .form-select:focus,
    .nav-link:focus {
        outline: 2px solid var(--accent-orange);
        outline-offset: 2px;
    }
    
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
    }
    
    /* Better touch feedback */
    .btn:active,
    .nav-link:active,
    .task-card:active {
        background-color: rgba(90, 111, 156, 0.1);
    }
    
    /* Improved loading states */
    .loading {
        position: relative;
        pointer-events: none;
    }
    
    .loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        margin: -10px 0 0 -10px;
        border: 2px solid var(--border-color);
        border-top: 2px solid var(--primary-color);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    /* Better error states */
    .is-invalid {
        border-color: var(--danger-color) !important;
        box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1) !important;
    }
    
    .invalid-feedback {
        color: var(--danger-color);
        font-size: 0.8rem;
        margin-top: 0.25rem;
    }
    
    /* Improved success states */
    .is-valid {
        border-color: var(--success-color) !important;
        box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1) !important;
    }
    
    .valid-feedback {
        color: var(--success-color);
        font-size: 0.8rem;
        margin-top: 0.25rem;
    }
}

/* Performance optimizations */
@media (max-width: 767px) {
    /* Reduce animations on mobile for better performance */
    .task-card,
    .inbox-item-card,
    .mobile-task-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    /* Optimize transforms */
    .btn:hover,
    .nav-link:hover {
        transform: translateY(-1px);
    }
    
    /* Reduce box-shadow complexity */
    .card,
    .task-card,
    .inbox-item-card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .card:hover,
    .task-card:hover,
    .inbox-item-card:hover {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }
}

@media (max-width: 768px) {
    .stats-overview {
        flex-direction: column;
    }
    
    .stat-card {
        flex: none;
    }
}

/* Enhanced Task Cards for Other Tabs */
.task-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(90, 111, 156, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

/* Mobile Task Card Layout */
@media (max-width: 767px) {
    .task-card {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .task-card-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .task-card-main {
        width: 100%;
    }
    
    .task-card-title {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }
    
    .task-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .task-card-owner,
    .task-card-status,
    .task-card-priority,
    .task-card-theme,
    .task-card-due {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        background: var(--light-bg);
        display: inline-block;
        margin-bottom: 0.25rem;
    }
    
    .task-card-actions {
        justify-content: flex-start;
        width: 100%;
        gap: 0.5rem;
    }
    
    .task-card-actions .btn {
        flex: 1;
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .task-card-notes {
        margin-top: 0.75rem;
    }
    
    .task-notes-text {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .task-tags {
        margin-top: 0.5rem;
    }
    
    .task-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        margin-right: 0.25rem;
        margin-bottom: 0.25rem;
    }
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 0 2px 2px 0;
    transition: width 0.3s ease;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(90, 111, 156, 0.12);
    border-color: var(--primary-color);
}

.task-card:hover::before {
    width: 6px;
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.task-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.task-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.task-card-owner {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--light-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.task-card-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.task-card-priority {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.task-card-description {
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.task-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.task-card-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Status-specific styling */
.task-card.status-open::before {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.task-card.status-in-progress::before {
    background: linear-gradient(180deg, var(--accent-orange), var(--accent-orange-muted));
}

.task-card.status-closed::before {
    background: linear-gradient(180deg, var(--success-color), #48BB78);
}

/* Priority-specific styling */
.task-card.priority-high .task-card-priority {
    color: var(--danger-color);
    font-weight: 600;
}

.task-card.priority-medium .task-card-priority {
    color: var(--warning-color);
    font-weight: 600;
}

.task-card.priority-low .task-card-priority {
    color: var(--text-muted);
    font-weight: 600;
}

/* Empty state styling for other tabs */
.empty-state {
    background: white;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(90, 111, 156, 0.08);
    border: 1px solid var(--border-color);
    margin: 2rem 0;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(90, 111, 156, 0.1), rgba(90, 111, 156, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border: 2px solid var(--border-color);
}

.empty-state-icon i {
    font-size: 2rem;
    color: var(--text-muted);
}

.empty-state-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-state-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.empty-state-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.empty-state-actions {
    margin-top: 1.5rem;
} 
/* === ALL TASKS PAGE STYLES === */
/* Tasks table */
.tasks-table {
    width: 100%;
    background: white;
    border-collapse: separate;
    border-spacing: 0;
}

/* Mobile table to card conversion */
@media (max-width: 767px) {
    .tasks-table,
    .themes-table,
    .tags-table {
        display: none;
    }
    
    /* Show mobile card view */
    .mobile-card-view {
        display: block;
    }
    
    .mobile-task-card {
        background: white;
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 0.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--border-color);
    }
    
    .mobile-task-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 0.75rem;
    }
    
    .mobile-task-title {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.3;
        flex: 1;
        margin-right: 0.5rem;
    }
    
    .mobile-task-actions {
        display: flex;
        gap: 0.25rem;
        flex-shrink: 0;
    }
    
    .mobile-task-actions .btn {
        padding: 0.375rem;
        min-width: 36px;
        min-height: 36px;
        font-size: 0.75rem;
    }
    
    .mobile-task-meta {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .mobile-task-meta-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    .mobile-task-meta-label {
        font-weight: 500;
        color: var(--text-muted);
        min-width: 60px;
    }
    
    .mobile-task-meta-value {
        color: var(--text-primary);
        background: var(--light-bg);
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
    }
    
    .mobile-task-notes {
        font-size: 0.85rem;
        color: var(--text-muted);
        font-style: italic;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border-color);
    }
    
    .mobile-task-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-top: 0.5rem;
    }
    
    .mobile-task-tag {
        background: var(--primary-color);
        color: white;
        padding: 0.2rem 0.4rem;
        border-radius: 3px;
        font-size: 0.7rem;
    }
}

/* Desktop table view */
@media (min-width: 768px) {
    .mobile-card-view {
        display: none;
    }
    
    .tasks-table,
    .themes-table,
    .tags-table {
        display: table;
    }
}

.tasks-table thead th {
    background: var(--light-bg);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.tasks-table tbody tr.task-row {
    border-bottom: 1px solid var(--border-color);
    background: white;
    transition: background-color 0.2s ease;
}

.tasks-table tbody tr.task-row:hover {
    background: rgba(90, 111, 156, 0.03);
    /* Explicitly prevent any transform to avoid row movement */
    transform: none;
}

.tasks-table tbody tr.task-row td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
}

.task-completed {
    opacity: 0.6;
}

.task-title-cell {
    max-width: 400px;
}

.task-tags-inline {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.task-notes-preview {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-style: italic;
}

/* === THEMES PAGE STYLES === */
/* Themes header */
.themes-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.2);
}

.themes-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.themes-header-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.themes-header-icon {
    font-size: 2rem;
}

.themes-title {
    margin: 0;
    font-weight: 600;
}

.themes-subtitle {
    margin: 0;
    opacity: 0.9;
}

.btn-add-theme {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-add-theme:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Themes table container */
.themes-table-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(90, 111, 156, 0.08);
    border: 1px solid var(--border-color);
}

/* Themes table */
.themes-table {
    width: 100%;
    background: white;
    border-collapse: separate;
    border-spacing: 0;
}

.themes-table thead th {
    background: var(--light-bg);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.themes-table tbody tr.theme-row {
    border-bottom: 1px solid var(--border-color);
    background: white;
    transition: background-color 0.2s ease;
}

.themes-table tbody tr.theme-row:hover {
    background: rgba(79, 172, 254, 0.03);
    /* Explicitly prevent any transform to avoid row movement */
    transform: none;
}

.themes-table tbody tr.theme-row td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
}

.theme-name-cell {
    max-width: 300px;
}

.theme-name-cell strong {
    color: var(--text-primary);
    font-weight: 600;
}

.theme-goal-preview {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-style: italic;
}

.theme-description-cell {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 250px;
}

.theme-task-count {
    color: var(--text-primary);
    font-weight: 500;
}

.theme-task-count i {
    color: var(--primary-color);
}

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

/* No themes message */
.no-themes-message {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.no-themes-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.no-themes-message h5 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-themes-message p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* === TAGS PAGE STYLES === */
/* Tags header */
.tags-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.tags-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tags-header-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tags-header-icon {
    font-size: 2rem;
}

.tags-title {
    margin: 0;
    font-weight: 600;
}

.tags-subtitle {
    margin: 0;
    opacity: 0.9;
}

.btn-add-tag {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-add-tag:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tags table container */
.tags-table-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(90, 111, 156, 0.08);
    border: 1px solid var(--border-color);
}

/* Tags table */
.tags-table {
    width: 100%;
    background: white;
    border-collapse: separate;
    border-spacing: 0;
}

.tags-table thead th {
    background: var(--light-bg);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.tags-table tbody tr.tag-row {
    border-bottom: 1px solid var(--border-color);
    background: white;
    transition: background-color 0.2s ease;
}

.tags-table tbody tr.tag-row:hover {
    background: rgba(102, 126, 234, 0.03);
    /* Explicitly prevent any transform to avoid row movement */
    transform: none;
}

.tags-table tbody tr.tag-row td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
}

.tag-name-cell strong {
    color: var(--text-primary);
    font-weight: 600;
}

.tag-description-cell {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 300px;
}

.tag-task-count {
    color: var(--text-primary);
    font-weight: 500;
}

.tag-task-count i {
    color: var(--primary-color);
}

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

/* No tags message */
.no-tags-message {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.no-tags-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.no-tags-message h5 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-tags-message p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* === INLINE EDITING STYLES === */

/* Editable cells */
.editable-cell {
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 0.25rem;
    margin: -0.25rem;
}

.editable-cell:hover {
    background: rgba(90, 111, 156, 0.05);
    transform: scale(1.02);
}

.editable-cell:hover::after {
    content: '✏️';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.7rem;
    opacity: 0.6;
}

.editable-cell.editing {
    background: rgba(90, 111, 156, 0.1);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 0 3px rgba(90, 111, 156, 0.1);
}

.editable-cell.saving {
    background: rgba(56, 161, 105, 0.1);
    border-color: var(--success-color);
}

.editable-cell.saving::after {
    content: '⏳';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.7rem;
    animation: spin 1s linear infinite;
}

/* Inline edit inputs */
.inline-edit-input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
    min-height: auto !important;
    height: auto !important;
}

.inline-edit-input:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Date input specific styling */
.inline-edit-input[type="date"] {
    width: 140px;
    font-size: 0.8rem;
}

/* Select input specific styling */
.inline-edit-input.form-select {
    width: auto;
    min-width: 100px;
    font-size: 0.8rem;
    padding: 0.25rem 1.5rem 0.25rem 0.5rem !important;
}

/* Textarea specific styling */
.inline-edit-input[type="textarea"] {
    resize: vertical;
    min-height: 2.5rem;
    max-height: 6rem;
}

/* Mobile responsive inline editing */
@media (max-width: 767px) {
    .editable-cell {
        padding: 0.5rem;
        margin: -0.5rem;
    }
    
    .editable-cell:hover {
        transform: none;
    }
    
    .inline-edit-input {
        font-size: 0.9rem !important;
        padding: 0.5rem !important;
        min-height: 44px !important;
    }
    
    .inline-edit-input[type="date"] {
        width: 160px;
        font-size: 0.9rem;
    }
    
    .inline-edit-input.form-select {
        min-width: 120px;
        font-size: 0.9rem;
        padding: 0.5rem 1.5rem 0.5rem 0.75rem !important;
    }
}

/* Keyboard shortcut hint */
.keyboard-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.keyboard-hint.show {
    opacity: 1;
}

.keyboard-hint kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.7rem;
}

/* Enhanced table row hover for editing */
.task-row:hover .editable-cell {
    background: rgba(90, 111, 156, 0.03);
}

.task-row:hover .editable-cell:hover {
    background: rgba(90, 111, 156, 0.08);
}

/* Status and priority badge updates for inline editing */
.status-badge.status-to-do {
    background: #6c757d !important;
    color: white;
}

.status-badge.status-in-progress {
    background: #0d6efd !important;
    color: white;
}

.status-badge.status-waiting {
    background: #ffc107 !important;
    color: #000;
}

.status-badge.status-done {
    background: #28a745 !important;
    color: white;
}

.priority-badge.priority-high {
    background: #dc3545 !important;
    color: white;
}

.priority-badge.priority-medium {
    background: #ffc107 !important;
    color: #000;
}

.priority-badge.priority-low {
    background: #17a2b8 !important;
    color: white;
}

/* Animation for successful updates */
@keyframes updateSuccess {
    0% { background: rgba(56, 161, 105, 0.1); }
    50% { background: rgba(56, 161, 105, 0.2); }
    100% { background: transparent; }
}

.editable-cell.update-success {
    animation: updateSuccess 0.6s ease-out;
}

/* === OFFLINE SUPPORT STYLES === */

/* Offline indicator bar */
.offline-indicator {
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    background: #ffc107;
    color: #000;
    padding: 0.5rem 1rem;
    text-align: center;
    z-index: 1029;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
}

.offline-indicator i {
    margin-right: 0.5rem;
}

/* Offline sync button in navbar */
#offline-status-container {
    display: flex;
    align-items: center;
}

#offline-sync-btn {
    position: relative;
}

#offline-sync-btn:hover {
    transform: scale(1.05);
}

#offline-pending-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Offline body class */
body.offline {
    padding-top: 80px; /* Account for navbar + offline indicator */
}

body.offline .offline-indicator {
    display: block;
}
