/* Mobile Responsive Styles */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .container { padding: 10px; }
    .auth-container { margin: 50px 20px; padding: 30px 20px; }
    header h1 { font-size: 20px; }
    .header-content { padding: 0 10px; flex-direction: column; gap: 10px; }
    .header-left { flex-direction: column; align-items: flex-start; gap: 10px; }
    .header-filter-group { width: 100%; }
    .header-filter-group select { flex: 1; }
    .user-info { gap: 10px; }
    .user-info span { display: none; }
    
    .actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .actions button { width: 100%; }
    
    .filter-group {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }
    
    .filter-group select {
        flex: 1;
        min-width: 0;
    }
    
    .task-level-2 { margin-left: 10px; }
    .task-level-3 { margin-left: 20px; }
    .task-level-4 { margin-left: 30px; }
    .task-item-compact { padding: 8px 6px; }
    .task-compact-header { flex-wrap: wrap; }
    .task-title-compact { font-size: 14px; min-width: 0; }
    
    .modal-content {
        margin: 20px;
        padding: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .kanban-board {
        flex-direction: column;
        height: auto;
        gap: 15px;
    }
    
    .kanban-column { min-width: 100%; }
    .graph-container { height: 400px; }
    
    .spreadsheet-scroll {
        max-height: calc(100vh - 300px);
    }
    
    .spreadsheet-table {
        font-size: 12px;
    }
    
    .spreadsheet-table th,
    .spreadsheet-table td {
        padding: 6px 4px;
    }
    
    .cell-input,
    .cell-select {
        font-size: 12px;
        padding: 4px 6px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    body { font-size: 14px; }
    .container { padding: 5px; }
    header { padding: 15px 0; margin-bottom: 15px; }
    header h1 { font-size: 18px; }
    .logout-btn { padding: 6px 12px; font-size: 14px; }
    button { min-height: 48px; font-size: 16px; }
    .actions button { padding: 12px; font-size: 15px; }
    
    .task-list { padding: 10px; }
    .task-item { padding: 12px; margin-bottom: 10px; }
    .task-title { font-size: 16px; }
    .task-meta { gap: 8px; font-size: 12px; }
    .task-actions { flex-wrap: wrap; gap: 5px; }
    .task-actions button { flex: 1; min-width: 100px; padding: 8px; font-size: 13px; }
    
    .task-item-compact { padding: 6px 4px; }
    .task-actions-compact { gap: 2px; }
    .compact-action { font-size: 16px; padding: 2px; min-width: 32px; min-height: 32px; }
    .compact-action.delete-action { font-size: 24px; }

    .reorder-handle,
    .reorder-handle-compact {
        min-width: 32px;
        min-height: 32px;
        font-size: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .collapse-indicator {
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .modal-content {
        margin: 10px;
        padding: 15px;
        max-width: calc(100% - 20px);
    }
    
    .modal-header h2 { font-size: 18px; }
    .close { font-size: 32px; }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 12px;
    }
    
    .kanban-card { padding: 10px; }
    .kanban-card-title { font-size: 14px; }
    .graph-container { height: 300px; }
    .graph-label { font-size: 10px; }
    .settings-content { padding: 10px 0; }
    
    .toggle-switch { width: 56px; height: 28px; }
    .slider:before { height: 22px; width: 22px; }
    input:checked + .slider:before { transform: translateX(28px); }
    
    .toggle-switch-small { width: 48px; height: 28px; }
    .slider-small:before { height: 22px; width: 22px; }
    input:checked + .slider-small:before { transform: translateX(20px); }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-content { max-height: 90vh; overflow-y: auto; }
    .graph-container { height: 60vh; }
}

/* Very Small Screens */
@media (max-width: 360px) {
    header h1 { font-size: 16px; }
    .task-title { font-size: 14px; }
    .badge { font-size: 10px; padding: 2px 6px; }
    .task-actions button { min-width: 80px; font-size: 12px; }
}
