/* Mobile-Only Optimized UI */

@media (max-width: 991px) {
    /* Mobile Page Header */
    .mobile-page-header {
        background: white;
        padding: 1rem;
        margin: -1rem -1rem 1rem -1rem;
        border-bottom: 1px solid #e2e8f0;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-page-title {
        font-size: 1.25rem;
        font-weight: 600;
        margin: 0;
        color: #0f172a;
    }

    /* Mobile Stats Cards */
    .mobile-stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .mobile-stat-card {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 1rem;
        border-radius: 12px;
        text-align: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .mobile-stat-card.blue {
        background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    }

    .mobile-stat-card.green {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    }

    .mobile-stat-card.orange {
        background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    }

    .mobile-stat-card.purple {
        background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    }

    .mobile-stat-card.red {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    }

    .mobile-stat-card.gray {
        background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    }

    .mobile-stat-number {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 0.25rem;
    }

    .mobile-stat-label {
        font-size: 0.75rem;
        opacity: 0.95;
        font-weight: 500;
    }

    /* Mobile Action Button */
    .mobile-fab {
        position: fixed;
        bottom: 1.5rem;
        right: 1.5rem;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
        color: white;
        border: none;
        box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 999;
        transition: transform 0.2s;
    }

    .mobile-fab:active {
        transform: scale(0.95);
    }

    .mobile-fab .material-icons {
        font-size: 24px;
    }

    /* Mobile List Items */
    .mobile-list {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .mobile-list-item {
        padding: 1rem;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        background: white;
        transition: background 0.2s;
    }

    .mobile-list-item:last-child {
        border-bottom: none;
    }

    .mobile-list-item:active {
        background: #f8fafc;
    }

    .mobile-list-item-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
        color: #0284c7;
    }

    .mobile-list-item-content {
        flex: 1;
        min-width: 0;
    }

    .mobile-list-item-title {
        font-weight: 600;
        color: #0f172a;
        margin-bottom: 0.25rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-list-item-subtitle {
        font-size: 0.875rem;
        color: #64748b;
    }

    .mobile-list-item-meta {
        font-size: 0.75rem;
        color: #94a3b8;
        margin-top: 0.25rem;
    }

    /* Mobile Empty State */
    .mobile-empty-state {
        text-align: center;
        padding: 3rem 1.5rem;
        background: white;
        border-radius: 12px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .mobile-empty-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 1rem;
        background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-empty-icon .material-icons {
        font-size: 40px;
        color: #0284c7;
    }

    .mobile-empty-title {
        font-size: 1.125rem;
        font-weight: 600;
        color: #0f172a;
        margin-bottom: 0.5rem;
    }

    .mobile-empty-text {
        color: #64748b;
        margin-bottom: 1.5rem;
        font-size: 0.875rem;
    }

    /* Mobile Bottom Navigation */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e2e8f0;
        display: flex;
        justify-content: space-around;
        padding: 0.5rem 0;
        z-index: 1000;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    }

    .mobile-bottom-nav-item {
        flex: 1;
        text-align: center;
        padding: 0.5rem;
        color: #64748b;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        transition: color 0.2s;
    }

    .mobile-bottom-nav-item.active {
        color: #0ea5e9;
    }

    .mobile-bottom-nav-item .material-icons {
        font-size: 24px;
    }

    .mobile-bottom-nav-item span {
        font-size: 0.75rem;
        font-weight: 500;
    }

    /* Mobile Search */
    .mobile-search {
        position: relative;
        margin-bottom: 1rem;
    }

    .mobile-search input {
        width: 100%;
        padding: 0.75rem 1rem 0.75rem 3rem;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        font-size: 1rem;
        background: white;
    }

    .mobile-search .material-icons {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
    }

    /* Mobile Filters */
    .mobile-filters {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-filters::-webkit-scrollbar {
        display: none;
    }

    .mobile-filter-chip {
        padding: 0.5rem 1rem;
        border-radius: 20px;
        background: white;
        border: 1px solid #e2e8f0;
        color: #64748b;
        font-size: 0.875rem;
        white-space: nowrap;
        transition: all 0.2s;
    }

    .mobile-filter-chip.active {
        background: #0ea5e9;
        color: white;
        border-color: #0ea5e9;
    }

    /* Mobile Card */
    .mobile-card {
        background: white;
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: 1px solid #f1f5f9;
    }

    .mobile-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0.75rem;
    }

    .mobile-card-title {
        font-weight: 600;
        color: #0f172a;
        font-size: 1rem;
    }

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

    /* Hide desktop elements on mobile */
    .desktop-only {
        display: none !important;
    }

    /* Adjust main content for bottom nav */
    .main-content {
        padding-bottom: 5rem !important;
    }

    /* Mobile Todo Item */
    .mobile-todo-item {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
        background: white;
        border-radius: 12px;
        margin-bottom: 0.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        border-left: 3px solid #e2e8f0;
    }

    .mobile-todo-item.pending {
        border-left-color: #f59e0b;
    }

    .mobile-todo-item.in-progress {
        border-left-color: #0ea5e9;
    }

    .mobile-todo-item.completed {
        border-left-color: #10b981;
    }

    .mobile-todo-checkbox {
        width: 24px;
        height: 24px;
        border-radius: 6px;
        border: 2px solid #cbd5e1;
        flex-shrink: 0;
        margin-top: 2px;
    }

    .mobile-todo-content {
        flex: 1;
        min-width: 0;
    }

    .mobile-todo-title {
        font-weight: 500;
        color: #0f172a;
        margin-bottom: 0.25rem;
    }

    .mobile-todo-meta {
        display: flex;
        gap: 0.75rem;
        font-size: 0.75rem;
        color: #64748b;
    }

    .mobile-priority-badge {
        padding: 0.125rem 0.5rem;
        border-radius: 12px;
        font-size: 0.7rem;
        font-weight: 600;
    }

    .mobile-priority-badge.high {
        background: #fee2e2;
        color: #dc2626;
    }

    .mobile-priority-badge.medium {
        background: #fef3c7;
        color: #d97706;
    }

    .mobile-priority-badge.low {
        background: #dbeafe;
        color: #0284c7;
    }
}

/* Desktop - Hide mobile elements */
@media (min-width: 992px) {
    .mobile-only,
    .mobile-page-header,
    .mobile-fab,
    .mobile-bottom-nav,
    .mobile-stats-grid,
    .mobile-list,
    .mobile-empty-state,
    .mobile-search,
    .mobile-filters,
    .mobile-card,
    .mobile-todo-item {
        display: none !important;
    }
}
